add tag deletion option for gc#22382
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #22382 +/- ##
===========================================
+ Coverage 45.36% 65.89% +20.52%
===========================================
Files 244 1072 +828
Lines 13333 115950 +102617
Branches 2719 2927 +208
===========================================
+ Hits 6049 76401 +70352
- Misses 6983 35317 +28334
- Partials 301 4232 +3931
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
As proposed in the GC performance enhancement, Harbor will provide an option in the garbage collection job to determine whether tag files should be removed from the backend storage. By default, this option will be enabled (true) to align with the previous behavior. For performance considerations, users can disable tag deletion by unchecking this option. Proposal: goharbor/community#265 Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
16e67a8 to
d796446
Compare
Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new "delete_tag" option to Harbor's garbage collection (GC) functionality to control whether tag files should be removed from backend storage. By default, this option is enabled to maintain backward compatibility. This enhancement provides performance optimization by allowing users to disable tag deletion when not needed.
- Adds a new
delete_tagparameter to GC configuration with default valuetrue - Updates UI components and API handlers to support the new option
- Extends internationalization support for the new feature across multiple languages
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/server/v2.0/handler/gc.go | Adds delete_tag parameter handling to GC API endpoints |
| src/portal/src/i18n/lang/*.json | Adds translations for DELETE_TAG label in multiple languages |
| src/portal/src/app/base/left-side-nav/clearing-job/gc-page/gc/gc.component.* | Implements UI toggle for delete_tag option |
| src/jobservice/job/impl/gc/garbage_collection.go | Adds delete_tag logic to GC job implementation |
| src/controller/gc/*.go | Updates GC controller and model to support delete_tag parameter |
| src/jobservice/job/impl/gc/garbage_collection_test.go | Adds test coverage for delete_tag functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
bupd
left a comment
There was a problem hiding this comment.
please check and confirm. if the delete_tag param is true by default.
8a757cc to
b73c747
Compare
* add tag deletion option for gc As proposed in the GC performance enhancement, Harbor will provide an option in the garbage collection job to determine whether tag files should be removed from the backend storage. By default, this option will be enabled (true) to align with the previous behavior. For performance considerations, users can disable tag deletion by unchecking this option. Proposal: goharbor/community#265 Signed-off-by: wang yan <yan-yw.wang@broadcom.com> * resolve comments Signed-off-by: wang yan <yan-yw.wang@broadcom.com> * fix ut Signed-off-by: wang yan <yan-yw.wang@broadcom.com> --------- Signed-off-by: wang yan <yan-yw.wang@broadcom.com> Co-authored-by: wang yan <yan-yw.wang@broadcom.com>

As proposed in the GC performance enhancement, Harbor will provide an option in the garbage collection job to determine whether tag files should be removed from the backend storage. By default, this option will be enabled (true) to align with the previous behavior. For performance considerations, users can disable tag deletion by unchecking this option.
Proposal: goharbor/community#265
Thank you for contributing to Harbor!
Comprehensive Summary of your change
Issue being fixed
Fixes #(issue)
Please indicate you've done the following: