-
Notifications
You must be signed in to change notification settings - Fork 659
Bug 2000096: Git URL is not re-validated on edit build-config form reload #9960
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 2000096: Git URL is not re-validated on edit build-config form reload #9960
Conversation
@yozaam: This pull request references Bugzilla bug 2000096, 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
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 kubernetes/test-infra repository. |
@yozaam: This pull request references Bugzilla bug 2000096, which is valid. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
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
/cc @rohitkrai03 |
/bugzilla refresh |
@rottencandy: This pull request references Bugzilla bug 2000096, which is valid. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
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.
This causes another issue in Git import flow. That is why it was removed from the effect. It is happening because on the first load user adds the git url which trigger onChange and validation runs, but when he click on any other field touched
value changes and triggers another validation.
Screen.Recording.2021-09-02.at.4.57.23.PM.mov
4df8ddd
to
a49c324
Compare
Added a boolean flag to the state to check whether we have just reloaded, passed it down the props to GitSection |
ffd892a
to
21118d2
Compare
frontend/packages/dev-console/src/components/buildconfig/sections/SourceSection.tsx
Outdated
Show resolved
Hide resolved
21118d2
to
a05a8a5
Compare
frontend/packages/dev-console/src/components/import/git/GitSection.tsx
Outdated
Show resolved
Hide resolved
a05a8a5
to
ee97424
Compare
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.
One last small nit.
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.
Nit: No need to import useState separately when you have whole React
namespace available.
const [formReload, setFormReload] = useState<number>(0); | |
const [formReload, setFormReload] = React.useState<number>(0); |
ee97424
to
6136743
Compare
8bac0c1
to
42a451b
Compare
42a451b
to
19b7d91
Compare
/bugzilla refresh The requirements for Bugzilla bugs have changed, recalculating validity. |
@openshift-merge-robot: This pull request references Bugzilla bug 2000096, which is invalid:
Comment 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 kubernetes/test-infra repository. |
/bugzilla refresh |
@yozaam: This pull request references Bugzilla bug 2000096, which is valid. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
@rohitkrai03 can i get /lgtm |
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.
Maybe it's better to put this in formik state only. That way you wouldn't need to pass this down as a prop to children components several levels down to GitSection
.
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.
okay, added formReloadCount to context
19b7d91
to
0d11766
Compare
@yozaam: This pull request references Bugzilla bug 2000096, which is valid. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rohitkrai03, rottencandy, yozaam 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 |
@yozaam: All pull requests linked via external trackers have merged: Bugzilla bug 2000096 has been moved to the MODIFIED state. 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 kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-6298
Analysis / Root cause:
When we reload the page, the git url handler is not getting called -> since we are only calling it
Solution Description:
Screen shots / Gifs for design review:
Unit test coverage report:
Test setup:
Browser conformance: