CNTRLPLANE-4088: replace broad COPY with targeted COPY --parents - #9317
CNTRLPLANE-4088: replace broad COPY with targeted COPY --parents#9317celebdor wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 12 reviews per rolling hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe CLI builder replaces Merge Risk: ⚪ Minimal · up to The change narrows container image contents to the directories required for the CLI build, with local image and binary validation reported; no actionable merge-blocking risk remains beyond normal checks. 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@celebdor: This pull request references CNTRLPLANE-4088 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
🔇 Additional comments (4)
Containerfile.cli (4)
7-12: 🎯 Functional Correctness
⚠️ Unverified finding
Sandbox verification was unavailable.Confirm
COPY --parentssupport in Konflux.The local build does not prove that the pending Konflux builder uses a compatible Containerfile parser. Confirm support for both
COPY --parentsinstructions before merging.Minimal builder syntax probe
16-18: 🗄️ Data Integrity & IntegrationConfirm whether
linux/ppc64is intentionally excluded.
MakefileLines 251-264 buildlinux/ppc64, but these lines do not createhcp-linux-ppc64.tar.gz. Line 26 then removes the unarchived binary. Addppc64here if it is a supported release target; otherwise document or remove that target fromproduct-cli-release.
28-32: 🔒 Security & PrivacyVerify the effective runtime user.
The final stage does not set
USER. Inspect the effective user inherited fromregistry.redhat.io/ubi9/nginx-124:latest. If it is empty,0, orroot, add an explicit non-root user and test nginx startup under that user.As per path instructions, matching Containerfiles must use a non-root
USERand must never run as root.Source: Path instructions
28-32: 🩺 Stability & AvailabilityVerify the effective health check.
Containerfile.clidoes not declareHEALTHCHECK. Inspect the inherited image configuration. If no probe exists, add one for the local nginx service.As per path instructions, matching Containerfiles must define
HEALTHCHECK.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 548188b5-be61-4970-92c5-11fd58ccadfe
📒 Files selected for processing (1)
Containerfile.cli
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9317 +/- ##
==========================================
+ Coverage 45.73% 45.74% +0.01%
==========================================
Files 781 781
Lines 97837 97858 +21
==========================================
+ Hits 44744 44765 +21
Misses 50024 50024
Partials 3069 3069 see 2 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/uncc |
jparrill
left a comment
There was a problem hiding this comment.
Dropped a comment. Thanks!
Replace the blanket `COPY . .` with individual COPY statements that only include directories needed for the product-cli build. This reduces build context size and maps which source paths each image actually depends on. Individual COPY statements are used instead of COPY --parents because Konflux's Dockerfile parser does not yet support --parents (CNTRLPLANE-4112). Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code)
90ab8f7 to
e1f4a91
Compare
|
/jira refresh |
|
@celebdor: This pull request references CNTRLPLANE-4088 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Without .git/ in the build context, Go's vcs.revision stamping is unavailable. Pass the commit SHA as COMMIT_HASH so that the Makefile ldflags fallback stamps the binary correctly. Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code) Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: celebdor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@celebdor: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/verified by celebdor Pulled the PR image and confirmed the build artifacts and commit hash are correct: The |
|
@celebdor: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Summary
COPY . .inContainerfile.cliwith targetedCOPY --parentsto only include directoriesneeded by the
product-clibuilddocs/,examples/,test/,hack/,shared-ingress/,contrib/, and other unrelated directoriescmd/cluster/core/dump.go, tracked in CNTRLPLANE-4092)Test plan
podman build -f Containerfile.cli --no-cache .hcp versionruns successfully from the linux-amd64 binaryRef: CNTRLPLANE-4088
🤖 Generated with Claude Code
Summary by CodeRabbit