Skip to content
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

Docker package page shows incorrect default suggestion #7458

Closed
zanieb opened this issue Sep 17, 2024 · 5 comments · Fixed by #7568
Closed

Docker package page shows incorrect default suggestion #7458

zanieb opened this issue Sep 17, 2024 · 5 comments · Fixed by #7568
Labels
releases Related to building and distributing release artifacts of uv

Comments

@zanieb
Copy link
Member

zanieb commented Sep 17, 2024

Screenshot 2024-09-17 at 8 20 00 AM

I would expect at least the latest Python version? And probably not a specific variant?

This seems like it might be a pain to fix.

cc @samypr100

@samypr100
Copy link
Contributor

The API shows them in the order they're published :(
We'd have to disable the matrix approach if we want some kind of order.

@zanieb
Copy link
Member Author

zanieb commented Sep 17, 2024

Can we just publish the "right" one a second time after all the rest?

@samypr100
Copy link
Contributor

samypr100 commented Sep 17, 2024

Yes, I was thinking about that too, adding a final job to re-publish.

@zanieb zanieb added the releases Related to building and distributing release artifacts of uv label Sep 17, 2024
@samypr100
Copy link
Contributor

samypr100 commented Sep 18, 2024

I gave it a try and it didn't quite work as I expected, GitHub seems to sort based on when digests get pushed, so re-doing the docker-publish job at the end (which only updates the tags) didn't help and we'd have to rebuild a new image to have the digests change. It seems like a limitation on Github's side to not allow configurability of which tag gets featured. I'll keep thinking about it.

@samypr100
Copy link
Contributor

I gave it a try and it didn't quite work as I expected, GitHub seems to sort based on when digests get pushed, so re-doing the docker-publish job at the end (which only updates the tags) didn't help and we'd have to rebuild a new image to have the digests change. It seems like a limitation on Github's side to not allow configurability of which tag gets featured. I'll keep thinking about it.

I found a trick by leveraging annotations proposed in #7568 by which makes this achievable.

zanieb pushed a commit that referenced this issue Sep 20, 2024
## Summary

Closes #7458

This change adds a new job at the end of docker publish which adds
annotations the primary image digests in order to make ghcr.io rank
`ghcr.io/astral-sh/uv` at the top once again. The solution is to
annotate the index at the end during a re-publish to make ghcr.io
consider it a more updated entry than the others and rank it at the top
once again.

## Test Plan

Tested on release run on my own fork
* Packages: https:/samypr100/uv/pkgs/container/uv will show
`ghcr.io/astral-sh/uv` first once again
* Run: https:/samypr100/uv/actions/runs/10951404736
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
releases Related to building and distributing release artifacts of uv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants