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

Iseyer/replicate tags #21660

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ianseyer
Copy link

@ianseyer ianseyer commented Feb 21, 2025

Currently, harbor does not replicate image tags for event-based replications. Instead, if a new tag is pushed, a replication event is not fired.

This issue is easily replicated:

  • push an image with a tag
  • push the same image with a new tag
  • watch replication not happen

There should be followup work to correct the issue of webhooks not being fired for tags being created.

Issue being fixed

Fixes #21623

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.

…src (goharbor#21162)

Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  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>
Co-authored-by: miner <[email protected]>
@ianseyer ianseyer requested a review from a team as a code owner February 21, 2025 17:07
@ianseyer ianseyer force-pushed the iseyer/replicate-tags branch 3 times, most recently from ba628f6 to 634b662 Compare February 21, 2025 17:10
@ianseyer
Copy link
Author

@Vad1mo @wy65701436 @reasonerjt

if you would be so kind as to review

@Vad1mo Vad1mo enabled auto-merge (squash) February 22, 2025 14:06
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.30%. Comparing base (c8c11b4) to head (634b662).
Report is 392 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21660      +/-   ##
==========================================
+ Coverage   45.36%   46.30%   +0.93%     
==========================================
  Files         244      249       +5     
  Lines       13333    14047     +714     
  Branches     2719     2897     +178     
==========================================
+ Hits         6049     6504     +455     
- Misses       6983     7199     +216     
- Partials      301      344      +43     
Flag Coverage Δ
unittests 46.30% <ø> (+0.93%) ⬆️

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

see 493 files with indirect coverage changes

@wy65701436 wy65701436 self-assigned this Feb 24, 2025
@wy65701436 wy65701436 added target/2.13.0 issues that are targeting v2.13.0 needs/follow-up labels Feb 24, 2025
@Vad1mo Vad1mo added the release-note/enhancement Label to mark PR to be added under release notes as enhancement label Feb 24, 2025
@Vad1mo
Copy link
Member

Vad1mo commented Feb 24, 2025

On the first glance it looks good, we need to give it an end-end try and see how it performs.

do we need to update the test cases?

@ianseyer
Copy link
Author

ianseyer commented Feb 25, 2025

I have identified a bug. This PR results in two events being fired for the first tag push of a new artifact:

Screenshot 2025-02-25 at 08 49 59

Any ideas on how to avoid firing the tag event on first push? The tag event in that instance is handled by artifact.Ensure

I am not sure why this isn't caught by https://github.com/goharbor/harbor/blob/main/src/controller/tag/controller.go#L90

In the immediate sense, I think this is harmless behavior, but I did want to note it.

auto-merge was automatically disabled February 25, 2025 14:53

Head branch was pushed to by a user without write access

@ianseyer ianseyer force-pushed the iseyer/replicate-tags branch from 634b662 to ba09cec Compare February 25, 2025 14:53
chore(deps): bump go.opentelemetry.io/otel from 1.31.0 to 1.32.0 in /src (goharbor#21162)

See merge request cloudflare/devtools/goharbor/harbor!1
Fix: Incorrect Data Display in Replications Table (goharbor#21461)

See merge request cloudflare/devtools/goharbor/harbor!2
@ianseyer ianseyer force-pushed the iseyer/replicate-tags branch 3 times, most recently from 77ad102 to 0b072ac Compare February 25, 2025 19:01
@ianseyer ianseyer force-pushed the iseyer/replicate-tags branch from 0b072ac to 61b8261 Compare February 25, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/follow-up release-note/enhancement Label to mark PR to be added under release notes as enhancement target/2.13.0 issues that are targeting v2.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Event Based" replication fails to replicate all tags, "Scheduled" or "Manual" replicates properly.
8 participants