OCPBUGS-74872: Sort plugin list to make them deterministic#1107
Conversation
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74872, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
cedf6d4 to
a876b6d
Compare
|
/jira refresh |
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74872, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/assign @yanpzhan |
|
On cluster with the pr code, installed several dynamic plugins, console pods were running normally without restarting repeatedly, checked cm console-config in openshift-console namespace, here is the plugin list info: @jhadvig in console-config.yaml, the 'i18nNamespaces' and 'plugins' list are sorted alphabetically, 'pluginsOrder' part is not sorted, need it to be sorted? |
|
/jira refresh The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity. |
|
@openshift-bot: This pull request references Jira Issue OCPBUGS-74872, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: yapei. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
New changes are detected. LGTM label has been removed. |
|
Note
|
| Layer / File(s) | Summary |
|---|---|
ConfigMap apply with conflict retry pkg/console/operator/sync_v400.go |
Adds sort and retry package imports, wraps resourceapply.ApplyConfigMap in retry.RetryOnConflict to retry on update conflicts instead of failing immediately. |
Deterministic plugin processing in sync pkg/console/operator/sync_v400.go |
Sorts availablePlugins slice by plugin Name to ensure deterministic reconciliation order. |
Deterministic ConfigMap builders pkg/console/subresource/configmap/configmap.go |
Sorts i18n namespace strings and proxy services by ConsoleAPIPath before returning, with added comments explaining determinism sources. |
Sorting validation tests pkg/console/subresource/configmap/configmap_test.go |
Reorders availablePlugins in existing test scenario, adds TestPluginsWithI18nNamespaceSorting and TestGetPluginsProxyServicesSorting to validate sorted outputs with non-matching plugin types and empty input handling. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. | |
| Description check | ❓ Inconclusive | The description covers problem, root cause, and solution but is missing several required template sections like Test setup, Test cases, and Browser conformance. | Add Test setup, Test cases, and Browser conformance sections to fully align with the repository's PR description template. |
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately reflects the main changes: sorting plugin lists to ensure deterministic behavior across reconciliation cycles. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Warning
Review ran into problems
🔥 Problems
Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.
Comment @coderabbitai help to get the list of available commands and usage tips.
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74872, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74872, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yapei@redhat.com), skipping review request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@jhadvig: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Problem
After enabling console plugins (particularly odf-console), the Console Operator gets stuck in a reconciliation loop with repeated console-config ConfigMap updates, causing console pods to restart every few minutes.
Root Cause
Non-deterministic YAML generation in the ConfigMap. Plugin-related data structures weren't consistently ordered, causing the ConfigMap content to vary between reconciliation cycles even when no actual changes occurred.
Solution
Fixed plugin data ordering:
Added retry logic:
Wrap ApplyConfigMap() with retry.RetryOnConflict() to handle concurrent updates
/assign @TheRealJon
Summary by CodeRabbit
Bug Fixes
Tests