Skip to content

Conversation

bupd
Copy link
Contributor

@bupd bupd commented Dec 22, 2024

Single Active Replication per replication policy

Proposal: goharbor/community#256

Summary

This PR addresses a long-standing issue where overlapping replications of the same policies can occur in Harbor, leading to unnecessary resource consumption and poor performance. By introducing a "Single Active Replication" checkbox in the replication policy, it ensures that replication tasks for the same policy do not run if there is already a replication running for the same policy, preventing bandwidth overload and queue backups, especially for large artifacts.

Similar Issues

Related Issues

Why do we need this

  1. Users have for long requesting this feature to have single replication execution per policy.
  2. It makes no sense to run replication in parallel for same replication policy.

Changes Made

  • Added Single active replication Checkbox in Replication UI.
  • Updated Replication Policy Schema.
  • Added single_active_replication column in replication_policy table in sql.

Screenshots

image

Screenshot_2025-01-08_18-44-27

Observation on Replication Performance with and without Feature

Speed Test Results:

Upload Speed: 9.50 Mbps (Data Used: 4.3 MB)
Latency: 37.96 ms (Jitter: 1.76 ms, Min: 25.11 ms, Max: 43.32 ms)
Packet Loss: 0.0%
Result URL: Speedtest Result

Images to Replicate: Variations of docker.io/vad1mo/1gb-random-file

Workflow 1 (with Feature):

1 x image (512 MB)
3 x images (~1.5 GB)
From: reg1.bupd.xyz to reg2.bupd.xyz
Replication: Normal
Started: 2:27 PM
Completed: 2:49 PM
Bandwidth Used: 1.42 GB
Theoretical Time: 22.5 minutes for 1.5 GB
Actual Time: 22 minutes (No packet loss or bandwidth issues)

Insight

Replication with the feature enabled completed within the expected timeframe, showing stable upload speed and no packet loss.

Workflow 2 (without Feature):

Started: 2:55 PM
Name: Destroyer
Bandwidth Used: 13+ GB
Result: Failed
Time Taken: ~4+hrs

Status of Instance (no longer functioning)

Screenshot_2025-01-08_19-25-59

Todo

  • Add Tests

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.

Fix #19937

@bupd bupd added the release-note/new-feature New Harbor Feature label Dec 22, 2024
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

❌ Patch coverage is 41.02564% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.88%. Comparing base (c8c11b4) to head (3d6d810).
⚠️ Report is 532 commits behind head on main.

Files with missing lines Patch % Lines
src/server/v2.0/handler/replication.go 0.00% 13 Missing ⚠️
src/controller/replication/execution.go 70.00% 4 Missing and 2 partials ⚠️
...ion/create-edit-rule/create-edit-rule.component.ts 0.00% 2 Missing ⚠️
...v/replication/replication/replication.component.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #21347       +/-   ##
===========================================
+ Coverage   45.36%   65.88%   +20.51%     
===========================================
  Files         244     1072      +828     
  Lines       13333   115932   +102599     
  Branches     2719     2927      +208     
===========================================
+ Hits         6049    76384    +70335     
- Misses       6983    35315    +28332     
- Partials      301     4233     +3932     
Flag Coverage Δ
unittests 65.88% <41.02%> (+20.51%) ⬆️

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

Files with missing lines Coverage Δ
src/controller/replication/model/model.go 48.26% <100.00%> (ø)
src/pkg/replication/model/model.go 100.00% <ø> (ø)
...ion/create-edit-rule/create-edit-rule.component.ts 36.03% <0.00%> (+0.31%) ⬆️
...v/replication/replication/replication.component.ts 22.60% <0.00%> (+0.14%) ⬆️
src/controller/replication/execution.go 69.03% <70.00%> (ø)
src/server/v2.0/handler/replication.go 0.00% <0.00%> (ø)

... and 980 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.

@bupd bupd force-pushed the feat/add-job-skipper branch from 6763a2c to a997836 Compare December 22, 2024 17:43
@bupd bupd marked this pull request as ready for review December 22, 2024 18:23
@bupd bupd requested a review from a team as a code owner December 22, 2024 18:23
@wy65701436
Copy link
Contributor

Thanks, @bupd, for your contribution! I believe this is a valuable new feature for Harbor that should follow the proposal process.

There are several questions we need to briefly discuss:

  • What happens if the execution gets stuck in the 'running' status?
  • How do we determine the relationship between the replication policy and the execution instance — by ID? And what happens if the policy content is updated after the execution begins?
  • During the replication job (at least in Harbor-to-Harbor replication), Harbor skips artifacts that have already been successfully replicated. So, we should consider how much additional benefit this feature will bring.

@Vad1mo Vad1mo enabled auto-merge (squash) December 23, 2024 16:50
@bupd bupd changed the title Add Option to Skip Replication Policy Execution If an Execution is already running feat: Add Option to Prevent Overlapping Replications of the Same Artifact in Harbor Dec 23, 2024
@tpoxa
Copy link
Contributor

tpoxa commented Dec 28, 2024

Thanks, @bupd, for your contribution! I believe this is a valuable new feature for Harbor that should follow the proposal process.

There are several questions we need to briefly discuss:

  • What happens if the execution gets stuck in the 'running' status?

We were planning to use JobServiceMonitorClient to get the current state of job observations. As long observation says it's running - a new execution will be skipped. I believe we should fix the problem with stuck separately. What are your thoughts about that?

  • How do we determine the relationship between the replication policy and the execution instance — by ID? And what happens if the policy content is updated after the execution begins?

Indeed PolicyID was never needed before. We can add it anyway to the job arguments so we can scan observations, parse job arguments and match policyID with the current.

  • During the replication job (at least in Harbor-to-Harbor replication), Harbor skips artifacts that have already been successfully replicated. So, we should consider how much additional benefit this feature will bring.

I believe even checking an artefact for existence produces an additonal HTTP request. So, we still adding some extra efficiency.

@Vad1mo
Copy link
Member

Vad1mo commented Dec 30, 2024

  • During the replication job (at least in Harbor-to-Harbor replication), Harbor skips artifacts that have already been successfully replicated. So, we should consider how much additional benefit this feature will bring.

Regarding that statement. there is a fundamental deficit with harbor replications, when the layer is in the copy process, new replication will try to copy the same blob again. If you have a slow connection like DSL the same blob will be copied over and over again. This results in the domino effect. Each new replication halves the throughput, resulting in slower transfers, and because all replications run in parallel, the same effect happens with the next blob/layer.

We have made an experiment with:

  • Copying 1 GiB image
  • Limit transfer speed 1 Mbit, per replication
    • Please note that we set the 1Mib per replication. On a real DSL, 3G connection, the total bandwidth (1 Mbit) would not be shared across all replications, so each replication would get 1/n of the bandwidth.
    • So the observed time needs to be multiplied by n.
  • Replication every minute
  • Replication time with "Prevent Overlapping Replications" Enabled ->: 22 min
  • Replications time with "Prevent Overlapping Replications" Disabled -> : Failed after 4+ hours

@bupd bupd force-pushed the feat/add-job-skipper branch 3 times, most recently from fa151c0 to 9d9b400 Compare January 8, 2025 01:14
@bupd
Copy link
Contributor Author

bupd commented Jan 8, 2025

Hello @wy65701436

The below are my observations.

  • What happens if the execution gets stuck in the 'running' status?

While single active replication is checked. Replication executions per policy will become to atmost one. So if an execution is already running. other scheduled executions will be defered.

  • How do we determine the relationship between the replication policy and the execution instance — by ID? And what happens if the policy content is updated after the execution begins?
  1. each execution will have a replication policyID attached to it. so on executing the new jobs we check if there is any jobs that are already running with same execution policyID. if we find any jobs that are in progress. we will defer the executions until the previous job completes.
  2. By design, once harbor replication execution starts the policy content is fixed. and changes made to replication policy will only reflect in upcoming replication executions.
  • During the replication job (at least in Harbor-to-Harbor replication), Harbor skips artifacts that have already been successfully replicated. So, we should consider how much additional benefit this feature will bring.

Yes exactly, Harbor only skips artifacts that have already been successfully replicated.
So in typical scenario harbor will try copying the same layers with different jobs pushing the same layer.

In the below scenario I tried replicating three images each of size: 512mb. but the resulting repository quota
resulting something similar like this.

Project Quota

Where the quota used should only be less than 1.5gb.

Screenshot_2025-01-08_16-02-46
4.77GB is used here for project due to replication jobs copying the same layer simultaneously.
this clearly shows the quota consumed is greater than the images needed to be replicated.

The below is the overall quota

Attaching here for reference.

Screenshot_2025-01-08_16-13-42

Thanks

You can check the two instances used on this experiment: reg1.bupd.xyz & reg2.bupd.xyz

@bupd
Copy link
Contributor Author

bupd commented Jan 8, 2025

Observation on Replication Performance with and without Feature

Speed Test Results:

Upload Speed: 9.50 Mbps (Data Used: 4.3 MB)
Latency: 37.96 ms (Jitter: 1.76 ms, Min: 25.11 ms, Max: 43.32 ms)
Packet Loss: 0.0%
Result URL: Speedtest Result

Images to Replicate: Variations of docker.io/vad1mo/1gb-random-file

Workflow 1 (with Feature):

1 x image (512 MB)
3 x images (~1.5 GB)
From: reg1.bupd.xyz to reg2.bupd.xyz
Replication: Normal
Started: 2:27 PM
Completed: 2:49 PM
Bandwidth Used: 1.42 GB
Theoretical Time: 22.5 minutes for 1.5 GB
Actual Time: 22 minutes (No packet loss or bandwidth issues)

Insight

Replication with the feature enabled completed within the expected timeframe, showing stable upload speed and no packet loss.

Workflow 2 (without Feature):

Started: 2:55 PM
Name: Destroyer
Bandwidth Used: 13+ GB
Result: Failed
Time Taken: ~4+hrs (failed to complete)

Status of Instance

Screenshot_2025-01-08_19-25-59

Insight

The replication process failed without the feature enabled, highlighting that the feature is likely essential for successful image transfers between reg1.bupd.xyz and reg2.bupd.xyz. This indicates that the feature could be critical for ensuring stable uploads and completing transfers within the expected time.

Conclusion:

This observation suggests that this feature is necessary for reliable replication between registries. The data transfer rates and lack of packet loss when the feature is used make it an essential component for stable image replication.

@bupd
Copy link
Contributor Author

bupd commented Jan 9, 2025

you can say a workaround here:

please set scheduled replication interval more than enough time it needs. to be safe.
-- or --
The cron string is 0 */2 * * * *, it means that the replication is start every 2 minutes, you should always keep the schedule interval longer than a single job complete time.
#20532 (comment)

The workaround of setting a longer replication interval, like once a day, fails to address the need for timely synchronization across registries. For users who rely on Harbor to maintain identical registries at different locations, frequent replication (e.g., every 5 minutes) is necessary to ensure minimal discrepancies between registries. By suggesting a longer interval, users may end up with outdated or inconsistent images, undermining the core functionality of replication.

Thanks.

auto-merge was automatically disabled January 20, 2025 00:15

Head branch was pushed to by a user without write access

@bupd bupd marked this pull request as draft January 23, 2025 19:24
@bupd bupd force-pushed the feat/add-job-skipper branch 2 times, most recently from 9f4e838 to aae5523 Compare July 25, 2025 10:55
@bupd bupd force-pushed the feat/add-job-skipper branch 2 times, most recently from 9c1f885 to 02bdb96 Compare July 29, 2025 12:28
@bupd bupd requested a review from reasonerjt July 29, 2025 12:34
Copy link
Contributor

@reasonerjt reasonerjt 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
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@reasonerjt reasonerjt enabled auto-merge (squash) August 11, 2025 08:48
@reasonerjt reasonerjt disabled auto-merge August 11, 2025 08:49
@bupd bupd force-pushed the feat/add-job-skipper branch 3 times, most recently from 43da9ea to b4d5901 Compare August 11, 2025 09:05
@reasonerjt reasonerjt enabled auto-merge (squash) August 11, 2025 09:06
* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>
auto-merge was automatically disabled August 11, 2025 09:22

Head branch was pushed to by a user without write access

@bupd bupd force-pushed the feat/add-job-skipper branch from b4d5901 to 3d6d810 Compare August 11, 2025 09:22
@wy65701436 wy65701436 merged commit 2210373 into goharbor:main Aug 11, 2025
11 of 12 checks passed
Vad1mo added a commit to container-registry/harbor-next that referenced this pull request Sep 3, 2025
* Add 400 code response in swagger.yaml for updateRegistry updateReplicationPolicy and headProject (goharbor#22165)

Signed-off-by: yuzhipeng <[email protected]>

* Update FixVersion and ScoreV3 (goharbor#22007)

Set Fix and CVE3Score in VulnerabilityRecord from VulnerabilityItem.

Follow-up of goharbor#21915
Fixes goharbor#21463

Signed-off-by: Spyros Trigazis <[email protected]>

* Add "status" of CVEs to artfact scan report (goharbor#22177)

This commit adds the field "status" to the struct of a vulnerability and adds
column "status" to vulnerability record table.  It makes sure the statuses
of CVEs returned by trivy scanner are persisted and can be returned via
the vulnerabilities addition API of an artifact.

Signed-off-by: Daniel Jiang <[email protected]>

* Improve portal README.md formatting and clarity (goharbor#22173)

improving the portal readme file

Signed-off-by: rgcr <[email protected]>

* chore: Updated RELEASE.md by updating Minor Release Support Map (goharbor#22145)

Updated the Minor Release Support Matrix to include v2.13

Signed-off-by: Mooneeb Hussain <[email protected]>

* Add status field to the API on secyurityHub (goharbor#22182)

This commit makes change to the API GET /api/v2.0/vul to make it include
"status" of CVEs in the response.

It also makes update in the UI to add the "Status" column to the data
grids in security hub and artifact details page.

Signed-off-by: Daniel Jiang <[email protected]>

* Set MAX_JOB_DURATION_SECONDS from jobservice config.yml (goharbor#22116)

Signed-off-by: stonezdj <[email protected]>

* clean up project metadata for tag retention policy after deletion (goharbor#22174)

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.2 to 3.18.3 in /src (goharbor#22113)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.3 to 3.18.4 in /src (goharbor#22188)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove testcase Open Image Scanners doc page (goharbor#22180)

Signed-off-by: stonezdj <[email protected]>

* Don't always skip vuln check when artifact is not scannable (goharbor#22187)

fixes goharbor#22143

This commit makes update to the vulnerable policy middleware.  So that
it will skip the sheck only when the artifact is not scannable AND it
does not have a scan report.

Signed-off-by: Daniel Jiang <[email protected]>

* Display download url for BUILD_PACKAGE action (goharbor#22197)

Signed-off-by: stonezdj <[email protected]>

* add the replicaiton adapter whitelist (goharbor#22198)

fixes goharbor#21925

According to https://github.com/goharbor/harbor/wiki/Harbor-Replicaiton-Adapter-Owner, some replication adapters are no longer actively maintained by the Harbor community. To address this, a whitelist environment variable is introduced to define the list of actively supported adapters, which will be used by the Harbor portal and API to display and allow usage.

If you still wish to view and use the unsupported or inactive adapters, you must manually update the whitelist and include the desired adapter names. For the list of adapter names, refer to https://github.com/goharbor/harbor/blob/main/src/pkg/reg/model/registry.go#L22

Signed-off-by: wang yan <[email protected]>

* fix: correct the permission of project maintainer role for webhook policy (goharbor#22135)

Signed-off-by: chlins <[email protected]>

* update the orm filter func (goharbor#22208)

to extend the enhancement from goharbor#21924 to fuzzy and range match. After the enhance, the orm.ExerSep is not supported in any sort of query keywords.

Signed-off-by: wy65701436 <[email protected]>

* bump golang version (goharbor#22205)

to the latest golang version v1.24.5 from v1.24.3

Signed-off-by: wy65701436 <[email protected]>

* Add HTTP 409 error when creating robot account (goharbor#22201)

fixes goharbor#22107

Signed-off-by: stonezdj <[email protected]>

* feat: support raw format for CNAI model (goharbor#22040)

Signed-off-by: chlins <[email protected]>

* The tag retention job failed with 403 error message (goharbor#22159)

fixes goharbor#22141

Signed-off-by: stonezdj <[email protected]>

* remove extra build_base=false && pull_base_from_dockerhub=false check logic (goharbor#22233)

remove extra build_base=false && pull_base_from_dockerhub=false logic
we do not block the case using local chached image(docker build --pull=false) while build_base=false
However we need gurantee always pull latest image while build package
And when there's some rate limit issue in the CICD situation we could set pull_base_from_dockerhub=false

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.19 to 1.1.25 in /src (goharbor#22225)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.19 to 1.1.25.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.19...v1.1.25)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>

* Delete local cache if the artifact doesn't exist in upstream registry (goharbor#22175)

fixes goharbor#20596

Signed-off-by: stonezdj <[email protected]>

* update the support list of proxy cache (goharbor#22237)

According to PR goharbor#22198, some inactive adapters have been removed from the default adapter list.
This pull request updates PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE accordingly, since the list of proxy cache adapters should be a subset of the replication adapters.

Signed-off-by: wy65701436 <[email protected]>

* bump go version (goharbor#22238)

* feat: Single Active Replication (goharbor#21347)

feat(replication): add Single Active Replication per policy

* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>

* bump base verson for v2.15.0 (goharbor#22241)

Signed-off-by: wy65701436 <[email protected]>

* build base images (goharbor#22249)

1, downgrade the base version to 2.14, and update it whenever we have the release-2.14.0 branch.
2, refresh the base images bses on the latest code.

Signed-off-by: wy65701436 <[email protected]>

* Upload build logs to github artifact (goharbor#22223)

Upload log files to github with 5 day retention

Signed-off-by: stonezdj <[email protected]>

* add prepare migration script for 2.14.0 (goharbor#22247)

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.4 to 3.18.5 in /src (goharbor#22258)

Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.18.4 to 3.18.5.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.18.4...v3.18.5)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/checkout from 3 to 5 (goharbor#22250)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.25 to 1.1.26 in /src (goharbor#22244)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.25 to 1.1.26.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.25...v1.1.26)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Return the Resport when the scanner is unhealthy (goharbor#22255)

This commit fixes goharbor#22254
It updates the "GetReport" function, such that when the scanner is
unhealthy, and we can't know the the artifact is supported, we will
still try to return the report stored in DB.

Signed-off-by: Daniel Jiang <[email protected]>

* Refine the sql to query non empty repositories (goharbor#22269)

use exists instead of in condition

Signed-off-by: stonezdj <[email protected]>

* chore(deps): bump github.com/beego/beego/v2 from 2.3.6 to 2.3.8 in /src (goharbor#22282)

Bumps [github.com/beego/beego/v2](https://github.com/beego/beego) from 2.3.6 to 2.3.8.
- [Release notes](https://github.com/beego/beego/releases)
- [Changelog](https://github.com/beego/beego/blob/master/CHANGELOG.md)
- [Commits](beego/beego@v2.3.6...v2.3.8)

---
updated-dependencies:
- dependency-name: github.com/beego/beego/v2
  dependency-version: 2.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/prometheus/client_model from 0.6.1 to 0.6.2 in /src (goharbor#22283)

chore(deps): bump github.com/prometheus/client_model in /src

Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](prometheus/client_model@v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-version: 0.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/cloudevents/sdk-go/v2 from 2.15.2 to 2.16.1 in /src (goharbor#22281)

chore(deps): bump github.com/cloudevents/sdk-go/v2 in /src

Bumps [github.com/cloudevents/sdk-go/v2](https://github.com/cloudevents/sdk-go) from 2.15.2 to 2.16.1.
- [Release notes](https://github.com/cloudevents/sdk-go/releases)
- [Commits](cloudevents/sdk-go@v2.15.2...v2.16.1)

---
updated-dependencies:
- dependency-name: github.com/cloudevents/sdk-go/v2
  dependency-version: 2.16.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/go-openapi/swag from 0.23.0 to 0.23.1 in /src (goharbor#22243)

chore(deps): bump github.com/go-openapi/swag in /src

Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.23.0 to 0.23.1.
- [Commits](go-openapi/swag@v0.23.0...v0.23.1)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/swag
  dependency-version: 0.23.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.26 to 1.1.29 in /src (goharbor#22284)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.26 to 1.1.29.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.26...v1.1.29)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update README.md (#48)

Describe whats different in next

Signed-off-by: Vadim Bauer <[email protected]>

* Update README.md (#54)

Signed-off-by: Vadim Bauer <[email protected]>

* Correct conformance_test GitHub Actions workflow at line 31 (merges into #64)

---------

Signed-off-by: yuzhipeng <[email protected]>
Signed-off-by: Spyros Trigazis <[email protected]>
Signed-off-by: Daniel Jiang <[email protected]>
Signed-off-by: rgcr <[email protected]>
Signed-off-by: Mooneeb Hussain <[email protected]>
Signed-off-by: stonezdj <[email protected]>
Signed-off-by: my036811 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: wang yan <[email protected]>
Signed-off-by: chlins <[email protected]>
Signed-off-by: wy65701436 <[email protected]>
Signed-off-by: stonezdj <[email protected]>
Signed-off-by: bupd <[email protected]>
Signed-off-by: Vadim Bauer <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
Co-authored-by: yuzhipeng <[email protected]>
Co-authored-by: Spyros Trigazis <[email protected]>
Co-authored-by: Daniel Jiang <[email protected]>
Co-authored-by: Roger <[email protected]>
Co-authored-by: Moon <[email protected]>
Co-authored-by: stonezdj(Daojun Zhang) <[email protected]>
Co-authored-by: miner <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>
Co-authored-by: Wang Yan <[email protected]>
Co-authored-by: Chlins Zhang <[email protected]>
Co-authored-by: Vadim Bauer <[email protected]>
Co-authored-by: cubic Bot <[email protected]>
Vad1mo added a commit to container-registry/harbor-next that referenced this pull request Sep 3, 2025
* Add 400 code response in swagger.yaml for updateRegistry updateReplicationPolicy and headProject (goharbor#22165)

Signed-off-by: yuzhipeng <[email protected]>

* Update FixVersion and ScoreV3 (goharbor#22007)

Set Fix and CVE3Score in VulnerabilityRecord from VulnerabilityItem.

Follow-up of goharbor#21915
Fixes goharbor#21463

Signed-off-by: Spyros Trigazis <[email protected]>

* Add "status" of CVEs to artfact scan report (goharbor#22177)

This commit adds the field "status" to the struct of a vulnerability and adds
column "status" to vulnerability record table.  It makes sure the statuses
of CVEs returned by trivy scanner are persisted and can be returned via
the vulnerabilities addition API of an artifact.

Signed-off-by: Daniel Jiang <[email protected]>

* Improve portal README.md formatting and clarity (goharbor#22173)

improving the portal readme file

Signed-off-by: rgcr <[email protected]>

* chore: Updated RELEASE.md by updating Minor Release Support Map (goharbor#22145)

Updated the Minor Release Support Matrix to include v2.13

Signed-off-by: Mooneeb Hussain <[email protected]>

* Add status field to the API on secyurityHub (goharbor#22182)

This commit makes change to the API GET /api/v2.0/vul to make it include
"status" of CVEs in the response.

It also makes update in the UI to add the "Status" column to the data
grids in security hub and artifact details page.

Signed-off-by: Daniel Jiang <[email protected]>

* Set MAX_JOB_DURATION_SECONDS from jobservice config.yml (goharbor#22116)

Signed-off-by: stonezdj <[email protected]>

* clean up project metadata for tag retention policy after deletion (goharbor#22174)

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.2 to 3.18.3 in /src (goharbor#22113)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.3 to 3.18.4 in /src (goharbor#22188)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove testcase Open Image Scanners doc page (goharbor#22180)

Signed-off-by: stonezdj <[email protected]>

* Don't always skip vuln check when artifact is not scannable (goharbor#22187)

fixes goharbor#22143

This commit makes update to the vulnerable policy middleware.  So that
it will skip the sheck only when the artifact is not scannable AND it
does not have a scan report.

Signed-off-by: Daniel Jiang <[email protected]>

* Display download url for BUILD_PACKAGE action (goharbor#22197)

Signed-off-by: stonezdj <[email protected]>

* add the replicaiton adapter whitelist (goharbor#22198)

fixes goharbor#21925

According to https://github.com/goharbor/harbor/wiki/Harbor-Replicaiton-Adapter-Owner, some replication adapters are no longer actively maintained by the Harbor community. To address this, a whitelist environment variable is introduced to define the list of actively supported adapters, which will be used by the Harbor portal and API to display and allow usage.

If you still wish to view and use the unsupported or inactive adapters, you must manually update the whitelist and include the desired adapter names. For the list of adapter names, refer to https://github.com/goharbor/harbor/blob/main/src/pkg/reg/model/registry.go#L22

Signed-off-by: wang yan <[email protected]>

* fix: correct the permission of project maintainer role for webhook policy (goharbor#22135)

Signed-off-by: chlins <[email protected]>

* update the orm filter func (goharbor#22208)

to extend the enhancement from goharbor#21924 to fuzzy and range match. After the enhance, the orm.ExerSep is not supported in any sort of query keywords.

Signed-off-by: wy65701436 <[email protected]>

* bump golang version (goharbor#22205)

to the latest golang version v1.24.5 from v1.24.3

Signed-off-by: wy65701436 <[email protected]>

* Add HTTP 409 error when creating robot account (goharbor#22201)

fixes goharbor#22107

Signed-off-by: stonezdj <[email protected]>

* feat: support raw format for CNAI model (goharbor#22040)

Signed-off-by: chlins <[email protected]>

* The tag retention job failed with 403 error message (goharbor#22159)

fixes goharbor#22141

Signed-off-by: stonezdj <[email protected]>

* remove extra build_base=false && pull_base_from_dockerhub=false check logic (goharbor#22233)

remove extra build_base=false && pull_base_from_dockerhub=false logic
we do not block the case using local chached image(docker build --pull=false) while build_base=false
However we need gurantee always pull latest image while build package
And when there's some rate limit issue in the CICD situation we could set pull_base_from_dockerhub=false

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.19 to 1.1.25 in /src (goharbor#22225)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.19 to 1.1.25.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.19...v1.1.25)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>

* Delete local cache if the artifact doesn't exist in upstream registry (goharbor#22175)

fixes goharbor#20596

Signed-off-by: stonezdj <[email protected]>

* update the support list of proxy cache (goharbor#22237)

According to PR goharbor#22198, some inactive adapters have been removed from the default adapter list.
This pull request updates PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE accordingly, since the list of proxy cache adapters should be a subset of the replication adapters.

Signed-off-by: wy65701436 <[email protected]>

* bump go version (goharbor#22238)

* feat: Single Active Replication (goharbor#21347)

feat(replication): add Single Active Replication per policy

* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>

* bump base verson for v2.15.0 (goharbor#22241)

Signed-off-by: wy65701436 <[email protected]>

* build base images (goharbor#22249)

1, downgrade the base version to 2.14, and update it whenever we have the release-2.14.0 branch.
2, refresh the base images bses on the latest code.

Signed-off-by: wy65701436 <[email protected]>

* Upload build logs to github artifact (goharbor#22223)

Upload log files to github with 5 day retention

Signed-off-by: stonezdj <[email protected]>

* add prepare migration script for 2.14.0 (goharbor#22247)

Signed-off-by: my036811 <[email protected]>

* chore(deps): bump helm.sh/helm/v3 from 3.18.4 to 3.18.5 in /src (goharbor#22258)

Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.18.4 to 3.18.5.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.18.4...v3.18.5)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.18.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/checkout from 3 to 5 (goharbor#22250)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.25 to 1.1.26 in /src (goharbor#22244)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.25 to 1.1.26.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.25...v1.1.26)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Return the Resport when the scanner is unhealthy (goharbor#22255)

This commit fixes goharbor#22254
It updates the "GetReport" function, such that when the scanner is
unhealthy, and we can't know the the artifact is supported, we will
still try to return the report stored in DB.

Signed-off-by: Daniel Jiang <[email protected]>

* Refine the sql to query non empty repositories (goharbor#22269)

use exists instead of in condition

Signed-off-by: stonezdj <[email protected]>

* chore(deps): bump github.com/beego/beego/v2 from 2.3.6 to 2.3.8 in /src (goharbor#22282)

Bumps [github.com/beego/beego/v2](https://github.com/beego/beego) from 2.3.6 to 2.3.8.
- [Release notes](https://github.com/beego/beego/releases)
- [Changelog](https://github.com/beego/beego/blob/master/CHANGELOG.md)
- [Commits](beego/beego@v2.3.6...v2.3.8)

---
updated-dependencies:
- dependency-name: github.com/beego/beego/v2
  dependency-version: 2.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/prometheus/client_model from 0.6.1 to 0.6.2 in /src (goharbor#22283)

chore(deps): bump github.com/prometheus/client_model in /src

Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](prometheus/client_model@v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-version: 0.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/cloudevents/sdk-go/v2 from 2.15.2 to 2.16.1 in /src (goharbor#22281)

chore(deps): bump github.com/cloudevents/sdk-go/v2 in /src

Bumps [github.com/cloudevents/sdk-go/v2](https://github.com/cloudevents/sdk-go) from 2.15.2 to 2.16.1.
- [Release notes](https://github.com/cloudevents/sdk-go/releases)
- [Commits](cloudevents/sdk-go@v2.15.2...v2.16.1)

---
updated-dependencies:
- dependency-name: github.com/cloudevents/sdk-go/v2
  dependency-version: 2.16.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/go-openapi/swag from 0.23.0 to 0.23.1 in /src (goharbor#22243)

chore(deps): bump github.com/go-openapi/swag in /src

Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.23.0 to 0.23.1.
- [Commits](go-openapi/swag@v0.23.0...v0.23.1)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/swag
  dependency-version: 0.23.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/volcengine/volcengine-go-sdk from 1.1.26 to 1.1.29 in /src (goharbor#22284)

chore(deps): bump github.com/volcengine/volcengine-go-sdk in /src

Bumps [github.com/volcengine/volcengine-go-sdk](https://github.com/volcengine/volcengine-go-sdk) from 1.1.26 to 1.1.29.
- [Release notes](https://github.com/volcengine/volcengine-go-sdk/releases)
- [Commits](volcengine/volcengine-go-sdk@v1.1.26...v1.1.29)

---
updated-dependencies:
- dependency-name: github.com/volcengine/volcengine-go-sdk
  dependency-version: 1.1.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update README.md (#48)

Describe whats different in next

Signed-off-by: Vadim Bauer <[email protected]>

* Update README.md (#54)

Signed-off-by: Vadim Bauer <[email protected]>

* feat: daggerize harbor

Signed-off-by: bupd <[email protected]>

* fix: dagger cmds

Signed-off-by: bupd <[email protected]>

* feat: add publish pipeline with dagger

Signed-off-by: bupd <[email protected]>

* fix: pipeline

Signed-off-by: bupd <[email protected]>

---------

Signed-off-by: yuzhipeng <[email protected]>
Signed-off-by: Spyros Trigazis <[email protected]>
Signed-off-by: Daniel Jiang <[email protected]>
Signed-off-by: rgcr <[email protected]>
Signed-off-by: Mooneeb Hussain <[email protected]>
Signed-off-by: stonezdj <[email protected]>
Signed-off-by: my036811 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: wang yan <[email protected]>
Signed-off-by: chlins <[email protected]>
Signed-off-by: wy65701436 <[email protected]>
Signed-off-by: stonezdj <[email protected]>
Signed-off-by: bupd <[email protected]>
Signed-off-by: Vadim Bauer <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
Co-authored-by: yuzhipeng <[email protected]>
Co-authored-by: Spyros Trigazis <[email protected]>
Co-authored-by: Daniel Jiang <[email protected]>
Co-authored-by: Roger <[email protected]>
Co-authored-by: Moon <[email protected]>
Co-authored-by: stonezdj(Daojun Zhang) <[email protected]>
Co-authored-by: miner <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <[email protected]>
Co-authored-by: Wang Yan <[email protected]>
Co-authored-by: Chlins Zhang <[email protected]>
Co-authored-by: Vadim Bauer <[email protected]>
AYDEV-FR pushed a commit to AYDEV-FR/harbor that referenced this pull request Sep 19, 2025
feat(replication): add Single Active Replication per policy

* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>
AYDEV-FR pushed a commit to AYDEV-FR/harbor that referenced this pull request Sep 19, 2025
feat(replication): add Single Active Replication per policy

* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>
AYDEV-FR pushed a commit to AYDEV-FR/harbor that referenced this pull request Sep 19, 2025
feat(replication): add Single Active Replication per policy

* Added single_active_replication field to schema & DB table
* Updated API, controller & handler to enforce single execution per policy
* Added checkbox in UI to enable/disable single_active_replication for a
  policy
* Implemented necessary backend & frontend tests
* Prevents parallel runs per policy if single_active_replication is enabled

Signed-off-by: bupd <[email protected]>
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.

Maximum parallel replications for pull Replication job duplication Replication: avoid overlapping replication jobs

9 participants