-
Notifications
You must be signed in to change notification settings - Fork 14
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
Optionally use disclosure elements to hide lengthy Docker build summary #369
Comments
Thanks for your feedback on this feature!
I think you mean
Would you mind sharing the workflow run url of the repo affected by this? That would help to understand your issue. If you prefer to share materials (screenshot, video capture), feel free to do so.
I think we could make some enhancements and make |
Thanks for the feedback, @ruffsl; this is really useful. We will be investigating. Which pieces of information would be most valuable to use in these summaries? |
Sure, here is an anonymized example where it includes a trailing disclosure element to hind the lengthy docker build summary, so that PR reviewers can focus on finding the fully qualified tag names, while CI maintainers can expand the docker build summary for greater diagnostics and debugging. Edit: I'll note there are multiple bake jobs in a single workflow, so the summary below is replicated Nx. Base Images
tooler
validator
Docker Build summaryDocker Build summaryFor a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. ⬇️ org~repo~ABJFAM+1.dockerbuild (106.48 KB) Find this useful? Let us know Preview
Build inputsfiles:
- ./docker-bake.hcl
- /home/runner/_work/_temp/docker-actions-toolkit-2FZiur/docker-metadata-action-bake.json
- /home/runner/_work/_temp/docker-actions-toolkit-TzQCs8/docker-metadata-action-bake.json
targets:
- tooler
- validator
pull: true
provenance: 'false'
push: true
set:
- '*.cache-from=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache'
- '*.cache-to=type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max'
- '*.cache-from=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache'
- tooler.cache-to=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache,mode=max,image-manifest=true,oci-mediatypes=true
- '*.cache-from=type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk' Bake definition{
"group": {
"default": {
"targets": [
"tooler",
"validator"
]
}
},
"target": {
"tooler": {
"attest": [
"type=provenance,disabled=true"
],
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"DOCKER_META_IMAGES": "111111111111.dkr.ecr.us-east-1.amazonaws.com/repo",
"DOCKER_META_VERSION": "docker_action-tooler"
},
"labels": {
"org.opencontainers.image.created": "2024-06-17T18:54:18.131Z",
"org.opencontainers.image.description": "Experimentation repo for refactoring auto integration repo",
"org.opencontainers.image.licenses": "",
"org.opencontainers.image.revision": "50e0ecd7bf698a01710d08ce052319b8d46b50fd",
"org.opencontainers.image.source": "https://github.com/org/repo",
"org.opencontainers.image.title": "repo",
"org.opencontainers.image.url": "https://github.com/org/repo",
"org.opencontainers.image.version": "docker_action-tooler"
},
"tags": [
"111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler"
],
"cache-from": [
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache",
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk"
],
"cache-to": [
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache,mode=max,image-manifest=true,oci-mediatypes=true"
],
"target": "tooler",
"output": [
"type=image,push=true,push=true,push=true,push=true,push=true"
],
"pull": true,
"no-cache": false
},
"validator": {
"attest": [
"type=provenance,disabled=true"
],
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"DOCKER_META_IMAGES": "111111111111.dkr.ecr.us-east-1.amazonaws.com/repo",
"DOCKER_META_VERSION": "docker_action-validator"
},
"labels": {
"org.opencontainers.image.created": "2024-06-17T18:54:17.585Z",
"org.opencontainers.image.description": "Experimentation repo for refactoring auto integration repo",
"org.opencontainers.image.licenses": "",
"org.opencontainers.image.revision": "50e0ecd7bf698a01710d08ce052319b8d46b50fd",
"org.opencontainers.image.source": "https://github.com/org/repo",
"org.opencontainers.image.title": "repo",
"org.opencontainers.image.url": "https://github.com/org/repo",
"org.opencontainers.image.version": "docker_action-validator"
},
"tags": [
"111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-validator"
],
"cache-from": [
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache",
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk"
],
"cache-to": [
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max"
],
"target": "validator",
"output": [
"type=image,push=true,push=true,push=true,push=true"
],
"pull": true,
"no-cache": false
}
}
} |
I would prefer tighter control over the rendering, rather than hard coded hursitics. Perhaps a verbosity parameter could be used to fold headings of different levels? E.g: with:
verbosity: 0 would enclose all headings greater than the with:
verbosity: 1 while would similarly enclose all headings greater than the Base Images
tooler
validator
Docker Build summaryFor a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. ⬇️ org~repo~ABJFAM+1.dockerbuild (106.48 KB) Find this useful? Let us know PreviewPreview
Build inputsBuild inputsfiles:
- ./docker-bake.hcl
- /home/runner/_work/_temp/docker-actions-toolkit-2FZiur/docker-metadata-action-bake.json
- /home/runner/_work/_temp/docker-actions-toolkit-TzQCs8/docker-metadata-action-bake.json
targets:
- tooler
- validator
pull: true
provenance: 'false'
push: true
set:
- '*.cache-from=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache'
- '*.cache-to=type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max'
- '*.cache-from=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache'
- tooler.cache-to=type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache,mode=max,image-manifest=true,oci-mediatypes=true
- '*.cache-from=type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk' Bake definitionBake definition{
"group": {
"default": {
"targets": [
"tooler",
"validator"
]
}
},
"target": {
"tooler": {
"attest": [
"type=provenance,disabled=true"
],
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"DOCKER_META_IMAGES": "111111111111.dkr.ecr.us-east-1.amazonaws.com/repo",
"DOCKER_META_VERSION": "docker_action-tooler"
},
"labels": {
"org.opencontainers.image.created": "2024-06-17T18:54:18.131Z",
"org.opencontainers.image.description": "Experimentation repo for refactoring auto integration repo",
"org.opencontainers.image.licenses": "",
"org.opencontainers.image.revision": "50e0ecd7bf698a01710d08ce052319b8d46b50fd",
"org.opencontainers.image.source": "https://github.com/org/repo",
"org.opencontainers.image.title": "repo",
"org.opencontainers.image.url": "https://github.com/org/repo",
"org.opencontainers.image.version": "docker_action-tooler"
},
"tags": [
"111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler"
],
"cache-from": [
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache",
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk"
],
"cache-to": [
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache,mode=max,image-manifest=true,oci-mediatypes=true"
],
"target": "tooler",
"output": [
"type=image,push=true,push=true,push=true,push=true,push=true"
],
"pull": true,
"no-cache": false
},
"validator": {
"attest": [
"type=provenance,disabled=true"
],
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"DOCKER_META_IMAGES": "111111111111.dkr.ecr.us-east-1.amazonaws.com/repo",
"DOCKER_META_VERSION": "docker_action-validator"
},
"labels": {
"org.opencontainers.image.created": "2024-06-17T18:54:17.585Z",
"org.opencontainers.image.description": "Experimentation repo for refactoring auto integration repo",
"org.opencontainers.image.licenses": "",
"org.opencontainers.image.revision": "50e0ecd7bf698a01710d08ce052319b8d46b50fd",
"org.opencontainers.image.source": "https://github.com/org/repo",
"org.opencontainers.image.title": "repo",
"org.opencontainers.image.url": "https://github.com/org/repo",
"org.opencontainers.image.version": "docker_action-validator"
},
"tags": [
"111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-validator"
],
"cache-from": [
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:main-tooler.cache",
"type=registry,ref=111111111111.dkr.ecr.us-east-1.amazonaws.com/repo:docker_action-tooler.cache",
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk"
],
"cache-to": [
"type=s3,blobs_prefix=cache/repo/,manifests_prefix=cache/repo/,region=us-east-1,bucket=abcdefghijk,mode=max"
],
"target": "validator",
"output": [
"type=image,push=true,push=true,push=true,push=true"
],
"pull": true,
"no-cache": false
}
}
} |
Well, it would be kind of nice for the build summary to include copyable URIs to the fully qualified tag names. For example, this is what I've been doing to easily surface the tag names to our end users: - name: Job Workflow Info
id: job_workflow_info
shell: bash
run: |
debugger_image_name="${{ fromJSON(steps.bake_prod_stages.outputs.metadata)['debugger']['image.name'] }}"
debugger_image_digest="${{ fromJSON(steps.bake_prod_stages.outputs.metadata)['debugger']['containerimage.digest'] }}"
debugger_image="${debugger_image_name}@${debugger_image_digest}"
echo "debugger_image=${debugger_image}" >> $GITHUB_OUTPUT
releaser_image_name="${{ fromJSON(steps.bake_prod_stages.outputs.metadata)['releaser']['image.name'] }}"
releaser_image_digest="${{ fromJSON(steps.bake_prod_stages.outputs.metadata)['releaser']['containerimage.digest'] }}"
releaser_image="${releaser_image_name}@${releaser_image_digest}"
echo "releaser_image=${releaser_image}" >> $GITHUB_OUTPUT
cat << EOF > $GITHUB_STEP_SUMMARY
## Prod Images
| Image tag | Digest |
|-|-|
| \`${debugger_image_name##*:}\` | \`${debugger_image_digest}\` |
| \`${releaser_image_name##*:}\` | \`${releaser_image_digest}\` |
### debugger
\`\`\`
${debugger_image}
\`\`\`
### releaser
\`\`\`
${releaser_image}
\`\`\`
EOF |
I have similar feedback on the new build summary feature: it is quite verbose in general. I actually like the "Preview" section/table(*) a lot, but the "Build inputs" section doesn't seem very useful unless someone is debugging the workflow (and in that case I would look at the full logs anyway). See here for an example of a workflow run. I'd like to request an option to hide the "Build inputs" section in a (*) while at it, I suggest adding another column with the image size :) |
When using the
docker/bake-action@v6
action, the resulting build summary are rather long, taking up quite a bit of the vertical space from the rest of the user provide build summaries, requiring much more scroller for readers.actions-toolkit/src/github.ts
Line 205 in 7b876a9
While they are nicely detailed for debugging, would it be possible to allow the end user of the resulting docker actions to dynamically configure them to be encapsulate within a togglable disclosure element, via action input?
Even if the just the
<h2>Bake definition</h2>
and<h2>Build inputs</h2>
sections had their body's nested under a collapsed disclosure element by default, that could be a big gain in reduction of line noise.Related:
The text was updated successfully, but these errors were encountered: