Skip to content

Fix container image promotion (hopefully) #192

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

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Conversation

markgoddard
Copy link

This change modifies the way in which we promote container image tags.
Previously, the stackhpc-dev container repository was configured as a
remote, and the stackhpc repository synced with it, using include_tags
to limit to a specific tag.

Now, we use the "Add content" [1] API to add container tags from
stackhpc-dev to stackhpc. Currently we're still promoting a single tag
across all repositories, so a non-existent tag is not an error. This
will change in future.

[1] https://docs.pulpproject.org/pulp_container/restapi.html#tag/Repositories:-Container/operation/repositories_container_container_add

This change modifies the way in which we promote container image tags.
Previously, the stackhpc-dev container repository was configured as a
remote, and the stackhpc repository synced with it, using include_tags
to limit to a specific tag.

Now, we use the "Add content" [1] API to add container tags from
stackhpc-dev to stackhpc. Currently we're still promoting a single tag
across all repositories, so a non-existent tag is not an error. This
will change in future.

[1] https://docs.pulpproject.org/pulp_container/restapi.html#tag/Repositories:-Container/operation/repositories_container_container_add
@markgoddard markgoddard requested a review from a team as a code owner April 5, 2023 14:52
@markgoddard markgoddard self-assigned this Apr 5, 2023
@markgoddard
Copy link
Author

The uri tasks may need to be rewritten in python if we find this is too slow.

@markgoddard
Copy link
Author

@markgoddard
Copy link
Author

Now rewritten in Python. Seems to save about 30s for a single image promotion. Extrapolating to all images this could be significant.

https://github.com/stackhpc/stackhpc-release-train/actions/runs/4630657493/jobs/8192517775

@markgoddard markgoddard marked this pull request as draft April 6, 2023 18:48
@markgoddard
Copy link
Author

Moving the role to the collection: stackhpc/ansible-collection-pulp#59

This is available in stackhpc.pulp collection v0.5.0, and is implemented
in Python for a speed up.
@markgoddard markgoddard force-pushed the container-promote-mk2 branch from 1f53e24 to 209096e Compare April 11, 2023 09:25
@markgoddard markgoddard marked this pull request as ready for review April 11, 2023 09:25
@markgoddard markgoddard enabled auto-merge April 11, 2023 09:26
@markgoddard markgoddard merged commit 2332b01 into main Apr 11, 2023
@markgoddard markgoddard deleted the container-promote-mk2 branch April 11, 2023 09:27
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.

2 participants