ACM-33544 ACM-33545 update react router and OCP minimum version#6322
Conversation
93a7c28 to
d59b5b6
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (269)
✅ Files skipped from review due to trivial changes (81)
🚧 Files skipped from review as they are similar to previous changes (165)
📝 WalkthroughWalkthroughReplace the compat router with ChangesRouter migration and type updates
Sequence Diagram(s)None Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/components/LostChanges.test.tsx (1)
78-78:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winTest suite is skipped.
The entire test suite is disabled with
describe.skip. This should be re-enabled and passing before merging.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/components/LostChanges.test.tsx` at line 78, The test suite for LostChangesProvider is currently disabled via describe.skip in LostChanges.test.tsx; re-enable it by removing .skip from describe (change describe.skip('LostChangesProvider', ...) to describe('LostChangesProvider', ...)) and then run the tests, fix any failing tests inside the suite (look for tests referencing LostChangesProvider, the relevant it/expect blocks, mocked modules or setup in beforeEach/afterEach) by updating assertions, restoring or adjusting mocks, and ensuring any async operations are awaited so the suite passes locally and in CI.
🧹 Nitpick comments (5)
frontend/src/routes/Infrastructure/VirtualMachines/utils.tsx (1)
5-5: 💤 Low valueUse
import typefor type-only import.
NavigateFunctionis used only for type annotations (lines 90, 295) and should useimport typeto avoid unnecessary runtime imports.♻️ Proposed fix
-import { NavigateFunction } from 'react-router' +import type { NavigateFunction } from 'react-router'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/routes/Infrastructure/VirtualMachines/utils.tsx` at line 5, Change the runtime import to a type-only import for NavigateFunction: replace the existing import of NavigateFunction from 'react-router' with an "import type { NavigateFunction } from 'react-router'". This is used only in type annotations (e.g., in the functions that accept a NavigateFunction parameter) so switching to import type removes the unnecessary runtime import while leaving all type usages intact.Source: Coding guidelines
frontend/src/routes/Credentials/CreateCredentialsCatalog.tsx (1)
10-10: ⚡ Quick winPrefer
import typefor type-only usage.The
Totype is used exclusively for type annotations (line 12 return type). Per coding guidelines, useimport typesyntax to avoid runtime imports.♻️ Proposed fix
-import { To } from 'react-router' +import type { To } from 'react-router'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/routes/Credentials/CreateCredentialsCatalog.tsx` at line 10, The file imports the React Router type To as a value import; change it to a type-only import to avoid runtime imports: replace the current import of To with an "import type { To } from 'react-router'" and update any usages (the CreateCredentialsCatalog component return type annotated as To) accordingly so the symbol To is only imported as a type.Source: Coding guidelines
frontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsx (1)
8-13: ⚡ Quick winIneffective mock should be removed.
The
jest.mockat lines 8-13 is inside adescribeblock, so it has no effect—Jest mocks must be at module scope. Additionally,useHistorydoesn't exist in react-router v7 (it's a v5 API). Since the tests passnavigateas a parameter to the functions under test, this mock is unnecessary dead code.🧹 Proposed cleanup
const mockHistoryPush = jest.fn() describe('VirtualMachines utils', () => { - jest.mock('react-router', () => ({ - ...jest.requireActual('react-router'), - useHistory: () => ({ - push: mockHistoryPush, - }), - })) const t = i18next.t.bind(i18next) const navigate = jest.fn()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsx` around lines 8 - 13, Remove the ineffective module-scoped mock for react-router by deleting the jest.mock block that defines useHistory and mockHistoryPush (the mock inside the describe is no-op and useHistory is a v5 API), and rely on the existing tests that pass a navigate argument to the functions under test; specifically remove references to useHistory and mockHistoryPush in frontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsx so the tests use the passed-in navigate parameter directly.frontend/packages/multicluster-sdk/package.json (1)
41-41: ⚡ Quick winConsider constraining SDK peer dependency upper bound.
The peer dependency changed from
^4.19.1to>=4.22.0. The>=range allows any future major version, which could introduce breaking changes. Consider using^4.22.0to limit to compatible 4.x versions unless the intent is to accept all future SDK versions.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/packages/multicluster-sdk/package.json` at line 41, Update the peerDependencies entry for "`@openshift-console/dynamic-plugin-sdk`" in package.json to constrain the upper bound—replace the current range string ">=4.22.0" with a caret range like "^4.22.0" so it accepts compatible 4.x SDK releases but prevents unbounded future major upgrades; locate the peerDependencies block and update the value for the "`@openshift-console/dynamic-plugin-sdk`" key accordingly.frontend/jest.config.ts (1)
23-23: 💤 Low valueTemporary test shim for router migration.
The moduleNameMapper redirects
react-router-dom-v5-compattoreact-routerfor test compatibility during the migration. Once all code is fully migrated and no longer references the v5-compat package, this mapping can be removed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/jest.config.ts` at line 23, moduleNameMapper currently maps '^react-router-dom-v5-compat$' to 'react-router' as a temporary test shim; remove that mapping from jest.config.ts (the line containing '^react-router-dom-v5-compat$') once all code and tests no longer import 'react-router-dom-v5-compat' and run the test suite to catch remaining references; search the repo for imports/usages of 'react-router-dom-v5-compat' and update them to the migrated router imports before deleting the mapping to avoid breaking tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/package.json`:
- Line 97: Confirm that the bumped dependency react-router@^7.17.0 and the
`@openshift-console/dynamic-plugin-sdk`@^4.22.0 (and related webpack package) are
actually published and compatible with the project's React and peerDependency
constraints: verify their npm publication, check their peerDependencies against
the project's React version, and ensure they don't conflict with the overrides
that pin `@openshift-assisted/ui-lib` to
`@openshift-console/dynamic-plugin-sdk`@4.22.0; if conflicts exist, either align
versions (update overrides) or adjust the package.json entries and run a local
install + build/test to validate the changes before merging.
In
`@frontend/packages/multicluster-sdk/src/components/FleetResourceLink.test.tsx`:
- Around line 31-33: Update the outdated comment above the jest.mock call so it
reflects the actual mock target: change the comment that references
"react-router-dom-v5-compat" to mention "react-router" (the module being mocked
in the jest.mock('react-router', ...) call) so the comment matches the mock in
FleetResourceLink.test.tsx and avoids confusion when locating the jest.mock
usage.
In `@frontend/src/routes/Governance/policies/CreatePolicyAutomation.tsx`:
- Line 12: The import pulls PathParam into runtime even though it's only used as
a type; change the import to a type-only import by replacing the existing import
with an import type for PathParam (e.g., import type { PathParam } ...) in
CreatePolicyAutomation.tsx so PathParam is erased at runtime; ensure the rest of
the import list (useParams, useNavigate, useLocation, generatePath) remain as
value imports and confirm PathParam is only used as a type parameter (e.g., in
the generatePath/type usage) so the type-only import is safe.
---
Outside diff comments:
In `@frontend/src/components/LostChanges.test.tsx`:
- Line 78: The test suite for LostChangesProvider is currently disabled via
describe.skip in LostChanges.test.tsx; re-enable it by removing .skip from
describe (change describe.skip('LostChangesProvider', ...) to
describe('LostChangesProvider', ...)) and then run the tests, fix any failing
tests inside the suite (look for tests referencing LostChangesProvider, the
relevant it/expect blocks, mocked modules or setup in beforeEach/afterEach) by
updating assertions, restoring or adjusting mocks, and ensuring any async
operations are awaited so the suite passes locally and in CI.
---
Nitpick comments:
In `@frontend/jest.config.ts`:
- Line 23: moduleNameMapper currently maps '^react-router-dom-v5-compat$' to
'react-router' as a temporary test shim; remove that mapping from jest.config.ts
(the line containing '^react-router-dom-v5-compat$') once all code and tests no
longer import 'react-router-dom-v5-compat' and run the test suite to catch
remaining references; search the repo for imports/usages of
'react-router-dom-v5-compat' and update them to the migrated router imports
before deleting the mapping to avoid breaking tests.
In `@frontend/packages/multicluster-sdk/package.json`:
- Line 41: Update the peerDependencies entry for
"`@openshift-console/dynamic-plugin-sdk`" in package.json to constrain the upper
bound—replace the current range string ">=4.22.0" with a caret range like
"^4.22.0" so it accepts compatible 4.x SDK releases but prevents unbounded
future major upgrades; locate the peerDependencies block and update the value
for the "`@openshift-console/dynamic-plugin-sdk`" key accordingly.
In `@frontend/src/routes/Credentials/CreateCredentialsCatalog.tsx`:
- Line 10: The file imports the React Router type To as a value import; change
it to a type-only import to avoid runtime imports: replace the current import of
To with an "import type { To } from 'react-router'" and update any usages (the
CreateCredentialsCatalog component return type annotated as To) accordingly so
the symbol To is only imported as a type.
In `@frontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsx`:
- Around line 8-13: Remove the ineffective module-scoped mock for react-router
by deleting the jest.mock block that defines useHistory and mockHistoryPush (the
mock inside the describe is no-op and useHistory is a v5 API), and rely on the
existing tests that pass a navigate argument to the functions under test;
specifically remove references to useHistory and mockHistoryPush in
frontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsx so the tests
use the passed-in navigate parameter directly.
In `@frontend/src/routes/Infrastructure/VirtualMachines/utils.tsx`:
- Line 5: Change the runtime import to a type-only import for NavigateFunction:
replace the existing import of NavigateFunction from 'react-router' with an
"import type { NavigateFunction } from 'react-router'". This is used only in
type annotations (e.g., in the functions that accept a NavigateFunction
parameter) so switching to import type removes the unnecessary runtime import
while leaving all type usages intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 26472d9b-e961-4cf1-90ff-35838a50f033
⛔ Files ignored due to path filters (2)
frontend/package-lock.jsonis excluded by!**/package-lock.jsonfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/__snapshots__/DetailsForm.test.tsx.snapis excluded by!**/*.snap,!**/*.snap
📒 Files selected for processing (298)
frontend/.storybook/preview.jsfrontend/jest.config.tsfrontend/package.jsonfrontend/packages/multicluster-sdk/README.mdfrontend/packages/multicluster-sdk/package.jsonfrontend/packages/multicluster-sdk/src/components/FleetResourceLink.test.tsxfrontend/packages/multicluster-sdk/src/components/FleetResourceLink.tsxfrontend/packages/multicluster-sdk/src/extensions/resource.tsfrontend/packages/multicluster-sdk/src/internal/FleetResourceEventStream/EventComponent.test.tsxfrontend/packages/multicluster-sdk/src/internal/FleetResourceEventStream/EventComponent.tsxfrontend/packages/multicluster-sdk/src/internal/resourceRouteUtils.tsfrontend/packages/react-form-wizard/package.jsonfrontend/packages/react-form-wizard/wizards/Ansible/AnsibleExample.tsxfrontend/packages/react-form-wizard/wizards/AppWizard/AppExample.tsxfrontend/packages/react-form-wizard/wizards/Application/ApplicationExample.tsxfrontend/packages/react-form-wizard/wizards/Argo/ArgoExamples.tsxfrontend/packages/react-form-wizard/wizards/Cluster/ClusterForm.tsxfrontend/packages/react-form-wizard/wizards/Cluster/Provider.tsxfrontend/packages/react-form-wizard/wizards/Credentials/CredentialsExample.tsxfrontend/packages/react-form-wizard/wizards/Demo.tsxfrontend/packages/react-form-wizard/wizards/Home/HomeWizard.tsxfrontend/packages/react-form-wizard/wizards/Hypershift/AmazonHypershiftWizard.tsxfrontend/packages/react-form-wizard/wizards/Inputs/InputsWizard.tsxfrontend/packages/react-form-wizard/wizards/Placement/PlacementExamples.tsxfrontend/packages/react-form-wizard/wizards/Policy/PolicyExamples.tsxfrontend/packages/react-form-wizard/wizards/PolicyAutomation/PolicyAutomationExamples.tsxfrontend/packages/react-form-wizard/wizards/PolicySet/PolicySetExamples.tsxfrontend/packages/react-form-wizard/wizards/ROSA/RosaExample.tsxfrontend/packages/react-form-wizard/wizards/common/utils.tsfrontend/plugins/acm/console-plugin-metadata.tsfrontend/plugins/mce/console-plugin-metadata.tsfrontend/src/App.tsxfrontend/src/NavigationPath.tsxfrontend/src/components/ACMNotReadyWarning.test.tsxfrontend/src/components/AutomationProviderHint.test.tsxfrontend/src/components/ClusterSets/ClusterSetsTable.test.tsxfrontend/src/components/ClusterSets/ClusterSetsTable.tsxfrontend/src/components/Clusters/ClustersTable.test.tsxfrontend/src/components/Clusters/ClustersTableHelper.test.tsxfrontend/src/components/Clusters/ClustersTableHelper.tsxfrontend/src/components/KubevirtProviderAlert.test.tsxfrontend/src/components/KubevirtProviderAlert.tsxfrontend/src/components/LoadPluginData.test.tsxfrontend/src/components/LoadPluginData.tsxfrontend/src/components/LostChanges.test.tsxfrontend/src/components/LostChanges.tsxfrontend/src/components/OperatorAlert.test.tsxfrontend/src/components/OperatorAlert.tsxfrontend/src/components/PluginContextProvider.tsxfrontend/src/components/PluginDataContextProvider.test.tsxfrontend/src/components/ProjectsTable.test.tsxfrontend/src/components/ProjectsTable.tsxfrontend/src/components/RBACResourceYaml.test.tsxfrontend/src/components/StatusIcons.tsxfrontend/src/components/TemplateEditor/TemplateEditor.test.jsfrontend/src/components/TemplateSummaryModal.tsxfrontend/src/components/YamlEditor.test.tsxfrontend/src/components/rbac/IdentitiesList.test.tsxfrontend/src/lib/AcmTimestamp.test.tsxfrontend/src/lib/SharedContext.tsfrontend/src/lib/search.tsfrontend/src/plugin-extensions/acmResourceRoutes.test.tsfrontend/src/plugin-extensions/acmResourceRoutes.tsfrontend/src/plugin-extensions/extensions/OverviewTab.tsfrontend/src/plugin-extensions/extensions/actionExtension.tsfrontend/src/plugin-extensions/extensions/listColumnExtension.tsfrontend/src/plugin-extensions/properties/overviewTabProps.tsfrontend/src/routes/Applications/AdvancedConfiguration.test.tsxfrontend/src/routes/Applications/AdvancedConfiguration.tsxfrontend/src/routes/Applications/ApplicationDetails/ApplicationDetails.test.tsxfrontend/src/routes/Applications/ApplicationDetails/ApplicationDetails.tsxfrontend/src/routes/Applications/ApplicationDetails/ApplicationDetails/ApplicationDetails.test.tsxfrontend/src/routes/Applications/ApplicationDetails/ApplicationDetails/ApplicationDetails.tsxfrontend/src/routes/Applications/Applications.tsxfrontend/src/routes/Applications/ApplicationsPage.tsxfrontend/src/routes/Applications/CreateArgoApplication/CreatePullApplicationSet.test.tsxfrontend/src/routes/Applications/CreateArgoApplication/CreatePullApplicationSet.tsxfrontend/src/routes/Applications/CreateArgoApplication/CreatePushApplicationSet.test.tsxfrontend/src/routes/Applications/CreateArgoApplication/CreatePushApplicationSet.tsxfrontend/src/routes/Applications/CreateArgoApplication/EditArgoApplicationSet.tsxfrontend/src/routes/Applications/CreateArgoApplication/createArgoResources.tsfrontend/src/routes/Applications/CreateSubscriptionApplication/SubscriptionApplication.test.tsxfrontend/src/routes/Applications/CreateSubscriptionApplication/SubscriptionApplication.tsxfrontend/src/routes/Applications/Overview.test.tsxfrontend/src/routes/Applications/Overview.tsxfrontend/src/routes/Applications/components/DeleteResourceModal.test.tsxfrontend/src/routes/Applications/components/DeleteResourceModal.tsxfrontend/src/routes/Applications/components/TimeWindowLabels.test.tsxfrontend/src/routes/Applications/components/TimeWindowLabels.tsxfrontend/src/routes/Applications/components/ToggleSelector.tsxfrontend/src/routes/Applications/helpers/resource-helper.tsxfrontend/src/routes/Credentials/CreateCredentials.test.tsxfrontend/src/routes/Credentials/CreateCredentials.tsxfrontend/src/routes/Credentials/CreateCredentialsCatalog.tsxfrontend/src/routes/Credentials/CreateCredentialsType/CreateCredentialsAWS.test.tsxfrontend/src/routes/Credentials/Credentials.tsxfrontend/src/routes/Credentials/CredentialsForm.test.tsxfrontend/src/routes/Credentials/CredentialsForm.tsxfrontend/src/routes/Credentials/CredentialsPage.test.tsxfrontend/src/routes/Credentials/CredentialsPage.tsxfrontend/src/routes/Governance/Governance.tsxfrontend/src/routes/Governance/GovernancePage.tsxfrontend/src/routes/Governance/common/util.tsxfrontend/src/routes/Governance/components/AutomationDetailsSidebar.test.tsxfrontend/src/routes/Governance/components/AutomationDetailsSidebar.tsxfrontend/src/routes/Governance/components/GovernanceEmptyState.tsxfrontend/src/routes/Governance/components/PolicyActionDropdown.tsxfrontend/src/routes/Governance/components/ViewDiffApiCall.test.tsxfrontend/src/routes/Governance/discovered/DiscoveredPolicies.test.tsxfrontend/src/routes/Governance/discovered/DiscoveredPolicies.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredByCluster.test.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredByCluster.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredPolicyDetailsPage.test.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredPolicyDetailsPage.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredResources.test.tsxfrontend/src/routes/Governance/discovered/details/DiscoveredResources.tsxfrontend/src/routes/Governance/discovered/details/common.test.tsxfrontend/src/routes/Governance/discovered/details/common.tsxfrontend/src/routes/Governance/overview/ClusterPolicySummarySidebar.test.tsxfrontend/src/routes/Governance/overview/ClusterPolicySummarySidebar.tsxfrontend/src/routes/Governance/overview/Overview.test.tsxfrontend/src/routes/Governance/overview/PolicyViolationSummary.tsxfrontend/src/routes/Governance/overview/SecurityGroupPolicySummarySidebar.tsxfrontend/src/routes/Governance/policies/CreatePolicy.test.tsxfrontend/src/routes/Governance/policies/CreatePolicy.tsxfrontend/src/routes/Governance/policies/CreatePolicyAutomation.test.tsxfrontend/src/routes/Governance/policies/CreatePolicyAutomation.tsxfrontend/src/routes/Governance/policies/CreatePolicySubmit.test.tsxfrontend/src/routes/Governance/policies/EditPolicy.test.tsxfrontend/src/routes/Governance/policies/EditPolicy.tsxfrontend/src/routes/Governance/policies/EditPolicyAutomation.test.tsxfrontend/src/routes/Governance/policies/EditPolicyAutomation.tsxfrontend/src/routes/Governance/policies/Policies.test.tsxfrontend/src/routes/Governance/policies/Policies.tsxfrontend/src/routes/Governance/policies/PolicyTableCell.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsOverview.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsOverview.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsPage.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsPage.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsResults.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyDetailsResults.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/KyvernoRelatedResources.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyDetailsHistory.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyDetailsHistory.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetailHooks.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetails.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetails.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetailsColumns.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetailsPage.test.tsxfrontend/src/routes/Governance/policies/policy-details/PolicyTemplateDetail/PolicyTemplateDetailsPage.tsxfrontend/src/routes/Governance/policy-sets/CreatePolicySet.test.tsxfrontend/src/routes/Governance/policy-sets/CreatePolicySet.tsxfrontend/src/routes/Governance/policy-sets/EditPolicySet.test.tsxfrontend/src/routes/Governance/policy-sets/EditPolicySet.tsxfrontend/src/routes/Governance/policy-sets/PolicySets.test.tsxfrontend/src/routes/Governance/policy-sets/PolicySets.tsxfrontend/src/routes/Governance/policy-sets/components/PolicySetCard.test.tsxfrontend/src/routes/Governance/policy-sets/components/PolicySetCard.tsxfrontend/src/routes/Governance/policy-sets/components/PolicySetDetailSidebar.test.tsxfrontend/src/routes/Governance/policy-sets/components/PolicySetDetailSidebar.tsxfrontend/src/routes/Home/Overview/Overview.test.tsxfrontend/src/routes/Home/Overview/OverviewPage.test.tsxfrontend/src/routes/Home/Overview/components/SavedSearchesCard.test.tsxfrontend/src/routes/Home/Overview/components/SavedSearchesCard.tsxfrontend/src/routes/Home/Overview/components/SummaryCard.test.tsxfrontend/src/routes/Home/Overview/components/SummaryCard.tsxfrontend/src/routes/Home/Overview/components/SummaryClustersCard.test.tsxfrontend/src/routes/Home/Overview/components/SummaryClustersCard.tsxfrontend/src/routes/Home/Overview/components/SummaryStatusCard.test.tsxfrontend/src/routes/Home/Overview/components/SummaryStatusCard.tsxfrontend/src/routes/Home/Welcome/Welcome.tsxfrontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsxfrontend/src/routes/Infrastructure/Automations/AnsibleAutomations.tsxfrontend/src/routes/Infrastructure/Automations/AnsibleAutomationsForm.test.tsxfrontend/src/routes/Infrastructure/Automations/AnsibleAutomationsForm.tsxfrontend/src/routes/Infrastructure/Automations/Automations.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/ClusterPools.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/ClusterPools.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/CreateClusterPool/CreateClusterPool.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/CreateClusterPool/CreateClusterPool.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/CreateClusterPool/CreateClusterPoolCatalog.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/CreateClusterPool/CreateClusterPoolCatalog.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/CreateClusterPoolPage.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterPools/components/ClusterClaimModal.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterRoleAssignments.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterRoleAssignments.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetAccessManagement/ClusterSetAccessManagement.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetClusterPools/ClusterSetClusterPools.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetClusters/ClusterSetClusters.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetClusters/ClusterSetClusters.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetDetails.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetDetails.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetDetailsPage.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetInstallSubmariner/InstallSubmarinerForm.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetManageResources/ClusterSetManageResources.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetManageResources/ClusterSetManageResources.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetOverview/ClusterSetOverview.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetRoleAssignments/ClusterSetRoleAssignments.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetRoleAssignments/ClusterSetRoleAssignments.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetDetails/ClusterSetSubmariner/ClusterSetSubmariner.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetRoleAssignmentsPage.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetRoleAssignmentsPage.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSets.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/ClusterSetsPage.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/CreateClusterSet/CreateClusterSetModal.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/components/ClusterSetActionDropdown.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/components/ClusterSetActionDropdown.tsxfrontend/src/routes/Infrastructure/Clusters/ClusterSets/components/MultiClusterNetworkStatus.tsxfrontend/src/routes/Infrastructure/Clusters/Clusters.tsxfrontend/src/routes/Infrastructure/Clusters/ClustersPage.test.tsxfrontend/src/routes/Infrastructure/Clusters/ClustersPage.tsxfrontend/src/routes/Infrastructure/Clusters/DiscoveredClusters/DiscoveredClusters.test.tsxfrontend/src/routes/Infrastructure/Clusters/DiscoveredClusters/DiscoveredClusters.tsxfrontend/src/routes/Infrastructure/Clusters/DiscoveredClusters/DiscoveryConfig/DiscoveryConfig.test.tsxfrontend/src/routes/Infrastructure/Clusters/DiscoveredClusters/DiscoveryConfig/DiscoveryConfig.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterDetails.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterDetails.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterMachinePools/ClusterMachinePools.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterNodes/ClusterNodes.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterNodes/ClusterNodes.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterOverview/ClusterOverview.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ClusterDetails/ClusterOverview/ClusterOverview.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/CreateCluster.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/CreateCluster.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/Warning.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/DetailsForm.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/DetailsForm.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HostForm.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/HypershiftAWSCLI.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/hypershift/NetworkForm.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/utils.tsfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateAWSControlPlane.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateClusterCatalog.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateControlPlane.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateDiscoverHost.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateDiscoverHost.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterCatalog/CreateKubeVirtControlPlane.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateClusterPage.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ImportCluster/ImportCluster.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ImportCluster/ImportCluster.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ManagedClusters.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/ManagedClusters.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/AddCluster.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/BatchChannelSelectModal.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/BatchUpgradeModal.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ClusterActionDropdown.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ClusterActionDropdown.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ClusterDestroy.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ClusterDestroy.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ClusterPolicySidebar.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/DistributionField.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/DistributionField.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HiveNotification.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/HostedClusterProgress.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ImportCommand.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/LoginCredentials.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/NodePoolsProgress.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/NodePoolsTable.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/OnboardingModal.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/OnboardingModal.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ProgressStepBar.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/RemoveAutomationModal.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/ScaleClusterAlert.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/StatusField.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/StatusField.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/StatusSummaryCount.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/StatusSummaryCount.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/UpdateAutomationModal.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/UpdateAutomationModal.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/AIClusterDetails.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/EditAICluster.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/EditAICluster.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/CreatePlacement/CreatePlacement.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/CreatePlacement/CreatePlacement.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/CreatePlacement/EditPlacement.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/CreatePlacement/EditPlacement.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/PlacementDetails/PlacementDetails.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/PlacementDetails/PlacementDetails.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/PlacementDetails/PlacementOverview/PlacementOverview.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/PlacementDetails/PlacementOverview/PlacementOverview.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/Placements.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/Placements.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/utils.test.tsxfrontend/src/routes/Infrastructure/Clusters/Placements/utils.tsxfrontend/src/routes/Infrastructure/Clusters/RoleAssignmentsPage.test.tsxfrontend/src/routes/Infrastructure/Clusters/RoleAssignmentsPage.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/CreateInfraEnv.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/Details/InfraEnvironmentDetailsPage.test.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/Details/InfraEnvironmentDetailsPage.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/InfraEnvForm.test.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/InfraEnvironments.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/InfraEnvironmentsPage.test.tsxfrontend/src/routes/Infrastructure/InfraEnvironments/InfraEnvironmentsPage.tsxfrontend/src/routes/Infrastructure/VirtualMachines/utils.test.tsxfrontend/src/routes/Infrastructure/VirtualMachines/utils.tsxfrontend/src/routes/Search/Details/DetailsOverviewPage.test.tsxfrontend/src/routes/Search/Details/DetailsOverviewPage.tsxfrontend/src/routes/Search/Details/DetailsPage.test.tsx
| "parse-url": "^9.2.0", | ||
| "react-error-boundary": "3.1.4", | ||
| "react-monaco-editor": "^0.51.0", | ||
| "react-router": "^7.17.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify react-router 7.17.0 and SDK 4.22.0 are published
echo "Checking react-router version availability..."
npm view react-router@7.17.0 version 2>/dev/null || echo "react-router 7.17.0 not found"
echo "Checking `@openshift-console/dynamic-plugin-sdk` version availability..."
npm view `@openshift-console/dynamic-plugin-sdk`@4.22.0 version 2>/dev/null || echo "SDK 4.22.0 not found"Repository: stolostron/console
Length of output: 193
🏁 Script executed:
#!/bin/bash
# Inspect relevant sections of frontend/package.json
FILE="frontend/package.json"
echo "== react-router entry (around line 97) =="
sed -n '85,110p' "$FILE" | nl -ba -w2 -s':'
echo
echo "== SDK/webpack plugin entry (around lines 110-130) =="
sed -n '105,135p' "$FILE" | nl -ba -w2 -s':'
echo
echo "== overrides block (around lines 205-245) =="
sed -n '205,245p' "$FILE" | nl -ba -w2 -s':'
echo
echo "== devDependencies v5 compat mention =="
rg -n "react-router-dom-v5-compat" "$FILE" || trueRepository: stolostron/console
Length of output: 389
🏁 Script executed:
#!/bin/bash
FILE="frontend/package.json"
echo "== react-router entry (around line 97) =="
awk 'NR>=85 && NR<=110 {printf "%d:%s\n", NR, $0}' "$FILE"
echo
echo "== SDK/webpack plugin entry (around lines 110-130) =="
awk 'NR>=105 && NR<=135 {printf "%d:%s\n", NR, $0}' "$FILE"
echo
echo "== overrides block (around lines 205-245) =="
awk 'NR>=205 && NR<=245 {printf "%d:%s\n", NR, $0}' "$FILE"
echo
echo "== devDependencies v5 compat mention =="
rg -n "react-router-dom-v5-compat" "$FILE" || trueRepository: stolostron/console
Length of output: 3457
Confirm publish + validate compatibility for dependency upgrades
react-router@^7.17.0(frontend/package.json:97) and@openshift-console/dynamic-plugin-sdk@^4.22.0(frontend/package.json:116) /@...-webpack@^4.22.0(frontend/package.json:117) are published on npm.- Still verify that these versions are compatible with the project’s React/peer-dependency constraints and the PR’s minimum OCP/version assumptions—especially given the
overridespin of@openshift-assisted/ui-libto@openshift-console/dynamic-plugin-sdk@4.22.0(frontend/package.json:221-224).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/package.json` at line 97, Confirm that the bumped dependency
react-router@^7.17.0 and the `@openshift-console/dynamic-plugin-sdk`@^4.22.0 (and
related webpack package) are actually published and compatible with the
project's React and peerDependency constraints: verify their npm publication,
check their peerDependencies against the project's React version, and ensure
they don't conflict with the overrides that pin `@openshift-assisted/ui-lib` to
`@openshift-console/dynamic-plugin-sdk`@4.22.0; if conflicts exist, either align
versions (update overrides) or adjust the package.json entries and run a local
install + build/test to validate the changes before merging.
4c2622c to
89b723e
Compare
|
/retest |
1 similar comment
|
/retest |
|
/test unit-tests-sonarcloud |
|
/retest |
|
/cc @zlayne |
|
/retest |
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Assisted-by: Cursor (Claude Opus 4.6 High) Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
…outer-dom@6 Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
…outer@7 Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
Signed-off-by: Kevin Cormier <kcormier@redhat.com>
89b723e to
1a5f4f5
Compare
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
| '@openshift-assisted/ui-lib/cim': '<rootDir>/node_modules/@openshift-assisted/ui-lib/build/cjs/cim', | ||
| '@openshift-assisted/locales/([a-z]{2,3}/translation.json)': | ||
| '<rootDir>/node_modules/@openshift-assisted/locales/lib/$1/translation.json', | ||
| '^react-router-dom-v5-compat$': '<rootDir>/node_modules/react-router', |
There was a problem hiding this comment.
Is this required for other packages?
There was a problem hiding this comment.
This allows tests that pull in @openshift-assisted/ui-lib to pass for the moment until that library is updated. We can remove it at that point.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KevinFCormier, zlayne 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 |
|
/retest |



📝 Summary
Ticket Summary (Title):
Install dynamic plugin SDK 4.22 and set minimum OCP version
Update to react-router 7
Ticket Link:
https://redhat.atlassian.net/browse/ACM-33544
https://redhat.atlassian.net/browse/ACM-33545
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)🗒️ Notes for Reviewers
Summary by CodeRabbit
New Features
Improvements
Tests