Conversation
PR Summary by QodoReject duplicate stage aliases when parsing Containerfiles Description
Diagram
High-Level Assessment
Files changed (3)
|
CI Feedback 🧐(Feedback updated until commit 4c2a028)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules 1. ErrDuplicateAlias missing code prefix
|
a2b62bf to
a18fbd1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 62.34% 62.57% +0.22%
==========================================
Files 9 9
Lines 1166 1173 +7
==========================================
+ Hits 727 734 +7
Misses 331 331
Partials 108 108
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
fc78c3c to
fc62e18
Compare
Scan() now returns ErrDuplicateAlias when two stages share the same alias. Detection is in checkUnsupportedFeatures() rather than Parse(), because buildprobe must remain unchanged it needs to accept duplicates to match konflux-build-cli functionality. Buildah behavior for duplicates is undefined (podman-container-tools/buildah#6731), so capo fails early instead of trying to resolve builder content. Once buildah resolves this, capo will be adapted accordingly. Signed-off-by: Erik Mravec <emravec@redhat.com> Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
bclindner
left a comment
There was a problem hiding this comment.
very straightforward, great work
BorekZnovustvoritel
left a comment
There was a problem hiding this comment.
We may want to take another look at Brian's point. This may jumpscare us with unexpected bugs if we ever change some Capo internals.
- stage.Index instead of FinalStage alias comparison for duplicate check. - permalink for konflux-build-cli reference in test comment. Signed-off-by: Erik Mravec <emravec@redhat.com>
Parse() now returns ErrDuplicateAlias when two stages share the same alias. Buildah behavior for duplicates is undefined (podman-container-tools/buildah#6731), so we fail early instead of silently producing incorrect results. Once buildah defines and stabilizes the behavior, we can remove this guard and adapt accordingly.