fix: add oci:// prefix to default flash command and preserve flashCmd#226
Conversation
|
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 skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDefault flash command template now prepends the Changes
Sequence Diagram(s)(Skipped — changes are localized control-flow adjustments without a new multi-component sequential feature.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/common/tasks/scripts/flash_image.sh`:
- Around line 22-23: The default FLASH_CMD uses an escaped placeholder
"\{image_uri\}" so the subsequent sed substitution FLASH_CMD=$(echo
"${FLASH_CMD}" | sed "s|{image_uri}|${IMAGE_REF}|g") doesn't match; update the
default assignment of FLASH_CMD to use unescaped braces "{image_uri}" (i.e.,
FLASH_CMD="${FLASH_CMD:-j storage flash oci://{image_uri}}") so the sed
replacement against IMAGE_REF correctly replaces the placeholder.
In `@internal/common/tasks/tasks.go`:
- Line 847: Update the flash-cmd description strings to use the supported
placeholder {image_uri} instead of the unsupported ${IMAGE_REF}; locate the
Description fields that mention "Custom flash command" (e.g., the Description
entry in the task definitions around the flash-cmd option in
internal/common/tasks/tasks.go and the similar occurrence later) and replace any
`${IMAGE_REF}` examples with `{image_uri}` so the help text matches the runtime
placeholder the script rewrites before calling the exporter.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c0132a63-247c-4758-bc1a-d52d21ab058c
📒 Files selected for processing (3)
internal/common/tasks/scripts/flash_image.shinternal/common/tasks/tasks.gointernal/controller/imagebuild/controller.go
2cdb0cd to
89e4955
Compare
The default flash command was missing the oci:// scheme prefix Additionally, passing --exporter to override the exporter selector was skipping the entire target mapping lookup, silently dropping the configured flashCmd (and its flags like --fls-version, --no-power-off). Now --exporter only overrides the selector while still inheriting flashCmd from the target mapping. Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com> Assisted-by: claude-sonnet-4.6
89e4955 to
f08b64a
Compare
The default flash command was missing the oci:// scheme prefix
Additionally, passing --exporter to override the exporter selector was skipping the entire target mapping lookup, silently dropping the configured flashCmd (and its flags like --fls-version, --no-power-off). Now --exporter only overrides the selector while still inheriting flashCmd from the target mapping.
Summary
Related Issues
Type of Change
Testing
make test)make lint)make manifests generate)Summary by CodeRabbit