Description of problem:
The 3 react routes defined for VolumeSnapshot  are ambiguous / potentially malformed, they are generic though targeting a specific component. Because of that, they might take precedence over a route defined for another component, and show the wrong component instead of the expected one.
The problem happened to Yadan Pei while testing another feature, https://github.com/openshift/console/pull/8655 : the route "/k8s/ns/yapei/networkpolicies/~new/form" happens to be routed from template "/k8s/ns/:ns/:plural/~new/form" (defined for VolumeSnapshot) instead of the expected "/k8s/ns/:ns/networkpolicies/~new/form" (defined for NetworkPolicy)
Note that the issue hasn't been always reproducible (I actually didn't reproduce it myself), but the issue that Yadan Pei had while testing my PR pointed me to that direction. To this date I don't know what makes it reproducible or not.
Version-Release number of selected component (if applicable):
See above: don't know
Link /k8s/ns/namespace/whatever/~new/form sometimes routed to VolumeSnapshot
Link /k8s/ns/namespace/whatever/~new/form always routed to whatever's component
I'll provide a quick & dirty fix as a workaround in my PR for network policies ( https://github.com/openshift/console/pull/8655 ), however, while investigating I found the problem to be more complex than expected to fix in a clean way, thus I'm writing this ticket.
There's another problem caused by the VolumeSnapshot routes: when a snapshot is being created from a PVC (from PVC details > Actions > Create snapshot), then click on "Edit YAML" link, it redirects to the PVC YAML edition instead of the VolumeSnapshot YAML edition.
Unlike the problem described above, this problem is a bug actually visible on master branch.
1. build bridge from latest master branch and bridge to running cluster, /k8s/ns/yapei/networkpolicies/~new/form is linking to network policy creation form
2. also create snapshot from PVC details > Actions > Create snapshot, then click on "Edit YAML" link, it redirects to the VolumeSnapshot YAML page.
pages are redirected correctly, verified on 4.8.0-0.nightly-2021-05-31-190546
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.