Skip to content

Conversation

Strainy
Copy link

@Strainy Strainy commented Oct 8, 2025

Comprehensive Summary of your change

This change adds a new adapter for Google Artifact Registry. We've been using Google ADC (via Workload Identity Federation) in combination with this adapter for a number of months. All working well.

Issue being fixed

Fixes #20682

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.

@Strainy Strainy requested a review from a team as a code owner October 8, 2025 00:22
@Vad1mo Vad1mo added the release-note/new-feature New Harbor Feature label Oct 8, 2025
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.67%. Comparing base (c8c11b4) to head (a86f7c3).
⚠️ Report is 573 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #22429      +/-   ##
==========================================
+ Coverage   45.36%   46.67%   +1.30%     
==========================================
  Files         244      252       +8     
  Lines       13333    14255     +922     
  Branches     2719     2927     +208     
==========================================
+ Hits         6049     6653     +604     
- Misses       6983     7246     +263     
- Partials      301      356      +55     
Flag Coverage Δ
unittests 46.67% <ø> (+1.30%) ⬆️

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

Files with missing lines Coverage Δ
...rojects/create-project/create-project.component.ts 49.64% <ø> (-0.78%) ⬇️
...t-policy-config/project-policy-config.component.ts 52.65% <ø> (+3.90%) ⬆️

... and 176 files with indirect coverage changes

🚀 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.

Copy link
Member

@Vad1mo Vad1mo left a comment

Choose a reason for hiding this comment

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

This is a needed addition...

@Vad1mo Vad1mo enabled auto-merge (squash) October 8, 2025 06:58
@Vad1mo Vad1mo requested a review from Copilot October 8, 2025 06:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Google Artifact Registry (GAR) adapter with OAuth2 authentication support to Harbor's registry replication system. The adapter extends Harbor's capability to proxy/replicate from Google's newer GAR service alongside the existing GCR support.

  • Implements OAuth2 authentication for Google Artifact Registry
  • Adds comprehensive adapter implementation with proper endpoint patterns
  • Updates UI and configuration to include GAR in supported registry types

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/portal/src/i18n/lang/en-us-lang.json Updates tooltip text to include Google GAR in supported proxy cache registries
src/portal/src/app/base/project/project-config/project-policy-config/project-policy-config.component.ts Adds google-gar to supported registry type query string
src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.ts Adds google-gar to supported registry type query string
src/pkg/reg/model/registry.go Defines RegistryTypeGoogleGar constant
src/pkg/reg/manager.go Registers the Google GAR adapter import
src/pkg/reg/adapter/googlegar/auth/* Implements OAuth2 authentication with comprehensive test coverage
src/pkg/reg/adapter/googlegar/adapter* Core GAR adapter implementation with registry pattern definitions
src/pkg/chart/testdata/harbor-schema*/templates/core/core-cm.yaml Updates permitted registry types to include google-gar
src/jobservice/job/impl/replication/replication.go Imports the googlegar adapter for job service usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Vad1mo Vad1mo added the doc-impact Engineering issues that will require a change in user docs label Oct 8, 2025
auto-merge was automatically disabled October 8, 2025 21:29

Head branch was pushed to by a user without write access

@stonezdj stonezdj self-requested a review October 13, 2025 06:46
@stonezdj
Copy link
Contributor

Thanks for your contribution, could you please demo this adapter in our community meeting? if you could add a CI to verify the GAR adapter would be appreciated.

@stonezdj stonezdj requested a review from chlins October 13, 2025 09:13
@Strainy
Copy link
Author

Strainy commented Oct 13, 2025

Thanks for your contribution, could you please demo this adapter in our community meeting?

I'm quite pressed for time at the moment, so won't be able to do this.

if you could add a CI to verify the GAR adapter would be appreciated.

I've added unit tests. Is there something else I need to do to "add a CI"? Maybe an example is in order 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-impact Engineering issues that will require a change in user docs release-note/new-feature New Harbor Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup proxy cache to Google Artifact registry is failing

5 participants