Skip to content

Remove dead code and tested changes using OnRamp#148

Merged
gab-arrobo merged 3 commits intoomec-project:mainfrom
gab-arrobo:remove-deadcode
Mar 9, 2026
Merged

Remove dead code and tested changes using OnRamp#148
gab-arrobo merged 3 commits intoomec-project:mainfrom
gab-arrobo:remove-deadcode

Conversation

@gab-arrobo
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on removing unused (“dead”) functions across the N3IWF codebase, primarily in NGAP message building/sending helpers, logger and security algorithm helpers, and some test/example utilities.

Changes:

  • Removed multiple unused NGAP message send/build helper functions (e.g., NGReset, NAS NonDelivery, PDU session notify/modify indication).
  • Removed unused exported helpers across packages (logger accessors, CLI arg filtering, security string-to-type helpers, packet getters).
  • Adjusted several NGAP event handler function signatures and removed some NGAP event Type()/constructor helpers.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
service/init.go Removes unused CLI flag filtering helper.
ngap/message/send.go Drops unused NGAP send wrappers.
ngap/message/build.go Drops unused NGAP PDU builders.
ngap/handler/handler.go Changes several handler function parameter types to any.
logger/logger.go Removes unused exported GetLogger.
ike/service/service_test.go Removes an unused Go example function from tests.
ike/security/prf/prf.go Removes unused PRF string-to-type helper.
ike/security/integ/integ.go Removes unused INTEG string-to-type helpers.
ike/security/dh/dh.go Removes unused DH string-to-type helper.
gtp/message/message.go Removes unused TPDU extension header getter.
gre/message/message.go Removes unused GRE packet getters.
context/ranue.go Removes unused shared context constructor.
context/ngap.go Removes Type()/constructor helpers for several NGAP event structs.
Comments suppressed due to low confidence (1)

ngap/handler/handler.go:3017

  • HandleSendUEContextReleaseComplete now takes any but is still called from HandleEvent(ngapEvent context.NgapEvt). This weakens compile-time guarantees and makes the immediate type assertion (ngapEvent.(*context.SendUEContextReleaseCompleteEvt)) more fragile (panic on mismatched payload). Prefer keeping the parameter typed as context.NgapEvt for consistency with other handlers, or migrate the whole NGAP event pipeline (channel + HandleEvent) to any/type-switch and use a checked assertion with logging.
func HandleSendUEContextReleaseComplete(ngapEvent any) {
	logger.NgapLog.Debugln("handle SendUEContextReleaseComplete Event")

	evt := ngapEvent.(*context.SendUEContextReleaseCompleteEvt)
	ranUeNgapId := evt.RanUeNgapId

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Arrobo, Gabriel <[email protected]>
andybavier
andybavier previously approved these changes Mar 9, 2026
Copy link

@andybavier andybavier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copilot AI review requested due to automatic review settings March 9, 2026 21:27
@gab-arrobo gab-arrobo requested a review from andybavier March 9, 2026 21:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@andybavier andybavier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@gab-arrobo gab-arrobo merged commit 2a6b11f into omec-project:main Mar 9, 2026
15 checks passed
@gab-arrobo gab-arrobo deleted the remove-deadcode branch March 9, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants