Skip to content

(cherry-pick) Add User-Agent to all request#23054

Merged
wy65701436 merged 1 commit into
goharbor:release-2.15.0from
stonezdj:2.15_add_user_agent_header
Apr 3, 2026
Merged

(cherry-pick) Add User-Agent to all request#23054
wy65701436 merged 1 commit into
goharbor:release-2.15.0from
stonezdj:2.15_add_user_agent_header

Conversation

@stonezdj

Copy link
Copy Markdown
Contributor

set user agent to avoid some registry (e.g. docker hub) return 403 when user agent is not set to harbor-registry-client
fixes #23025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

 set user agent to avoid some registry (e.g. docker hub) return 403 when user agent is not set to harbor-registry-client
 fixes goharbor#23025

Signed-off-by: stonezdj <[email protected]>
@stonezdj
stonezdj requested a review from a team as a code owner March 31, 2026 03:13
@stonezdj stonezdj changed the title Add User-Agent to all request (cherry-pick) Add User-Agent to all request Mar 31, 2026
@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-2.15.0@e1961e3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pkg/registry/auth/authorizer.go 42.85% 3 Missing and 1 partial ⚠️
src/pkg/reg/adapter/aliacr/openapi.go 0.00% 2 Missing ⚠️
src/server/registry/manifest.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##             release-2.15.0   #23054   +/-   ##
=================================================
  Coverage                  ?   66.02%           
=================================================
  Files                     ?     1073           
  Lines                     ?   116471           
  Branches                  ?     2937           
=================================================
  Hits                      ?    76896           
  Misses                    ?    35322           
  Partials                  ?     4253           
Flag Coverage Δ
unittests 66.02% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/common/utils/utils.go 82.23% <100.00%> (ø)
src/pkg/registry/auth/bearer/authorizer.go 64.63% <100.00%> (ø)
src/pkg/registry/client.go 45.04% <100.00%> (ø)
src/server/registry/manifest.go 68.15% <0.00%> (ø)
src/pkg/reg/adapter/aliacr/openapi.go 0.00% <0.00%> (ø)
src/pkg/registry/auth/authorizer.go 45.12% <42.85%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chlins chlins left a comment

Copy link
Copy Markdown
Member

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 47762e5 into goharbor:release-2.15.0 Apr 3, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants