Bug 1890180
| Summary: | FieldDependency x-descriptor doesn't support non-sibling fields | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Marko Luksa <mluksa> | |
| Component: | Management Console | Assignee: | Jon Jackson <jonjacks> | |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 4.5 | CC: | aos-bugs, jokerman, jonjacks, yanpzhan | |
| Target Milestone: | --- | |||
| Target Release: | 4.7.0 | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
Cause: Field dependency spec descriptor logic was not designed or tested with non-sibling dependencies.
Consequence: Non-sibling dependencies were not guaranteed to behave as expected.
Fix: Revised the logic (mainly around sort order) to ensure that non-sibling dependencies behave as expected.
Result: Non-sibling field dependencies are now supported.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1926344 (view as bug list) | Environment: | ||
| Last Closed: | 2021-02-24 15:27:22 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
Came in near the end of the sprint. Will take a look next sprint. Still haven't had a chance to get to this. This fell low on priority because of other, higher severity bugs. Will address when I don't have higher sev bugs in my queue. This bug is fixed by https://github.com/openshift/console/pull/7957. The edge case that this PR fixes also adds support for arbitrary dependency control fields. *** Bug 1926344 has been marked as a duplicate of this bug. *** Target release set to 4.7 because the PR that fixes this was already merged before the 4.7 release. @Jon, Hi, which operator do you suggest we can use to reproduce/verify this bug? I installed "Red Hat OpenShift Jaeger" operator, could not find snippet for "- displayName: Jaeger Storage Type". Hi Yanping, I've created a gist for that you can use to verify this: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562 Just create these resources, then navigate to Installed Operators > Mock Operator > Create Mock Resource. On the form, there should be a form field "Nested Field Dependency" that verifies this bug. There is a switch at "Nested Field Dependency > Enabled" which determines the visibility of the "Nested Field Dependency > Settings > Enabled" switch. Thanks very much, Jon! Checked on ocp 4.7 cluster with payload 4.7.0-0.nightly-2021-02-09-192846. Created mock crd and csv from file in Comment 11, then on "Installed Operators > Mock Operator > Create Mock Resource" page, in form field "Nested Field Dependency", could choose true or false for enable to control the visibility of the "Nested Field Dependency > Settings > Enabled" switch, after click "Create", could see the related field on instance details page correctly. The bug is fixed. 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.7.0 security, bug fix, and enhancement 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. https://access.redhat.com/errata/RHSA-2020:5633 |
Description of problem: According to the docs, the urn:alm:descriptor:com.tectonic.ui:fieldDependency is only supported for fields that are siblings. In our (IMHO perfectly valid) use-case, we need to depend on a field that is much further away in the tree: - displayName: Jaeger Storage Type description: Set storage type for Jaeger (applies only when Jaeger is selected as the tracing provider) path: addons.jaeger.install.storage.type x-descriptors: - 'urn:alm:descriptor:com.tectonic.ui:fieldDependency:tracing.type:Jaeger' ... Version-Release number of selected component (if applicable): 4.5.11 How reproducible: Although this seems to work fine (most of the time?), it's not officially supported, but I don't see why it shouldn't be.