-
Notifications
You must be signed in to change notification settings - Fork 489
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
[0.13] bake: changed behavior in output configuration #2325
Comments
I think this is the cause #2302 |
I don't think the following step from your workflow matches the output of merged files: - name: Build
uses: docker/bake-action@511fde2517761e303af548ec9e0ea74a8a100112 # v4
with:
files: |
./docker-bake.json
${{ steps.meta-a.outputs.bake-file }}
${{ steps.meta-b.outputs.bake-file }}
${{ steps.meta-c.outputs.bake-file }}
${{ steps.meta-d.outputs.bake-file }}
targets: default Can't repro with either v0.12.1 or v0.13.0 for 2325.bake.json Show{
"group": {
"default": {
"targets": [
"a",
"b",
"c",
"d",
"test"
]
}
},
"target": {
"c-tags": {},
"c": {
"inherits": [ "c-tags", "defaults" ],
"contexts": {
"builder": "target:c-builder"
},
"args": {
"PROJ": "X.C"
}
},
"c-builder": {
"inherits": [ "builder" ],
"args": {
"PROJ": "X.C"
}
},
"d-tags": {},
"d": {
"inherits": [ "d-tags", "defaults" ],
"contexts": {
"builder": "target:d-builder"
},
"args": {
"PROJ": "X.D"
}
},
"d-builder": {
"inherits": [ "builder" ],
"args": {
"PROJ": "X.D"
}
},
"a-tags": {},
"a": {
"inherits": [ "a-tags", "defaults" ],
"contexts": {
"builder": "target:a-builder"
},
"args": {
"PROJ": "X.A"
}
},
"a-builder": {
"inherits": [ "builder" ],
"args": {
"PROJ": "X.A"
}
},
"b-tags": {},
"b": {
"inherits": [ "b-tags", "defaults" ],
"args": {
"PROJ": "B"
},
"dockerfile": "B/Dockerfile.deploy.Dockerfile",
"contexts": {
"e": "target:e",
"p": "target:p",
"builder": "target:b-builder"
}
},
"b-builder": {
"inherits": [ "builder" ],
"args": {
"PROJ": "B"
}
},
"e": {
"context": "Y/source",
"dockerfile": "Dockerfile"
},
"p": {
"context": "Z/Z",
"dockerfile": "Dockerfile"
},
"test": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.all-test.Dockerfile",
"contexts": {
"test-base": "target:test-base",
"builder": "target:test-builder"
},
"output": [ "type=local,dest=./test-results-output" ]
},
"test-builder": {
"inherits": [ "builder" ],
"args": {
"PROJ": "X.Test"
}
},
"all_defaults": {
"platforms": [ "linux/amd64" ],
"context": "."
},
"defaults": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.all.Dockerfile",
"contexts": {
"runtime-base": "target:runtime-base"
}
},
"builder": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.builder.Dockerfile",
"contexts": {
"build-base": "target:build-base"
}
},
"runtime-base": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.runtime-base.Dockerfile"
},
"build-base": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.build-base.Dockerfile"
},
"test-base": {
"inherits": [ "all_defaults" ],
"dockerfile": "Dockerfile.test-base.Dockerfile"
}
}
} 2325.a.json Show{
"tags": [
"foo/bar:a-1176"
],
"labels": {
"org.opencontainers.image.created": "2024-03-08T03:32:55.763Z",
"org.opencontainers.image.description": "X a",
"org.opencontainers.image.licenses": "",
"org.opencontainers.image.revision": "8ec5766dba6025b8fd13d585e80abbb217c1862c",
"org.opencontainers.image.source": "https://github.com/X/X",
"org.opencontainers.image.title": "X a",
"org.opencontainers.image.url": "https://github.com/X/X",
"org.opencontainers.image.vendor": "X - Q A/S",
"org.opencontainers.image.version": "a-1176"
},
"annotations": [
"manifest:org.opencontainers.image.created=2024-03-08T03:32:55.763Z",
"manifest:org.opencontainers.image.description=",
"manifest:org.opencontainers.image.licenses=",
"manifest:org.opencontainers.image.revision=8ec5766dba6025b8fd13d585e80abbb217c1862c",
"manifest:org.opencontainers.image.source=https://github.com/X/X",
"manifest:org.opencontainers.image.title=X",
"manifest:org.opencontainers.image.url=https://github.com/X/X",
"manifest:org.opencontainers.image.version=a-1176"
]
} merge result with 0.12.1: Show {
"group": {
"default": {
"targets": [
"a",
"b",
"c",
"d",
"test"
]
}
},
"target": {
"a": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"builder": "target:a-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"a-builder": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"b": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"builder": "target:b-builder",
"e": "target:e",
"p": "target:p",
"runtime-base": "target:runtime-base"
},
"dockerfile": "B/Dockerfile.deploy.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"b-builder": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"build-base": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"dockerfile": "Dockerfile.build-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"c": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"builder": "target:c-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"c-builder": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"d": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"builder": "target:d-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"d-builder": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"e": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": "Y/source",
"dockerfile": "Dockerfile"
},
"p": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": "Z/Z",
"dockerfile": "Dockerfile"
},
"runtime-base": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"dockerfile": "Dockerfile.runtime-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"builder": "target:test-builder",
"test-base": "target:test-base"
},
"dockerfile": "Dockerfile.all-test.Dockerfile",
"platforms": [
"linux/amd64"
],
"output": [
"type=local,dest=./test-results-output"
]
},
"test-base": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"dockerfile": "Dockerfile.test-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test-builder": {
"attest": [
"type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/test-docker-action/actions/runs/8201804346"
],
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.Test"
},
"platforms": [
"linux/amd64"
]
}
}
} merge result with 0.13.0: Show {
"group": {
"default": {
"targets": [
"a",
"b",
"c",
"d",
"test"
]
}
},
"target": {
"a": {
"context": ".",
"contexts": {
"builder": "target:a-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"a-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"b": {
"context": ".",
"contexts": {
"builder": "target:b-builder",
"e": "target:e",
"p": "target:p",
"runtime-base": "target:runtime-base"
},
"dockerfile": "B/Dockerfile.deploy.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"b-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"build-base": {
"context": ".",
"dockerfile": "Dockerfile.build-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"c": {
"context": ".",
"contexts": {
"builder": "target:c-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"c-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"d": {
"context": ".",
"contexts": {
"builder": "target:d-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"d-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"e": {
"context": "Y/source",
"dockerfile": "Dockerfile"
},
"p": {
"context": "Z/Z",
"dockerfile": "Dockerfile"
},
"runtime-base": {
"context": ".",
"dockerfile": "Dockerfile.runtime-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test": {
"context": ".",
"contexts": {
"builder": "target:test-builder",
"test-base": "target:test-base"
},
"dockerfile": "Dockerfile.all-test.Dockerfile",
"platforms": [
"linux/amd64"
],
"output": [
"type=local,dest=./test-results-output"
]
},
"test-base": {
"context": ".",
"dockerfile": "Dockerfile.test-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.Test"
},
"platforms": [
"linux/amd64"
]
}
}
} I don't repro locally either the Show
{
"group": {
"default": {
"targets": [
"a",
"b",
"c",
"d",
"test"
]
}
},
"target": {
"a": {
"context": ".",
"contexts": {
"builder": "target:a-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"a-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.A"
},
"platforms": [
"linux/amd64"
]
},
"b": {
"context": ".",
"contexts": {
"builder": "target:b-builder",
"e": "target:e",
"p": "target:p",
"runtime-base": "target:runtime-base"
},
"dockerfile": "B/Dockerfile.deploy.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"b-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "B"
},
"platforms": [
"linux/amd64"
]
},
"build-base": {
"context": ".",
"dockerfile": "Dockerfile.build-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"c": {
"context": ".",
"contexts": {
"builder": "target:c-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"c-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.C"
},
"platforms": [
"linux/amd64"
]
},
"d": {
"context": ".",
"contexts": {
"builder": "target:d-builder",
"runtime-base": "target:runtime-base"
},
"dockerfile": "Dockerfile.all.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"d-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.D"
},
"platforms": [
"linux/amd64"
]
},
"e": {
"context": "Y/source",
"dockerfile": "Dockerfile"
},
"p": {
"context": "Z/Z",
"dockerfile": "Dockerfile"
},
"runtime-base": {
"context": ".",
"dockerfile": "Dockerfile.runtime-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test": {
"context": ".",
"contexts": {
"builder": "target:test-builder",
"test-base": "target:test-base"
},
"dockerfile": "Dockerfile.all-test.Dockerfile",
"platforms": [
"linux/amd64"
],
"output": [
"type=local,dest=./test-results-output"
]
},
"test-base": {
"context": ".",
"dockerfile": "Dockerfile.test-base.Dockerfile",
"platforms": [
"linux/amd64"
]
},
"test-builder": {
"context": ".",
"contexts": {
"build-base": "target:build-base"
},
"dockerfile": "Dockerfile.builder.Dockerfile",
"args": {
"PROJ": "X.Test"
},
"platforms": [
"linux/amd64"
]
}
}
} Can you please double-check that you're giving the right workflow and please post the full workflow, not just the "Build" step. Better would be to have a link to your GitHub repo so I can check myself the logs. Thanks. |
docker/actions-toolkit#276 should fix the provenance issue. |
I think the issue is handling of The question is if this is logically correct, especially considering that we now support multiple exporters. By definition @davhdavh can you confirm that |
It really must have been friday yesterday. Yes, forgot to add the last 2 lines of the github job, where push and pull are true. |
Can you post the full workflow? Is your GitHub repo public so we can look at it? Thanks |
@crazy-max This can be reproduced with this simple case. docker-bake.hcl
v0.13
v0.12
|
@crazy-max Note that in |
Yes same with v0.13
v0.12
|
Contributing guidelines
I've found a bug and checked that ...
Description
It seems some logic changed in merging bake files.
Expected behaviour
upgrade from 0.12.1 to 0.13 didn't break build
Actual behaviour
upgrade from 0.12.1 to 0.13 didn't break build.
v0.12.1:
Final merged bake file:
0.13.0:
Summary
0.12.1 preserved the original files test.output:
"type=local,dest=./test-results-output"
, 0.13 overwrites it to"type=registry"
.0.12.1 adds attest, 0.13 doesn't.
I assume the error message comes from the test.output being update from local to registry.
Buildx version
0.13.0
Docker info
No response
Builders list
Configuration
github
docker-bake.json
:steps.meta-a.outputs.bake-file
:Build logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: