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 1813369: Wrong key for selecting nodes in MachineConfigPool #4927
Bug 1813369: Wrong key for selecting nodes in MachineConfigPool #4927
Conversation
@dtaylor113: This pull request references Bugzilla bug 1813369, 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. |
/cherry-pick release-4.4 |
@dtaylor113: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you. 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. |
@@ -155,7 +155,7 @@ const MachineConfigPoolCounts: React.SFC<MachineConfigPoolCountsProps> = ({ obj | |||
|
|||
const MachineConfigPoolSummary: React.SFC<MachineConfigPoolSummaryProps> = ({ obj }) => { | |||
const machineConfigSelector = _.get(obj, 'spec.machineConfigSelector'); | |||
const machineSelector = _.get(obj, 'spec.machineSelector'); | |||
const nodeSelector = _.get(obj, 'spec.nodeSelector'); | |||
return ( | |||
<ResourceSummary resource={obj}> |
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.
Pass showNodeSelector
to ResourceSummary
and remove the logic for it here.
baea3e6
to
54f6875
Compare
return obj.kind === 'Pod' || obj.kind === 'MachineConfigPool' | ||
? 'spec.nodeSelector' | ||
: 'spec.template.spec.nodeSelector'; |
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.
Hm, I forgot about this.
It would be better to pass the path in like we do for podSelector
instead of hard-coding types here.
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.
Hi @spadgett, fixed.
Updated last 'After' screenshot in PR description.
@dtaylor113: This pull request references Bugzilla bug 1813369, 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. |
55646b8
to
e375bae
Compare
e375bae
to
c83cbb7
Compare
@@ -49,14 +49,14 @@ export const ResourceSummary: React.SFC<ResourceSummaryProps> = ({ | |||
showAnnotations = true, | |||
showTolerations = false, | |||
podSelector = 'spec.selector', | |||
nodeSelector = '', |
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.
nodeSelector = '', | |
nodeSelector = 'spec.template.spec.nodeSelector', |
}) => { | ||
const { metadata, type } = resource; | ||
const reference = referenceFor(resource); | ||
const model = modelFor(reference); | ||
const nodeSelectorPath = getNodeSelectorPath(resource); | ||
const nodeSelectorPath = _.isEmpty(nodeSelector) ? getNodeSelectorPath(resource) : nodeSelector; |
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.
Remove getNodeSelectorPath
and pass it in for the one other exception we have for pods.
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.
@spadgett fixed as you suggested. Wish there was a way to search and be certain that there was only 'one other [Pod] exception'. I see some <ResourceSummary ../>
's use item.obj
:
These are used by TopologyResourcePanel.tsx. Clicking around Topology viewer I can't bring up any Pod objects, but not 100% sure one can't.
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.
Hi, just confirmed with @jeff-phillips-18 that Pods aren't items shown in the topology view. So passing item.obj
to <ResourceSummary />
on the topology side panel is ok and we don't have to pass a nodeSelector
path for Pods.
c83cbb7
to
ef4877c
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtaylor113, spadgett 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@dtaylor113: All pull requests linked via external trackers have merged: openshift/console#4927. Bugzilla bug 1813369 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. |
@dtaylor113: new pull request created: #4963 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. |
Before
After