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 1787210: deployment config page contains an error in the pod counter #4157

Conversation

dtaylor113
Copy link
Contributor

Added useEffect to update state variable if # pods changed outside of PodRing component. This happens in the Edit Count modal, which closes without reloading page or remounting PodRing component.

@dtaylor113 dtaylor113 added this to the v4.4 milestone Feb 3, 2020
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: This pull request references Bugzilla bug 1787210, 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.

In response to this:

Bug 1787210: deployment config page contains an error in the pod counter

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 bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. component/shared Related to console-shared labels Feb 3, 2020
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.

/assign @christianvogt

Christian, can you take a look since you're more familiar with this component?

@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/exhaustive-deps */
Copy link
Member

Choose a reason for hiding this comment

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

We should fix the problem instead of ignoring. We definitely shouldn't ignore at the file level.

Copy link
Contributor Author

@dtaylor113 dtaylor113 Feb 3, 2020

Choose a reason for hiding this comment

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

It wants me to add clickCount to the dependency array which I don't think is necessary, I don't want to execute useEffect when clickCount changes, just obj.spec.replicas. I can move the ignore to line-level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, moved ignore to line-level.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dtaylor113 whenever we disable rules, sometimes it's obvious, but when it's not please add a comment otherwise someone else will come in and fix the lint error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @christianvogt, added eslint comment. -thanks

@dtaylor113 dtaylor113 force-pushed the deployment-details-error-in-pod-counter branch from 7c4e5da to 1532107 Compare February 3, 2020 17:50
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 3, 2020
@christianvogt
Copy link
Contributor

This component has other issues.
That debounce function is recreated every render. It should memoize the debounced function.

The intent is that we should be able to continuously click the buttons and adjust the value even though the system hasn't yet caught up to the set values.

I tested this change and it certainly did fix the issue. I think the fix is sufficient and further refinements could be tackled in a tech debt item which I can log.

@dtaylor113 dtaylor113 force-pushed the deployment-details-error-in-pod-counter branch from 1532107 to 094d7ec Compare February 5, 2020 20:44
@christianvogt
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, dtaylor113

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 5, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit f15f1af into openshift:master Feb 6, 2020
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: All pull requests linked via external trackers have merged. Bugzilla bug 1787210 has been moved to the MODIFIED state.

In response to this:

Bug 1787210: deployment config page contains an error in the pod counter

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.

@dtaylor113 dtaylor113 deleted the deployment-details-error-in-pod-counter branch April 27, 2020 14:17
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants