Add org.opencontainers.image.source.subpath#1062
Open
evankanderson wants to merge 2 commits intoopencontainers:mainfrom
Open
Add org.opencontainers.image.source.subpath#1062evankanderson wants to merge 2 commits intoopencontainers:mainfrom
org.opencontainers.image.source.subpath#1062evankanderson wants to merge 2 commits intoopencontainers:mainfrom
Conversation
Member
|
(soft) NACK; #1046 (comment) (Soft because I'm still willing to be convinced, but I think we need more spec maintainer opinions to be expressed for this to really move one way or the other) |
AkihiroSuda
reviewed
May 16, 2023
sudo-bmitch
requested changes
May 16, 2023
Contributor
There was a problem hiding this comment.
I think we have three options here depending on what we want to do:
- Decline this and use a tool specific annotation (e.g. something like
io.buildpacks.source.subpath) if the goal is to have that tool define unique builds. - Change this to
org.opencontainers.image.instanceor some other unique key to dedup multiple builds in the same source repo. The value would be free form, based on the build tooling. E.g. makefiles may specify a target name. And docker builds may include the context, dockerfile, target, platform, build args, and any other inputs. - Leave this proposal as is, but make it generic and remove any expected results since different tooling will use it in ways that do not guarantee it is a unique build within the git repo. With other popular build tools, two different images can be built from the same subpath by altering other inputs.
Note, the DCO is also failing on this and would need to be fixed before we can consider merging.
Member
|
I'm still partial to Brandon's option 1 (have each tool define their own additional fields for uniqueness if that's a property that they want/need instead of relying on us to somehow be the arbiter of all the possible uniqueness vectors for every build tool). 🙈 ❤️ |
Co-authored-by: Brandon Mitchell <git@bmitch.net> Signed-off-by: Evan Anderson <evan.k.anderson@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1046
Defines an additional subpath within the source repository. In combination with the
sourceattribute, this functions as a correlation ID for multiple images produces from the same source repository (e.g. the different containers produced by https://github.com/knative/serving, or any other mono-repo type arrangement which builds related artifacts from a common source tree).source.subpathis explicitly tool-specific; I'd expect that most source repositories use a single tool for building images, or at the very least don't use two tools with the samesubpathvalue to produce different images. There's probably at least one awesome counter-example out there... I don't know if I want to see it.