fix(event): miss send error when cli setup failed#109
Merged
Conversation
Signed-off-by: Kevin Cui <bh@bugs.cc>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the event notification handling by centralizing error and success notifications in the main function instead of within individual action functions.
- Removed inline notifications in the init and run commands.
- Added centralized notification handling in the main function's switch cases.
Comments suppressed due to low confidence (3)
cmd/ovm/main.go:192
- [nitpick] The 'log' variable is assigned but not used later in the function. Consider either utilizing it for logging purposes or removing it to reduce confusion.
var log *logger.Context
cmd/ovm/main.go:67
- Centralizing event notifications in main may skip notifications for errors in the init command if early termination occurs. Ensure that all failure paths still trigger the appropriate event notifications.
return initCtx.Start()
cmd/ovm/main.go:93
- As with the init command, centralizing the notification in main for the run command requires verification that no error cases are missed. Confirm that all error scenarios are handled reliably.
return runCtx.Start()
ihexon
approved these changes
May 29, 2025
ihexon
approved these changes
May 29, 2025
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.
No description provided.