Made errors when starting a module fatal#288
Open
inqrphl wants to merge 2 commits intoConSol-Monitoring:mainfrom
Open
Made errors when starting a module fatal#288inqrphl wants to merge 2 commits intoConSol-Monitoring:mainfrom
inqrphl wants to merge 2 commits intoConSol-Monitoring:mainfrom
Conversation
- if the module is of type RequestHandler, the name was replaced with the binding address. Append that binding string instead of replacing.
Contributor
Author
|
This was cancelled right @sni ? No need to quit the program if one module cant start I would like to still add the change in pkg/snclient/snclient.go though, helps a lot when debugging: |
sni
requested changes
Dec 5, 2025
Contributor
sni
left a comment
There was a problem hiding this comment.
Besides the failing test case. I am not totally sure how to handle this. There are 2 situations:
- initial start: failed modules should prevent startup
- reload: reloading the client with a changed configuration should probably not stop the running program in case of errors.
| if listener, ok := mod.(RequestHandler); ok { | ||
| name = listener.BindString() | ||
| log.Debugf("bind: %s", name) | ||
| // If it can be converted into a Requesthandler, the name changes. Why? Is it later used to parse the port or hostname? |
Contributor
There was a problem hiding this comment.
please ask question in the PR or directly, not in the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also changed the name for RequestHandler, previously it was only using the binding address. Append that to the module name instead of directly replacing. The binding address is still accessible as a variable.
The only reason it would be like this is you want to parse the name back to the binding address somewhere else, but I did not see anywhere this happened. But I did not search it thoroughly.