Skip to content
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

Bug 1890180: Bug 1913969: Fix edge case exception for fieldDependency spec descriptor and add support for non-sibling control fields. #7957

Merged
merged 1 commit into from Feb 1, 2021

Conversation

TheRealJon
Copy link
Member

The form field sort ordering logic was causing a stack overflow when the control field an dependent field had the same name. Resolved by keeping track of the current path and control field path to differentiate between the two. This also fixes https://bugzilla.redhat.com/show_bug.cgi?id=1890180

The form field sort ordering logic was causing a stack overflow when the control field an dependent
field had the same name. Resolved by keeping track of the current path and control field path to
differentiate between the two. This also fixes https://bugzilla.redhat.com/show_bug.cgi?id=1890180
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 27, 2021
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Bugzilla bug 1913969, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1913969: Fix edge case exception for fieldDependency spec descriptor

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 kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the component/olm Related to OLM label Jan 27, 2021
@openshift-ci-robot openshift-ci-robot added the component/shared Related to console-shared label Jan 27, 2021
@TheRealJon
Copy link
Member Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 27, 2021
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This pull request references Bugzilla bug 1913969, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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 kubernetes/test-infra repository.

@spadgett
Copy link
Member

/override ci/prow/ceph-storage-plugin

The ceph-storage-plugin job should only have run on PRs with changes to frontend/packages/ceph-storage-plugin. It failed due to an unrelated CI config change. Overriding status on this PR.

@openshift-ci-robot
Copy link
Contributor

@spadgett: Overrode contexts on behalf of spadgett: ci/prow/ceph-storage-plugin

In response to this:

/override ci/prow/ceph-storage-plugin

The ceph-storage-plugin job should only have run on PRs with changes to frontend/packages/ceph-storage-plugin. It failed due to an unrelated CI config change. Overriding status on this PR.

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 kubernetes/test-infra repository.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor nits, but I wouldn't hold the PR on either comment.

/lgtm

// If this property is a dependent, it's weight is based on it's control field
if (controlFieldName) {
return getJSONSchemaPropertySortWeight(controlFieldName, jsonSchema, uiSchema) + offset;
// If this property or it's children have a control field at the current path, it's weight is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// If this property or it's children have a control field at the current path, it's weight is
// If this property or its children have a control field at the current path, it's weight is

.toJS();

return {
...(uiOrder.length > 1 && { 'ui:order': uiOrder }),
..._.reduce(
jsonSchema?.properties ?? {},
(orderAccumulator, propertySchema, propertyName) => {
const descendantOrder = getJSONSchemaOrder(propertySchema, uiSchema?.[propertyName]);
const descendantOrder = getJSONSchemaOrder(
propertySchema as JSONSchema6,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you simply declare the type above in the function definition like

(orderAccumulator, propertySchema: JSONSchema6, propertyName) => {

This is more type safe than using as

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spadgett, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2021
@openshift-merge-robot openshift-merge-robot merged commit a4fa2de into openshift:master Feb 1, 2021
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: All pull requests linked via external trackers have merged:

Bugzilla bug 1913969 has been moved to the MODIFIED state.

In response to this:

Bug 1913969: Fix edge case exception for fieldDependency spec descriptor

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 kubernetes/test-infra repository.

@TheRealJon TheRealJon deleted the 1913969 branch February 2, 2021 15:52
@spadgett spadgett added this to the v4.7 milestone Feb 5, 2021
@TheRealJon TheRealJon changed the title Bug 1913969: Fix edge case exception for fieldDependency spec descriptor Bug 1890180: Bug 1913969: Fix edge case exception for fieldDependency spec descriptor and add support for non-sibling control fields. Feb 8, 2021
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: All pull requests linked via external trackers have merged:

Bugzilla bug 1890180 has been moved to the MODIFIED state.

In response to this:

Bug 1890180: Bug 1913969: Fix edge case exception for fieldDependency spec descriptor and add support for non-sibling control fields.

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 kubernetes/test-infra repository.

@TheRealJon
Copy link
Member Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@TheRealJon: Bugzilla bug 1890180 is in an unrecognized state (MODIFIED) and will not be moved to the MODIFIED state.

In response to this:

/bugzilla refresh

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 kubernetes/test-infra repository.

@TheRealJon
Copy link
Member Author

Fixes #8120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/olm Related to OLM component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants