πŸ”’ EXCLUSIVE: Docker/buildx/issues/ - Complete Album!

Skip to content

Conversation

@jedevc

Body.JustAttributes cannot distinguish between blocks and attributes for JSON files, so the variable block could be included in the list of attributes returned.

This patch ensures that JSON and HCL files behave the same way by removing all known block types first, from the provided config schema and then from a generated definitions schema.

Fixes #1051

crazy-max
@crazy-max crazy-max requested a review from tonistiigi April 27, 2022 15:26
crazy-max

Choose a reason for hiding this comment

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

Can you add a test for this case?

Body.JustAttributes cannot distinguish between blocks and attributes for
JSON files, so the variable block could be included in the list of
attributes returned.

This patch ensures that JSON and HCL files behave the same way by
removing all known block types first, from the provided config schema
and then from a generated definitions schema.

Fixes docker#1051

Signed-off-by: Justin Chadwell <[email protected]>
crazy-max

Choose a reason for hiding this comment

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

LGTM

@tonistiigi tonistiigi merged commit 9cdd837 into docker:master Apr 29, 2022
@jedevc jedevc deleted the issue-1051 branch April 29, 2022 08:21
@crazy-max crazy-max added this to the v0.8.3 milestone Jun 5, 2022
@crazy-max crazy-max modified the milestones: v0.8.3, v0.9.0 Jul 30, 2022
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.

Docker buildx bake panics with empty variable in JSON file

3 participants