-
Notifications
You must be signed in to change notification settings - Fork 4
Add the managed registry type #176
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
Conversation
Implements support for managed registries as per design doc Option 3
(explicit managed section).
Managed registries:
- Are directly managed via API (no external data source)
- Do not have sync loops (no automatic synchronization)
- Do not require syncPolicy or filter configuration
- Get initialized with "Complete" status instead of "Failed"
- Support the `managed: {}` configuration block
Implementation:
- Add SourceTypeManaged constant
- Add ManagedConfig type (empty struct, placeholder for future options)
- Update RegistryConfig to include Managed field
- Update validation to accept managed as fourth source type
- Update GetType() to return SourceTypeManaged when applicable
- Coordinator skips starting sync loops for managed registries
- Coordinator initializes managed registries with appropriate status
This aligns with the multi-registry architecture design document
and enables API-driven registry management for future extensions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit adds extensive test coverage for the managed registry type: Config validation tests (internal/config/config_test.go): - Valid managed registry without syncPolicy - Valid managed registry with ignored syncPolicy - Valid managed registry with ignored filter - Error cases for specifying managed with other source types - Mixed configurations with both managed and synced registries - Updated GetType() test to include managed type - Updated error messages to include "managed" in source type lists Coordinator tests (internal/sync/coordinator/coordinator_test.go): - Status initialization for managed registries (Complete vs Failed) - Mixed configurations with both managed and synced registries - Verification that managed registries get proper status messages All tests pass and verify that managed registries: - Don't require syncPolicy or filter fields - Initialize with SyncPhaseComplete status - Display appropriate message: "Managed registry (data managed via API)" - Can coexist with file/git/api synced registries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
==========================================
+ Coverage 67.59% 68.05% +0.46%
==========================================
Files 54 54
Lines 3240 3262 +22
==========================================
+ Hits 2190 2220 +30
+ Misses 907 899 -8
Partials 143 143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a doubt about the validation logic
|
post-merge comment: maybe we could add one sample manifest under examples/? |
The following PR adds the managed registry type as per the design doc for the configuration.
Details: