ACM-34695 Enable setting Automation templates for HCP clusters#6347
ACM-34695 Enable setting Automation templates for HCP clusters#6347jeswanke wants to merge 6 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an ChangesKubeVirt Automation Feature
Policy Wizard Test Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jeswanke 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/controlData/ControlDataKubeVirt.test.js (1)
63-67: ⚡ Quick winCover the new
includeAutomation = falsebranch.Line 63 and Line 66 only validate the enabled path. Add one disabled-path assertion so regressions don’t silently re-introduce automation controls when explicitly turned off.
Proposed test addition
it('generates correctly for MCE', () => { expect(getControlDataKubeVirt(t, handleModalToggle, true, <Warning />, false, localCluster, [])).toMatchSnapshot() }) +it('omits automation controls when includeAutomation is false', () => { + expect(getControlDataKubeVirt(t, handleModalToggle, false, <Warning />, true, {}, [])).toMatchSnapshot() +})🤖 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/Clusters/ManagedClusters/CreateCluster/controlData/ControlDataKubeVirt.test.js` around lines 63 - 67, Add a new test case in the ManagedClusters test file to verify the disabled automation path for the getControlDataKubeVirt function. Create an additional it() test block that calls getControlDataKubeVirt with the includeAutomation parameter (5th parameter) explicitly set to false, and include a toMatchSnapshot() assertion to capture the expected output when automation is disabled. This ensures regressions won't silently reintroduce automation controls when they are meant to be turned off.
🤖 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.
Nitpick comments:
In
`@frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/controlData/ControlDataKubeVirt.test.js`:
- Around line 63-67: Add a new test case in the ManagedClusters test file to
verify the disabled automation path for the getControlDataKubeVirt function.
Create an additional it() test block that calls getControlDataKubeVirt with the
includeAutomation parameter (5th parameter) explicitly set to false, and include
a toMatchSnapshot() assertion to capture the expected output when automation is
disabled. This ensures regressions won't silently reintroduce automation
controls when they are meant to be turned off.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f779b74f-cff4-4a49-bd16-86096578ae3b
⛔ Files ignored due to path filters (1)
frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/controlData/__snapshots__/ControlDataKubeVirt.test.js.snapis excluded by!**/*.snap,!**/*.snap
📒 Files selected for processing (6)
frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/CreateCluster.test.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/CreateCluster.tsxfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/controlData/ControlDataKubeVirt.jsfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/controlData/ControlDataKubeVirt.test.jsfrontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/templates/kubevirt-template.hbsfrontend/src/wizards/Governance/Policy/policyWizard.test.tsx
|
/test unit-tests-sonarcloud |
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
|
@jeswanke This looks pretty good so far. We've decided the CIM team will handle bare metal. |
|
/retest |
|
|
@jeswanke: The following test 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. |




📝 Summary
Ticket Summary (Title):
ACM-34695 Enable setting Automation templates for HCP clusters
Ticket Link:
https://redhat.atlassian.net/browse/ACM-34695
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)If Feature
If Bugfix
🗒️ Notes for Reviewers
Summary by CodeRabbit