Skip to content
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

bake: various fixes for composable attributes #2814

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsternberg
Copy link
Collaborator

@jsternberg jsternberg commented Nov 22, 2024

This changes how the composable attributes are implemented and provides
various fixes to the first iteration.

Cache-from and cache-to now no longer print sensitive values that are
automatically added. These automatically added attributes are added when
the protobuf is created rather than at the time of parsing so they will
no longer be printed. If they are part of the original configuration
file, they will still be printed.

Empty strings will now be skipped. This was the original behavior and
composable attributes removed this functionality accidentally. This
functionality is now restored.

This also expands the available syntax that works with each of the
composable attributes. It is now possible to interleave the csv syntax
with the object syntax without any problems. The canonical form is still
the object syntax and variables are resolved according to that syntax.

Fixes #2823.
Fixes #2822.

Replaces #2832.
Replaces #2833.

@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch from 72a566c to 73f055d Compare November 25, 2024 18:29
@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch from 73f055d to 70c1cad Compare December 6, 2024 21:05
@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch 2 times, most recently from 8eafb54 to 753705d Compare December 9, 2024 16:04
@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch 2 times, most recently from d03e42f to 4e32acc Compare December 9, 2024 21:57
@jsternberg jsternberg changed the title bake: implement composable attribute for attest bake: various fixes for composable attributes Dec 9, 2024
@jsternberg jsternberg requested a review from tonistiigi December 9, 2024 21:59
@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch from 4e32acc to 91f0596 Compare December 9, 2024 21:59
@jsternberg jsternberg marked this pull request as ready for review December 9, 2024 22:00
@jsternberg jsternberg force-pushed the bake-composable-attributes-phase2 branch 2 times, most recently from e86f8b3 to e466b5b Compare December 9, 2024 22:08
This changes how the composable attributes are implemented and provides
various fixes to the first iteration.

Cache-from and cache-to now no longer print sensitive values that are
automatically added. These automatically added attributes are added when
the protobuf is created rather than at the time of parsing so they will
no longer be printed. If they are part of the original configuration
file, they will still be printed.

Empty strings will now be skipped. This was the original behavior and
composable attributes removed this functionality accidentally. This
functionality is now restored.

This also expands the available syntax that works with each of the
composable attributes. It is now possible to interleave the csv syntax
with the object syntax without any problems. The canonical form is still
the object syntax and variables are resolved according to that syntax.

Signed-off-by: Jonathan A. Sternberg <[email protected]>
@crazy-max crazy-max force-pushed the bake-composable-attributes-phase2 branch from e466b5b to d0212a9 Compare December 11, 2024 11:29
@crazy-max
Copy link
Member

rebased to fix xx issue

@crazy-max crazy-max added this to the v0.20.0 milestone Dec 11, 2024
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my side on various projects and looks great!

}

cache-from = [
"type=gha",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit, In https://github.com/docker/buildx/pull/2827/files#diff-095bae3e0563ad1f84bf1ca114f4687cc22db9bbbdd54299055015838038f235R84 I specifically sets token attribute in the definition to make sure it's being printed as intended if you want to add this new case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants