show image details even if flashing fails#170
Conversation
So users can flash themselves Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReworks flash-related failure handling across build logs, flash feedback, and the image build reconciler: displays build results before invoking flash error handling, simplifies flash-detection logic, removes some formatting constants, and adds a reconciler helper that inspects PipelineRun child TaskRuns to produce more specific flash-task failure details. Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(200,200,255,0.5)
participant Reconciler
participant K8sAPI
participant TektonTaskRun
end
Reconciler->>K8sAPI: Get PipelineRun
K8sAPI-->>Reconciler: PipelineRun (with child refs)
Reconciler->>K8sAPI: Get referenced TaskRun (flash-image)
K8sAPI-->>Reconciler: TaskRun (status)
alt TaskRun completed & unsuccessful
Reconciler->>Reconciler: extract TaskRun failure message
Reconciler->>Reconciler: set ImageBuild.Status.Failure = TaskRun message
else fallback
Reconciler->>Reconciler: fallback to pipelineRunFailureMessage(pipelineRun)
Reconciler->>Reconciler: set ImageBuild.Status.Failure = pipeline message
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cmd/caib/buildcmd/logs.go`:
- Around line 164-166: When isFlashFailure is true, displayBuildResults may call
h.handleError() and exit before h.handleFlashError() runs; ensure flash
instructions are always shown by invoking h.handleFlashError(handleErr, st)
before calling h.displayBuildResults(ctx, api, name), or alternatively modify
displayBuildResults to catch OCI-download errors and log them instead of calling
h.handleError; update the invocation order in the block handling isFlashFailure
(or make displayBuildResults non-fatal) so handleFlashError executes regardless
of displayBuildResults failures.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4af20b5e-dbca-469f-9a1c-7e197c3572c6
📒 Files selected for processing (1)
cmd/caib/buildcmd/logs.go
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Assisted-by: claude-sonnet-4.6
So users can flash themselves
Summary by CodeRabbit
Bug Fixes
Style