-
Notifications
You must be signed in to change notification settings - Fork 8
HYPERFLEET-372 | fix: Adapter logging is reporting wrong error phase #22
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
HYPERFLEET-372 | fix: Adapter logging is reporting wrong error phase #22
Conversation
- Moved Phase to CurrentPhase to make the variable clear usage - Removed ErrorReason as no necessary to wrap the Error - Changed Error to Errors as a map, each condition can have error happen. A map meet the usage better.
WalkthroughThe pull request refactors error handling in the ExecutionResult structure, replacing separate Error and ErrorReason fields with a single Errors map keyed by ExecutionPhase to track phase-specific errors. The Phase field is renamed to CurrentPhase. The executor logic is updated to collect and store errors in the map during each phase execution, and all references in tests and documentation are updated to use the new field names and error-tracking structure. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The changes are primarily structural refactoring with consistent patterns repeated across multiple files. However, the executor logic updates in executor.go require verification of error handling at each phase, and the distributed nature of field renames across five files (types.go, executor.go, tests, and documentation) necessitates checking for consistency and completeness. Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🧬 Code graph analysis (4)internal/executor/executor_test.go (2)
test/integration/executor/executor_k8s_integration_test.go (2)
test/integration/executor/executor_integration_test.go (2)
internal/executor/executor.go (1)
🔇 Additional comments (11)
Comment |
| // ErrorReason is a human-readable error reason (process execution error only) | ||
| ErrorReason string | ||
| // Errors contains errors keyed by the phase where they occurred | ||
| Errors map[ExecutionPhase]error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors here is a bit confusing. Would PhaseErrors be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. Errors means the execution error. There is no other errors defined in this struct to cause confusion. Let's keep it until we got further errors introduced.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 86254860 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
16b4b07
into
openshift-hyperfleet:main
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.