-
Notifications
You must be signed in to change notification settings - Fork 52
CNV-66290:cluster role edit cannot add network interface for the vm #3187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNV-66290:cluster role edit cannot add network interface for the vm #3187
Conversation
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aviavissar 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 |
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 143 files out of 250 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the WalkthroughTwo UI component files were simplified: NetworkInterfaceNetworkSelect now renders SelectTypeahead unconditionally, removing the loading conditional gate. AddNetworkInterfaceButton eliminated permission gating logic, making the button always actionable without permission pre-checks. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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 |
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/utils/components/NetworkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx(1 hunks)src/views/virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx(1 hunks)users.htpasswd(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: unit-test
- GitHub Check: build
- GitHub Check: i18n
🔇 Additional comments (1)
src/views/virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx (1)
36-52: Verify permission handling in the submission flow.The permission gating has been completely removed, allowing all users to open the modal regardless of their capabilities. While this aligns with the PR's goal of enabling the Edit role, ensure that:
- Permission validation occurs during the actual network interface creation (in the modal's submit handler or API layer)
- Users without permissions receive a clear, actionable error message if they attempt to submit
- The Edit role is correctly configured with the necessary permissions in the backend
Run the following script to verify where permission validation occurs in the submission flow:
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Outdated
Show resolved
Hide resolved
af6b050 to
d94d8f6
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
d94d8f6 to
04f38b5
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Outdated
Show resolved
Hide resolved
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Show resolved
Hide resolved
04f38b5 to
dddf961
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
39f8417 to
753f57e
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/utils/components/NetworkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx(1 hunks)src/views/virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/utils/components/NetworkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: unit-test
- GitHub Check: i18n
- GitHub Check: build
.../virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx
Show resolved
Hide resolved
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Outdated
Show resolved
Hide resolved
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Outdated
Show resolved
Hide resolved
753f57e to
9179660
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/utils/components/NetworkInterfaceModal/utils/constants.ts (1)
1-10: Align constant naming with guidelines and consider translation timing
showErrorTextlives in autils/constants.tsfile, but its name is camelCase and not in the uppercase‑with‑underscores style we use for utility constants. Consider renaming to something likeNETWORK_ATTACHMENT_DEFINITIONS_ERROR_TEXT(or similar) to match the guidelines and improve clarity.Also, note that calling
t(...)at module scope will fix the string at import time. If the console supports changing locale at runtime, this constant will not react to language changes. In that case, it may be safer to either:
- export a function that calls
t(...)when needed, or- keep only a key/descriptor here and perform the actual
t(...)call inside the component using the translation hook.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/utils/components/NetworkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx(2 hunks)src/utils/components/NetworkInterfaceModal/utils/constants.ts(1 hunks)src/views/virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/views/virtualmachines/details/tabs/configuration/network/components/AddNetworkInterfaceButton.tsx
- src/utils/components/NetworkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.ts: Use.tsfile extension for non-component files containing logic or utilities.
Define constants in utility files with uppercase and underscore-separated naming (e.g.,API_URL).
If a TypeScript type is exported, add it to a utility file.
Files:
src/utils/components/NetworkInterfaceModal/utils/constants.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{tsx,ts}: Extract as much logic as possible from components into custom hooks or utility files to improve testability. Avoid bloated components.
Hooks should contain only logic and side effects, not return JSX. Keep JSX in components while using hooks for extracting reusable or unit-testable logic.
Files:
src/utils/components/NetworkInterfaceModal/utils/constants.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{ts,tsx}: Use descriptive names for variables, functions, and components. Avoid abbreviations unless widely recognized.
Prefer usingtypeinstead ofinterfacefor defining the shapes of objects or functions in TypeScript.
Avoid usinganytype in TypeScript as it compromises type safety. Useunknowninstead and narrow the type as needed.
Always explicitly define return types for functions in TypeScript rather than relying on type inference.
Files:
src/utils/components/NetworkInterfaceModal/utils/constants.ts
🧠 Learnings (1)
📚 Learning: 2025-11-20T20:28:17.043Z
Learnt from: galkremer1
Repo: kubevirt-ui/kubevirt-plugin PR: 3118
File: src/views/checkups/self-validation/utils/constants.ts:62-68
Timestamp: 2025-11-20T20:28:17.043Z
Learning: For the kubevirt-ui/kubevirt-plugin repository: The test suite labels in TEST_SUITE_OPTIONS (Compute, Network, Storage, SSP, Tier2) in src/views/checkups/self-validation/utils/constants.ts should not be internationalized, even though they are displayed in the UI.
Applied to files:
src/utils/components/NetworkInterfaceModal/utils/constants.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build
- GitHub Check: unit-test
- GitHub Check: i18n
...orkInterfaceModal/components/NetworkInterfaceNetworkSelect/NetworkInterfaceNetworkSelect.tsx
Outdated
Show resolved
Hide resolved
9179660 to
ea85526
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. 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. |
Use "git add locales" if there are changes in the English translations. It's no longer required to add them manually after the commit. Run i18n in parallel with eslint(TS code) and prettier(json) - the file patterns is overlapping but the translation files are not processed by eslint/prettier - we can write them without conflict. I18n script requires read access to the code/json files which should create no conflicts. This change also disables i18n when there are no staged files i.e. during amending. Signed-off-by: Radoslaw Szwajkowski <[email protected]>
…privillaged users Signed-off-by: batyana <[email protected]>
Signed-off-by: batyana <[email protected]>
ea85526 to
4af1dd9
Compare
|
PR needs rebase. 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. |
|
/retest |
Signed-off-by: aviavissar <[email protected]>
4af1dd9 to
470745d
Compare
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.18.z" version, but no target version was set. 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. |
|
@aviavissar: This pull request references CNV-66290 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. 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. |
|
@aviavissar: 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. |


jira :
https://issues.redhat.com/browse/CNV-66290?filter=12475298
📝 Description
Edit role should be able to add a new interface on the vm in the project
before:
after:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.