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

Fix fetchRegistryImageIds (which is only used for "docker push" no-op) to no longer return members of an index/manifest list #88

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

tianon
Copy link
Member

@tianon tianon commented Dec 1, 2023

This isn't the cause of docker-library/python#888, but it sure is making it hard to fix (because the image that needs to be pushed to that tag is claiming to already be pushed since it's a member of the pushed image already even though it should be pushed).

…) to no longer return members of an index/manifest list
ids := []string{}
if img.IsImageIndex() {
ids = append(ids, digest)
return ids // see note above -- this function is used for "docker push" which does not and cannot (currently) support a manifest list / image index
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// assumes the provided image name is NOT a manifest list (used for testing whether we need to "bashbrew push" or whether the remote image is already up-to-date)
// this does NOT handle authentication, and will return the empty string for repositories which require it (causing "bashbrew push" to simply shell out to "docker push" which will handle authentication appropriately)
func fetchRegistryImageIds(image string) []string {

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ff6b5f2) 73.10% compared to head (9a271ea) 73.10%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #88   +/-   ##
=======================================
  Coverage   73.10%   73.10%           
=======================================
  Files           7        7           
  Lines         714      714           
=======================================
  Hits          522      522           
  Misses        162      162           
  Partials       30       30           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tianon tianon merged commit 36b3473 into docker-library:master Dec 1, 2023
6 checks passed
@tianon tianon deleted the docker-push-on-index branch December 1, 2023 18:57
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