-
Notifications
You must be signed in to change notification settings - Fork 105
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
Use correct run image label name for distro name/version #1325
Merged
natalieparellano
merged 1 commit into
buildpacks:main
from
edmorley:fix-run-image-distro-labels
Mar 28, 2024
Merged
Use correct run image label name for distro name/version #1325
natalieparellano
merged 1 commit into
buildpacks:main
from
edmorley:fix-run-image-distro-labels
Mar 28, 2024
Conversation
This file contains 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
The spec and docs say that the run image distro and version should be specified via the Docker image labels `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data However, until now the lifecycle implementation was checking for label names that were missing the `.base` substring from the name. This causes distro name/version `buildpack.toml` target detection to fail, as well as the env vars `CNB_TARGET_DISTRO_NAME` and `CNB_TARGET_DISTRO_VERSION` not to be set correctly in the buildpack environment. Fixes buildpacks#1324. Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
edmorley
added a commit
to heroku/libcnb.rs
that referenced
this pull request
Mar 28, 2024
Since the relevant distros run image Docker label names are `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data I believe the rustdocs here were based on the `lifecycle` codebase, which uses the wrong label name, and is about to be fixed: buildpacks/lifecycle#1325
edmorley
added a commit
to heroku/libcnb.rs
that referenced
this pull request
Mar 28, 2024
Since the relevant distros run image Docker label names are `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data I believe the rustdocs here were based on the `lifecycle` codebase, which uses the wrong label name, and is about to be fixed: buildpacks/lifecycle#1325
edmorley
added a commit
to heroku/libcnb.rs
that referenced
this pull request
Mar 28, 2024
Since the relevant distros run image Docker label names are `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data I believe the rustdocs here were based on the `lifecycle` codebase, which uses the wrong label name, and is about to be fixed: buildpacks/lifecycle#1325
jabrown85
approved these changes
Mar 28, 2024
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.
Looks good to me. @natalieparellano want to merge and cut a release? No one seems to be setting the incorrect label so we are thinking we can ship this in a patch version.
edmorley
added a commit
to heroku/libcnb.rs
that referenced
this pull request
Mar 28, 2024
Since the relevant distros run image Docker label names are `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data I believe the rustdocs here were based on the `lifecycle` codebase, which uses the wrong label name, and is about to be fixed: buildpacks/lifecycle#1325
natalieparellano
approved these changes
Mar 28, 2024
natalieparellano
pushed a commit
that referenced
this pull request
Mar 28, 2024
The spec and docs say that the run image distro and version should be specified via the Docker image labels `io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data However, until now the lifecycle implementation was checking for label names that were missing the `.base` substring from the name. This causes distro name/version `buildpack.toml` target detection to fail, as well as the env vars `CNB_TARGET_DISTRO_NAME` and `CNB_TARGET_DISTRO_VERSION` not to be set correctly in the buildpack environment. Fixes #1324. Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
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.
Summary
The spec and docs say that the base image distro and version should be specified via the run image Docker image labels
io.buildpacks.base.distro.name
andio.buildpacks.base.distro.version
. See:https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data
However, until now the lifecycle implementation was checking for label names that were missing the
.base
substring from the name.This causes distro name/version
buildpack.toml
target detection to fail, as well as the env varsCNB_TARGET_DISTRO_NAME
andCNB_TARGET_DISTRO_VERSION
to not be set correctly in the buildpack environment.Release notes
The
lifecycle
now correctly extracts the target distro name and version from the run image labelsio.buildpacks.base.distro.name
andio.buildpacks.base.distro.version
.Related
Fixes #1324.