-
Notifications
You must be signed in to change notification settings - Fork 296
Improve dockerfile inputs detection #4922
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
base: main
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughThe changes refactor how build root paths are handled for repository-based builds. A new helper function Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/defaults/defaults.go (1)
1103-1108:⚠️ Potential issue | 🔴 CriticalFix
ContextDirpath construction to account for computedpathparameter.When
image.ContextDiris set, the current code at line 1106 completely replaces the computedpathparameter. This causes failures in rehearsal scenarios wherepathis an absolute directory like/home/prow/go/src/github.com/org/repo. TheContextDirwould become a relative path when it should be absolute.The correct logic should be:
if image.ContextDir != "" { dockerfilePath = fmt.Sprintf("%s/%s/%s", path, image.ContextDir, details.path) }This treats
ContextDiras relative to the computedpath, ensuring consistent behavior whetherpathis "." or an absolute directory.
|
/lgtm |
|
/lgtm cancel |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hector-vido 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 |
|
Scheduling required tests: |
|
@Prucek: The following test failed, say
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. |
This PR adds: