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

OCPBUGS-33011: fix issues with Edit Route form #13799

Merged
merged 1 commit into from Apr 26, 2024

Conversation

rhamilto
Copy link
Member

@rhamilto rhamilto commented Apr 25, 2024

After:

Screen.Recording.2024-04-26.at.1.20.12.PM.mov

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 25, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 25, 2024
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-33011, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

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

The bug has been updated to refer to the pull request using the external bug tracker.

In 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.

@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 25, 2024
@@ -66,7 +66,7 @@ class CreateRouteWithTranslation extends React.Component<
namespace: getActiveNamespace(),
labels: {},
portOptions: {},
alternateServices: [],
alternateBackends: [],
Copy link
Member Author

Choose a reason for hiding this comment

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

Throughout the PR: use alternateBackends to align with the Route schema.

alternateServices: updatedServiceEntriesArray,
};
});
this.setState(
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes a console error resulting from the nested setState calls. Fix is to move the second setState to a callback.

@@ -342,7 +346,7 @@ class CreateRouteWithTranslation extends React.Component<
className="pf-v5-c-form-control"
type="text"
onChange={this.handleChange}
value={this.state.path}
value={this.state.path ?? ''} // this.state.path can be set to undefined in componentDidMount
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes a console error related to controlled component changing to an uncontrolled one.

@@ -426,7 +430,8 @@ class CreateRouteWithTranslation extends React.Component<
{!_.isEmpty(portOptions) && (
<Dropdown
items={portOptions}
title={portOptions[targetPort] || t('public~Select target port')}
title={t('public~Select target port')}
selectedKey={_.isNumber(targetPort) ? UNNAMED_PORT_KEY : targetPort} // if targetPort is a number, it's an unnamed port
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix so the Target port dropdown is correctly populated when editing (before the dropdown did not have a selected value).

if (!_.isEmpty(alternateBackends)) {
route.spec.alternateBackends = alternateBackends;
}
route.spec.alternateBackends = altBackends;
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes the bug as reported in the Jira issue. Passing an empty array is ok!

validationSchema={routeValidationSchema}
enableReinitialize
<>
<Helmet>
Copy link
Member Author

Choose a reason for hiding this comment

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

Add missing <title>

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 26, 2024
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-33011, which is valid. The bug has been moved to the POST state.

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

In response to this:

After:

Screen.Recording.2024-04-26.at.1.20.12.PM.mov

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 26, 2024
@rhamilto rhamilto changed the title [WIP] OCPBUGS-33011: fix issues with Edit Route form OCPBUGS-33011: fix issues with Edit Route form Apr 26, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 26, 2024
@rhamilto
Copy link
Member Author

/assign @jhadvig, @TheRealJon

Copy link
Member

@TheRealJon TheRealJon left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 26, 2024
Copy link
Contributor

openshift-ci bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, 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

@rhamilto
Copy link
Member Author

/cherry-pick release-4.15

@openshift-cherrypick-robot

@rhamilto: once the present PR merges, I will cherry-pick it on top of release-4.15 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.15

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
Contributor

openshift-ci bot commented Apr 26, 2024

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit acd4ec1 into openshift:master Apr 26, 2024
6 checks passed
@openshift-ci-robot
Copy link
Contributor

@rhamilto: Jira Issue OCPBUGS-33011: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-33011 has been moved to the MODIFIED state.

In response to this:

After:

Screen.Recording.2024-04-26.at.1.20.12.PM.mov

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.

@openshift-cherrypick-robot

@rhamilto: new pull request created: #13800

In response to this:

/cherry-pick release-4.15

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.

@rhamilto rhamilto deleted the OCPBUGS-33011 branch April 26, 2024 22:39
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-04-29-222758

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. component/core Related to console core functionality jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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

5 participants