-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix link to removed volumes being shown in info card and list view #8833
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #8833 +/- ##
============================================
+ Coverage 14.97% 15.42% +0.45%
- Complexity 11049 11818 +769
============================================
Files 5390 5475 +85
Lines 470964 478624 +7660
Branches 59210 60820 +1610
============================================
+ Hits 70528 73834 +3306
- Misses 392599 396657 +4058
- Partials 7837 8133 +296
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
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.
clgtm
qa does not seem to be responsive, not tested! |
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.
LGTM
I manually tested by creating a volume snapshot and then deleting the volume.
Before the proposed changes
- The snapshot details page shows a link to the volume even after the volume has been removed.
- Clicking the link redirected me to a 404 page.
I'm not sure if this is within the scope of this PR, but on the Volume Snapshots page, where it displays the list of volume snapshots, a link to the removed volume is still being shown and redirects to a 404 page.
@winterhazel , I marked this for 4.20 now as it is targeted for main. Do you want this in 4.19? |
Thanks for testing @lucas-a-martins. At first, I think the issue regarding invalid links in the list view should be tackled in another PR, but I'll investigate how it could be implemented to see if it makes sense to unify how the validation is performed with this one.
@DaanHoogland sure, I'll target 4.19. |
Hey @lucas-a-martins @DaanHoogland, sorry for the delay. Looking back at this PR, I think it would be better to implement the link validation in both pages by including the volume's state in the main response and verifying it in the UI, as the approach here (calling another API to obtain a single volume's data) would become unfeasible when we need to validate links for a lot of resources (such as in the volume snapshots page). I suppose this would also be the ideal approach for validating most links to resources. I will make some changes in this PR to adjust this, and to include the validation in the volume snapshots page as well. |
@lucas-a-martins @DaanHoogland, I changed how the link validation is performed, and included it in the list view as well. Could you guys take another look at this PR? |
e558ca6
to
62e405d
Compare
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
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.
clgtm
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.
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10444 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian Build Failed (tid-10948) |
[SF] Trillian test result (tid-10950)
|
Merging based on approvals, CI result and manual tests by @lucas-a-martins |
…pache#8833) * Framework for validating links in the front-end * Rename valid links map in the list view
Description
The volume snapshots and the snapshot details page show a link to the snapshotted volume. However, if the volume has been removed, it is not possible to access its page, resulting in a 404 when a user clicks the link.
This PR adds a validation in the UI in order to avoid showing this link when the volume has been removed.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
When the volume exists, a link is shown.
If the volume has been removed, the link does not get shown.
How Has This Been Tested?