Fix various bugs with displaying VM resources on the topology#6217
Fix various bugs with displaying VM resources on the topology#6217fxiang1 wants to merge 2 commits into
Conversation
Signed-off-by: fxiang1 <fxiang@redhat.com>
📝 WalkthroughWalkthroughAdds VM-aware controllerRevision expansion and VMI/revision deduplication to ApplicationSet topology generation, and enhances cluster resolution by letting getAppTargetCluster fall back to the application name when destination lookup fails; includes unit tests for controllerRevision and VM/VMI behavior. ChangesApplicationSet VirtualMachine Topology
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 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: fxiang1 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.
Actionable comments posted: 2
🤖 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/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyAppSet.test.ts`:
- Line 1437: The VM-owned ControllerRevision fixture names use only vmUid (e.g.,
the template string assigned to name: `revision-start-vm-${vmUid}-1`) but should
include the VM name segment; update those template strings to the documented
format by inserting the vmName variable before vmUid (e.g.,
`revision-start-vm-${vmName}-${vmUid}-1`) wherever the test creates
ControllerRevision fixtures (including the occurrence around the same pattern at
the other reported location).
In
`@frontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyAppSet.ts`:
- Around line 652-655: The regex used to extract the VM ControllerRevision UID
from deployableName (used when populating vmControllerRevisions) only matches
"...-vm-<uid>-<rev>" and therefore misses names that include the VM name segment
("...-vm-<vmName>-<uid>-<rev>"). Update the matching logic (the code referencing
deployableName and vmControllerRevisions.set) to accept an optional VM name
segment between "vm-" and the UID; for example change the pattern to allow one
segment before the UUID like
/.+-vm-(?:[^-]+-)?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-\d+$/
so uidMatch[1] still captures the UUID, and apply the same fix to the other
occurrence around lines where vmControllerRevisions is set (the second block
noted in the comment).
🪄 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: 90dcc4ff-1899-4998-b869-74826c55684b
📒 Files selected for processing (5)
frontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/resourceStatusesAppSet.tsfrontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyAppSet.test.tsfrontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyAppSet.tsfrontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyUtils.test.tsfrontend/src/routes/Applications/ApplicationDetails/ApplicationTopology/model/topologyUtils.ts
Signed-off-by: fxiang1 <fxiang@redhat.com>
|
/retest |
1 similar comment
|
/retest |
📝 Summary
Ticket Summary (Title):
ACM 2.17 some elements of a VirtualMachine are not displayed correctly
Summary of fix:
Ticket Link:
https://redhat.atlassian.net/browse/ACM-34020
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)If Feature
If Bugfix
🗒️ Notes for Reviewers
Before:

After:

Summary by CodeRabbit
New Features
Bug Fixes
Tests