Skip to content

Conversation

TMHBOFH
Copy link

@TMHBOFH TMHBOFH commented Jul 8, 2025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

This change enhances the tag and repository filtering logic by enabling support for regular expressions for replication. Users can now specify filters using the regex: prefix, allowing for more flexible and powerful matching patterns. For example, patterns like regex:^1\.(34\..*|32\.(4|5|6))$ can be used to match specific version formats.

Screenshots

image

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.

Signed-off-by: TMHBOFH <itsystem.bofh@gmail.com>
@TMHBOFH TMHBOFH requested a review from a team as a code owner July 8, 2025 15:12
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 PR is missing consistency,regex should be allowed in name and tag.

There is also an older PR that does the same thing.
#18723

Also a community proposal: goharbor/community#221

I suggest building upon previous work.

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22162       +/-   ##
===========================================
+ Coverage   45.36%   65.87%   +20.50%     
===========================================
  Files         244     1072      +828     
  Lines       13333   115726   +102393     
  Branches     2719     2925      +206     
===========================================
+ Hits         6049    76230    +70181     
- Misses       6983    35268    +28285     
- Partials      301     4228     +3927     
Flag Coverage Δ
unittests 65.87% <100.00%> (+20.50%) ⬆️

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

Files with missing lines Coverage Δ
src/pkg/reg/util/pattern.go 80.26% <100.00%> (ø)

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

@TMHBOFH
Copy link
Author

TMHBOFH commented Jul 8, 2025

This PR is missing consistency,regex should be allowed in name and tag.

There is also an older PR that does the same thing. #18723

Also a community proposal: goharbor/community#221

I suggest building upon previous work.

I’ll take a look at that.

The name is handled using the same function (util.Match), so it should work with the regex as well. I’ll double-check it.

A response to my other PR22017 would be much appreciated, as the functionality is important for us. Thank you.

@reasonerjt
Copy link
Contributor

We are approaching v2.14 feature complete and this enhancement will need to target for later releases.

Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Sep 12, 2025
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.

5 participants