Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: potential problems that may cause a panic during context setup #359

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

gatici
Copy link
Contributor

@gatici gatici commented Dec 5, 2024

Aiming to fix any potential issue that causes: canonical/sdcore-amf-k8s-operator#472
I am not able to reproduce the problem. But, this PR aiming to fix potential issues in the HandleRegistrationStatusUpdateRequest and ContextSetup functions.

  • Safely Handle Type Assertions
  • Handle unexpected response data types
  • Check if message retrieved from channel and handle if no message retrieved situation
  • Check the message format and handle wrong message format

@gatici gatici marked this pull request as draft December 5, 2024 19:25
@gatici
Copy link
Contributor Author

gatici commented Dec 5, 2024

We are testing this now.

@gatici gatici marked this pull request as ready for review December 6, 2024 14:21
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

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

Overall, looks good to me. The only thing I would suggest is to start log messages with a lowercase letter

gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
gmm/sm.go Outdated Show resolved Hide resolved
@gatici
Copy link
Contributor Author

gatici commented Dec 9, 2024

Overall, looks good to me. The only thing I would suggest is to start log messages with a lowercase letter

Hello @gab-arrobo, Thank you for the review. Your comments are addressed.
Thank you.

@gatici gatici requested a review from gab-arrobo December 9, 2024 07:25
Copy link
Contributor

@gab-arrobo gab-arrobo 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 cd6ae6e into omec-project:main Dec 9, 2024
9 checks passed
gatici added a commit to gatici/amf that referenced this pull request Dec 12, 2024
…mec-project#359)

* Fix potential problems that may cause a panic during context setup

Signed-off-by: gatici <[email protected]>

* improve the logic in HandleRegistrationStatusUpdateRequest

Signed-off-by: gatici <[email protected]>

* fix linting

Signed-off-by: gatici <[email protected]>

* Start log messages with lowercase letter

Signed-off-by: gatici <[email protected]>

---------

Signed-off-by: gatici <[email protected]>
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