Skip to content

Commit

Permalink
Make "tags" arch-specific again
Browse files Browse the repository at this point in the history
This fixes edge case bugs where tags which share a sourceId but across disparate architectures will be grouped.

This can be seen concretely in https://oci.dag.dev/?image=infosiftr/moby:s390x@sha256:9a423230716c0f934e2fffa46585df1b2babc96ea0a1dd01bbd6ce29c6233aea (where `infosiftr/moby:s390x` should be _just_ the s390x build, but instead gets _all_ the architecture builds which share that same sourceId).
  • Loading branch information
tianon committed May 2, 2024
1 parent 21643d6 commit 6361ac1
Show file tree
Hide file tree
Showing 12 changed files with 1,038 additions and 860 deletions.
906 changes: 425 additions & 481 deletions .test/builds.json

Large diffs are not rendered by default.

225 changes: 158 additions & 67 deletions .test/deploy-all/out.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .test/deploy-all/test.jq
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include "deploy";

# every single ref both "library/" and arch-specific we should push to
tagged_manifests(true; .source.tags, .source.arches[.build.arch].archTags)
tagged_manifests(true; .source.arches[.build.arch].tags, .source.arches[.build.arch].archTags)
# ... converted into a list of canonical inputs for "cmd/deploy"
| deploy_objects
2 changes: 1 addition & 1 deletion .test/meta-commands/test.jq
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ include "meta";
| commands
| to_entries
| map("# <\(.key)>\n\(.value)\n# </\(.key)>")
| "# \($b.source.tags[0]) [\($b.build.arch)]\n" + join("\n")
| "# \($b.source.arches[$b.build.arch].tags[0]) [\($b.build.arch)]\n" + join("\n")
)
| join("\n\n")
Loading

0 comments on commit 6361ac1

Please sign in to comment.