Skip to content

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Nov 27, 2024

fixes #503

This adds support for composable attributes with backward compatibility for csv syntax.

@crazy-max crazy-max force-pushed the bake-composable-attrs branch from aa2455e to 733f698 Compare November 27, 2024 14:35
@crazy-max crazy-max marked this pull request as ready for review November 27, 2024 14:39
@crazy-max crazy-max force-pushed the bake-composable-attrs branch from 733f698 to 8c24017 Compare November 28, 2024 15:20
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the bake-composable-attrs branch from 8c24017 to 068b0dc Compare December 3, 2024 14:07
Copy link
Contributor

@jsternberg jsternberg left a comment

Choose a reason for hiding this comment

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

Looks good. I just had one question. I wanted to make sure that mixing the two styles worked correctly.

// convert to composable attributes: https://github.com/docker/buildx/pull/2758
for (const name in definition.target) {
const target = definition.target[name];
if (target['cache-from'] && Array.isArray(target['cache-from'])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this means that you can mix the csv style with the composable style but I just wanted to make sure I was reading this right.

Copy link
Member Author

Choose a reason for hiding this comment

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

It means we always want composable attributes so if csv values are passed we convert them to composable attributes.

@crazy-max
Copy link
Member Author

crazy-max commented Jan 8, 2025

I'm merging this one and will open a follow-up to handle attestations related to docker/buildx#2848.

@crazy-max crazy-max merged commit d78e250 into docker:main Jan 8, 2025
45 checks passed
@crazy-max crazy-max deleted the bake-composable-attrs branch January 8, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle composable bake attributes

2 participants