Match known trusted builders by repository#2619
Closed
TIR44 wants to merge 1 commit into
Closed
Conversation
Signed-off-by: TiR <70480807+TIR44@users.noreply.github.com>
Author
|
I missed #2573 when I opened this. That PR already covers the same issue and was opened earlier, so I am closing this duplicate in favor of #2573. For reference, this branch added extra caller coverage around the same fix ( |
1 task
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.
Summary
heroku/builder:24do not trust unrelated tags.IsTrustedBuilderso build, inspect, and config add paths do not patch known and configured trust separately.Context
Fixes #2572.
Known trusted builders listed without a tag, such as
paketobuildpacks/builder-jammy-base, previously only matched the exact string and did not trustpaketobuildpacks/builder-jammy-base:latest. Configured trusted builders already matched tagless entries by repository, so this applies the same behavior to known trusted builders while preserving exact tag matching for tagged known entries.Validation
go test ./internal/builder -run TestTrustedBuilder -count=1go test ./internal/builder ./internal/commands -run 'TestTrustedBuilder|TestBuildCommand|TestBuilderInspectCommand|TestTrustedBuilderCommand' -count=1go test ./internal/commands ./pkg/client -count=1Note:
go test ./internal/builder -count=1still fails locally onTestBuilder/.../when_CNB_BUILD_CONFIG_DIR_is_defined/adds_the_env_vars_as_files_to_the_imagebecause it expects/cnb/dup-build-config-dir/env/SOME_KEYbut the generated layer contains/cnb/build-config/env/SOME_KEY. The trust-builder suite in that package passes.