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

feat: make head pull failure warning toggleable #912

Merged
merged 10 commits into from
Apr 23, 2021
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Apr 20, 2021

A suggestion for resolving #892.

This will add the command line argument --warn-on-head-failure, which can be set to always, auto (default) and never.
Where auto is the current behaviour, where registries that are known to work (and especially docker hub) will yield a warning when HEAD requests fail.
Setting it to never disables the warning, and always warns regardless of whether the registry is known to support HEAD. The last one is mostly useful for testing is not expected to be used much for the average user.

It also changes what the warnings contain. They now always include the image name and the reason for the HEAD failure.
The disabled warnings are still logged as debug, so you can still find them in your logs if you have --debug enabled.

@piksel piksel requested a review from simskij April 20, 2021 15:30
@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #912 (ba03684) into main (29f5c4b) will decrease coverage by 5.15%.
The diff coverage is 21.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #912      +/-   ##
==========================================
- Coverage   45.29%   40.14%   -5.16%     
==========================================
  Files          25       25              
  Lines        1402     1415      +13     
==========================================
- Hits          635      568      -67     
- Misses        701      785      +84     
+ Partials       66       62       -4     
Impacted Files Coverage Δ
pkg/container/client.go 0.00% <0.00%> (-12.78%) ⬇️
pkg/registry/digest/digest.go 0.00% <0.00%> (ø)
internal/flags/flags.go 51.58% <100.00%> (+0.62%) ⬆️
pkg/container/util.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/container/metadata.go 0.00% <0.00%> (-63.64%) ⬇️
pkg/container/container.go 0.00% <0.00%> (-36.71%) ⬇️
pkg/registry/registry.go 22.72% <0.00%> (+22.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 058e3c6...ba03684. Read the comment docs.

@simskij simskij force-pushed the feat/head-failure-toggle branch from d878b35 to 763b412 Compare April 20, 2021 19:12
@simskij simskij marked this pull request as ready for review April 21, 2021 07:54
Copy link
Member Author

@piksel piksel left a comment

Choose a reason for hiding this comment

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

Needs a go fmt, there's some mixed indentations

@piksel piksel force-pushed the feat/head-failure-toggle branch from b7b0784 to 3deb4c8 Compare April 21, 2021 10:03
@piksel piksel modified the milestones: v1.1.0, v1.3.0 Apr 21, 2021
@simskij simskij merged commit b4cf17d into main Apr 23, 2021
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