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

Drop docker prefix from storage driver API user agent #3979

Merged
merged 1 commit into from Aug 14, 2023

Conversation

milosgajdos
Copy link
Member

@milosgajdos milosgajdos commented Aug 13, 2023

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (69fe169) 55.91% compared to head (02a92ef) 55.91%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3979   +/-   ##
=======================================
  Coverage   55.91%   55.91%           
=======================================
  Files         110      110           
  Lines       11057    11057           
=======================================
  Hits         6183     6183           
  Misses       4185     4185           
  Partials      689      689           
Files Changed Coverage Δ
registry/handlers/app.go 46.56% <100.00%> (ø)

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

@@ -118,7 +118,7 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
if storageParams == nil {
storageParams = make(configuration.Parameters)
}
storageParams["useragent"] = fmt.Sprintf("docker-distribution/%s %s", version.Version, runtime.Version())
storageParams["useragent"] = fmt.Sprintf("distribution/%s %s", version.Version, runtime.Version())
Copy link
Member

Choose a reason for hiding this comment

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

I guess cncf-distribution could be an alternative.

That said; it looks like this unconditionally overwrites the option (if present) from storageParams, which may be intentional (if it should not be configurable through the config-file), but wondering if this should be passed as argument: if this code is also used as library code in other products, it should probably be configurable?

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436 wy65701436 merged commit 5410c55 into distribution:main Aug 14, 2023
12 checks passed
@milosgajdos milosgajdos deleted the user-agent branch August 14, 2023 18:09
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.

User-Agent for storage requests is still docker-distribution
4 participants