feat(sync): add SyncLegacyCosignTags config to skip syncing legacy cosign/SBOM tags when disabled#3842
Conversation
…sign/SBOM tags when disabled Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3842 +/- ##
=======================================
Coverage 91.45% 91.46%
=======================================
Files 193 194 +1
Lines 27456 27464 +8
=======================================
+ Hits 25111 25121 +10
+ Misses 1521 1520 -1
+ Partials 824 823 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…nc referrers of referrers Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a SyncLegacyCosignTags sync configuration flag to optionally skip syncing legacy cosign/SBOM digest-encoded tags, and adjusts on-demand referrer syncing so it does not recursively sync referrers-of-referrers. It also introduces tests covering the new flag and the updated /referrers on-demand behavior.
Changes:
- Add
SyncLegacyCosignTagsto sync config (defaulting to true) and thread it into sync logic to skip legacy tag syncing when disabled. - Change on-demand
SyncReferrersto call referrer syncing in non-recursive mode. - Add/extend tests for legacy-tag syncing and non-recursive on-demand referrer syncing.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/extensions/sync/service.go | Gates legacy tag listing/sync behind SyncLegacyCosignTags and adds a recursive flag to referrer syncing so on-demand can be non-recursive. |
| pkg/extensions/sync/sync_test.go | Adds end-to-end tests for SyncLegacyCosignTags and on-demand /referrers non-recursive behavior. |
| pkg/extensions/sync/sync_internal_test.go | Updates internal tests for new syncReferrers signature and adds unit tests asserting legacy-tag behavior and non-recursive on-demand behavior. |
| pkg/extensions/config/sync/config.go | Adds SyncLegacyCosignTags config field and helper ShouldSyncLegacyCosignTags() defaulting to true when unset. |
| pkg/extensions/config/sync/config_test.go | Adds tests for ShouldSyncLegacyCosignTags() default/true/false behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…nd sync Credit for the tests goes to @jzhn see: https://github.com/project-zot/zot/pull/3840/changes Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
…the zot inner() implementation and with regctl native implementation Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Credit for the tests goes to @jzhn see, https://github.com/project-zot/zot/pull/3840/changes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.