Repository navigation
feat: enforce provider status and existence on publish and discover [#118] - #122
Open
kelvinprabhu wants to merge 26 commits into
Open
kelvinprabhu wants to merge 26 commits into
kelvinprabhu wants to merge 26 commits into
Conversation
🛡️ Trivy security scan (CRITICAL,HIGH,MEDIUM,LOW)Go dependenciesNo findings at CRITICAL,HIGH,MEDIUM,LOW. Container imageNo findings at CRITICAL,HIGH,MEDIUM,LOW. |
|
📊 Test Coverage: ✅ Passed — 86% of changed lines covered, min 80% |
Collaborator
Author
Rollout
plugins:
registrySteps:
- id: providerstatus
steps:
- validateSign
- providerstatus
- addRouteThe module path is Before step 2: the catalog crawler's retire publish ( |
…#118] The registry silently caps an unpaged search at 2,000 rows, so providers past the first 2,000 read as inactive. ActiveProviderIDs now asks for pages of 500 through a new searchPage helper and stops at totalCount, or at a short page when the answer carries no total. An empty page before the total fails the call. searchRecords is unchanged.
…e background [#118] Requests no longer call the registry. The step loads the active list at startup and re-reads it every refreshInterval (default 10s); gated requests fail closed until a load succeeds and once the list is older than maxStaleness (default 60s). The plugin's cleanup function stops the refresher. On the quick-start stack discover with the step on went from p50 23.6ms to 3.0ms, and 20 concurrent discovers from 909 of 1,000 failing to all succeeding.
A registry that ignored offset, or reported a huge totalCount, could keep the paging loop running and growing until the refresh deadline. The listing now stops with an error past 100 pages of 500 rows; the previous list stays in use, so it fails closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #118.
Adds a reusable
providerstatusstep plugin to the network adapter to prevent inactive or unregistered providers from publishing catalogs or appearing in discover results.RegistryStepProviderso step plugins can access the registry.Configuration: The plugin is registered but not enabled in any config. Enabling it requires a separate Helm charts change.
Compatibility: No existing lines removed; existing configurations remain unchanged.