OCPBUGS-114021: Retry failed console plugin manifest fetches - #17108
OCPBUGS-114021: Retry failed console plugin manifest fetches#17108kchawlani19 wants to merge 1 commit into
Conversation
A 401 from a console replica that does not have the session, or a transient network error, left the plugin unloaded for the rest of the browser session. Retry the manifest load so the plugin can recover without a full page reload. Fixes https://issues.redhat.com/browse/OCPBUGS-114021
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@kchawlani19: This pull request references Jira Issue OCPBUGS-114021, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughChangesPlugin manifest retry handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change retries transient dynamic-plugin manifest fetch failures while preserving no-retry behavior for permanent errors, improving plugin availability after temporary network or session issues; no actionable merge-blocking risk remains at the current head beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant loadAndEnablePlugin
participant PluginStore
participant onError
loadAndEnablePlugin->>PluginStore: loadPlugin(manifest URL)
PluginStore-->>loadAndEnablePlugin: transient failure
loadAndEnablePlugin->>PluginStore: retry loadPlugin
PluginStore-->>loadAndEnablePlugin: success or final failure
loadAndEnablePlugin->>onError: report final failure
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
Full details: Description checkExplanation The description is relevant and mostly complete. It explains the root cause, solution, test setup, test cases, browser conformance section, and additional information. The browser selections and reviewer assignments remain incomplete, but these omissions are non-critical for this change. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. Full details: Stable And Deterministic Test NamesExplanation All added Jest test titles are stable literals. The two parameterized titles use fixed table labels (HTTP status codes and fixed error type names), so they do not vary between runs. Plugin names, URLs, and error values appear in test bodies or fixed assertions, not as runtime-generated title data. No title contains a timestamp, UUID, generated suffix, node or namespace name, IP address, or other run-dependent value. Full details: Test Structure And QualityExplanation PASS — the changed test is a TypeScript Jest test, not Ginkgo code. The diff adds Full details: Microshift Test CompatibilityExplanation PASS: The pull request changes only frontend TypeScript files. The added Full details: Single Node Openshift (Sno) Test CompatibilityExplanation PASS — The pull request adds TypeScript/Jest unit tests in Full details: Topology-Aware Scheduling CompatibilityExplanation PASS — The pull request changes only TypeScript runtime logic and its unit test: Full details: Ote Binary Stdout ContractExplanation PASS — The pull request changes only two TypeScript files under the frontend dynamic-plugin SDK. The diff contains no Go OTE binary, main/init, Ginkgo suite setup, or process-level stdout code. Its Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS: The pull request adds a Jest/TypeScript unit test ( Full details: No-Weak-CryptoExplanation The pull request adds retry handling, HTTP status classification, error-cause traversal, and unit tests. The changed files contain no MD5, SHA1, DES, 3DES, RC4, Blowfish, ECB, crypto API, custom cryptography, secret/token comparison, or timing-sensitive comparison logic. Full details: Container-PrivilegesExplanation PASS: The pull request changes only two TypeScript files: Full details: No-Sensitive-Data-In-LogsExplanation The new retry warning logs Resolution Do not pass the raw error, cause,
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kchawlani19 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@kchawlani19: This pull request references Jira Issue OCPBUGS-114021, which is valid. 3 validation(s) were run on this bug
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. |
|
@kchawlani19: all tests passed! 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. |
Analysis / Root cause:
Console fetches each dynamic plugin manifest once at page load via
PluginStore.loadPlugin. If that fetch fails — commonly a 401 when the request lands on a console replica that does not have the OAuth session — the loader never retries. The plugin's UI is missing for the rest of the browser session; only a full reload recovers it.PluginStoredoes not register the plugin until the manifest is fetched, so a retry is a clean second attempt rather than a reload of a failed plugin.Solution description:
loadAndEnablePluginnow retries the manifest load up to 3 times (same budget ascoFetch) when the failure is transient: 401, 408, 429, 5xx, timeouts, and networkTypeErrors. Permanent errors such as 404/403 are not retried. Intermediate failures log a warning;onErroris called only after the last attempt.Fixes https://issues.redhat.com/browse/OCPBUGS-114021
Screenshots / screen recording:
N/A — plugin load retry; no visual/layout change when the fetch succeeds.
Test setup:
OpenShift web console with at least one dynamic plugin enabled (for example monitoring-plugin).
Test cases:
/api/plugins/<plugin>/plugin-manifest.json, reload, then unblock; the plugin should appear without a second full reload.Browser conformance:
Additional info:
Unit tests cover retry-then-success for 401 and network errors, giving up after 3 attempts, skipping non-transient errors, and the existing disableStaticPlugins behavior.
Reviewers and assignees:
Summary by CodeRabbit
New Features
Bug Fixes