-
Notifications
You must be signed in to change notification settings - Fork 659
Bug 2001804: Reload feature on Environment section in Build Config form does not work properly #10004
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 2001804: Reload feature on Environment section in Build Config form does not work properly #10004
Conversation
@yozaam: This pull request references Bugzilla bug 2001804, 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. |
b9d0c7e
to
5ed8af7
Compare
/cc @nemesis09 |
frontend/packages/console-shared/src/components/formik-fields/EnvironmentField.tsx
Outdated
Show resolved
Hide resolved
f501ca5
to
984e0c6
Compare
/retest-required |
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
/lgtm |
@yozaam I see one issue with the configMap key not getting persisted in form view. PTAL at the attached gif |
frontend/packages/console-shared/src/components/formik-fields/EnvironmentField.tsx
Outdated
Show resolved
Hide resolved
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.
i think we memoize it and use environmentVariables
directly in useEffect
as well
const environmentVariables = getEnvironmentVariables(envs); | |
const environmentVariables = React.useMemo(() => { | |
return !_.isEmpty(envs) ? envs.map((env) => _.values(env)) : [['', '']]; | |
},[envs]) |
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.
alright, trying it now
regarding configMap key, can I make a new issue ?
when we select the key on latest master branch also it doesn't appear
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.
yeah, we can log a new one for that.
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.
I believe the issue was caused because a prop had the name key
which is reserved by React
changed the prop to pairKey
984e0c6
to
e615231
Compare
e615231
to
b00f963
Compare
tried this out locally |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: debsmita1, invincibleJai, nemesis09, 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 2001804 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-6300
Analysis / Root cause:
https://issues.redhat.com/browse/ODC-6300?focusedCommentId=18891580&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-18891580
As mentioned here -> the local state is not getting updated with the env values coming from reload ( from formData )
Solution Description:
added hook to set local state when the envs prop changes
Screen shots / Gifs for design review:
Unit test coverage report:
Test setup:
Steps to Reproduce
Browser conformance: