-
Notifications
You must be signed in to change notification settings - Fork 499
OCPBUGS-88757: Align HCCO CatalogSource registryPoll interval with OCP defaults #8745
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
Draft
shijadha
wants to merge
1
commit into
openshift:main
Choose a base branch
from
shijadha:fix-catalogsource-poll-interval
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2
−2
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Add unit tests for the interval change.
The coding guidelines require unit tests for code changes in
control-plane-operator/**/*.go. While this is a configuration change, it significantly alters the polling behavior (from 10 minutes to 240 minutes). Consider adding a unit test that verifies bothRawIntervalandIntervalfields are set to the expected 240-minute values in the reconciled CatalogSource.🧪 Example test structure
🤖 Prompt for AI Agents
Source: Coding guidelines
🧩 Analysis chain
🌐 Web query:
operator-framework api RegistryPoll RawInterval field format requirements version 0.37.0💡 Result:
In the Operator Lifecycle Manager (OLM) API, the registry poll interval for a CatalogSource is configured via the interval field within the registryPoll updateStrategy [1][2]. This field expects a duration string format [3], such as "45m" or "10m" [1][2]. Regarding the RawInterval field: 1. Technical Role: The RawInterval field was introduced as an internal mechanism to handle the parsing of this interval [4][5]. It serves as a raw string representation of the duration before it is unmarshalled into the structured interval used by the OLM controller [4]. 2. Usage: This field is generally not intended for manual configuration by end-users in their YAML manifests [1][2]. Users should continue to use the interval field, which accepts standard duration strings [1][2]. 3. Version 0.37.0 context: The version 0.37.0 release of the operator-framework/api module refers to updates within the OLM API and associated ecosystem [6][7]. While this version includes updates for new fields (such as a new release field for CSVs) [6][7], the fundamental format requirements for catalog polling intervals remain based on standard duration parsing (e.g., Go's time.ParseDuration). In summary, users should specify the polling frequency using the interval field in their CatalogSource YAML using standard duration notation (e.g., 15m, 1h) [1][2]. The RawInterval field is an internal implementation detail and is not required or recommended for end-user manifests [4][5].
Citations:
🏁 Script executed:
Repository: openshift/hypershift
Length of output: 1592
Add unit tests for the catalog source polling interval changes.
The
RawIntervalstring format"240m"is valid for Go duration parsing and is correct. However, this change modifies the polling behavior across all four default catalog sources (certified, community, marketplace, red-hat-operators) without accompanying unit tests. Control-plane-operator changes require unit tests per coding guidelines.🤖 Prompt for AI Agents