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

WINC-607: [e2e] Skip MachineSet update in deletion test #899

Closed

Conversation

jrvaldes
Copy link
Contributor

@jrvaldes jrvaldes commented Feb 8, 2022

This PR skips the MachineSet update in the Windows node deletion
test if no MachineSet is found with the Windows label. This is a
corner case for platform-agnostic infrastructure and e2e tests
executions where no instances are configured via MachineController, for
example: hack/run-ci-e2e-test.sh -m 0.

This commit skips the MachineSet update in the Windows node deletion
test if no MachineSet is found with the Windows label. This is a
corner case for platform-agnostic infrastructure and e2e tests
executions where no instances are configured via MachineController, for
example: `hack/run-ci-e2e-test.sh -m 0`.
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 8, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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 Feb 8, 2022
@jrvaldes
Copy link
Contributor Author

jrvaldes commented Feb 8, 2022

/test ?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 8, 2022

@jrvaldes: The following commands are available to trigger required jobs:

  • /test aws-e2e-ccm-install
  • /test aws-e2e-operator
  • /test aws-e2e-upgrade
  • /test azure-e2e-operator
  • /test build
  • /test ci-index
  • /test images
  • /test lint
  • /test platform-none-vsphere-e2e-operator
  • /test unit
  • /test vsphere-e2e-operator

The following commands are available to trigger optional jobs:

  • /test azure-e2e-ccm-install

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-windows-machine-config-operator-master-aws-e2e-ccm-install
  • pull-ci-openshift-windows-machine-config-operator-master-aws-e2e-operator
  • pull-ci-openshift-windows-machine-config-operator-master-aws-e2e-upgrade
  • pull-ci-openshift-windows-machine-config-operator-master-azure-e2e-operator
  • pull-ci-openshift-windows-machine-config-operator-master-build
  • pull-ci-openshift-windows-machine-config-operator-master-ci-index
  • pull-ci-openshift-windows-machine-config-operator-master-images
  • pull-ci-openshift-windows-machine-config-operator-master-lint
  • pull-ci-openshift-windows-machine-config-operator-master-unit
  • pull-ci-openshift-windows-machine-config-operator-master-vsphere-e2e-operator

In response to this:

/test ?

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
Copy link
Contributor

openshift-ci bot commented Feb 8, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jrvaldes
To complete the pull request process, please assign aravindhp after the PR has been reviewed.
You can assign the PR to them by writing /assign @aravindhp in a comment when ready.

The full list of commands accepted by this bot can be found 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

@jrvaldes
Copy link
Contributor Author

jrvaldes commented Feb 8, 2022

/test aws-e2e-operator

@jrvaldes
Copy link
Contributor Author

jrvaldes commented Feb 8, 2022

/test lint

@jrvaldes jrvaldes marked this pull request as ready for review February 9, 2022 15:12
@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 Feb 9, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 9, 2022

@jrvaldes: 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.

@jrvaldes
Copy link
Contributor Author

/cherry-pick release-4.10

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.10

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.

@jrvaldes
Copy link
Contributor Author

/cherry-pick community-4.9

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick community-4.9

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.

@jrvaldes
Copy link
Contributor Author

/cherry-pick release-4.9

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.9

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.

@jrvaldes
Copy link
Contributor Author

/cherry-pick community-4.8

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick community-4.8

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.

@jrvaldes
Copy link
Contributor Author

/cherry-pick release-4.8

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-4.8

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

@saifshaikh48 saifshaikh48 left a comment

Choose a reason for hiding this comment

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

/lgtm

minor comment which shouldn't prevent merging IMO

@@ -115,7 +115,10 @@ func testWindowsNodeDeletion(t *testing.T) {
testCtx, err := NewTestContext()
require.NoError(t, err)

// set excepted node count to zero, since all Windows Nodes should be deleted in the test
expectedNodeCount := int32(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'd prefer this initialized closer to its usage (around line 132)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True and agree. I moved it up here to facilitate a more natural flow to the MachineSets logic.

  • Fetch the MachineSets
  • Filter the MachineSets
  • Check the MachineSet with the Windows Label

Happy to move it closer, in case we need to.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2022

// skip the scale down step if there is no MachineSet with Windows label
if windowsMachineSetWithLabel != nil {
// Scale the Windows MachineSet to 0
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment was more meaningful where we used to set expectedNodeCount := int32(0) next line. It would be good if you can move it back here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

expectedNodeCount := int32(0) does not scale Windows MachineSet to 0, testCtx.client.Machine.MachineSets(clusterinfo.MachineAPINamespace).Update(...) does.

In addition, expectedNodeCount is used outside of the if block, so moved it up to avoid duplication.

Copy link
Contributor

Choose a reason for hiding this comment

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

but we are setting it in windowsMachineSetWithLabel.Spec.Replicas = &expectedNodeCount which is used in update call.
anyways this is very minor.

@selansen
Copy link
Contributor

/lgtm

@sebsoto
Copy link
Contributor

sebsoto commented Feb 23, 2022

@jrvaldes please run the platform none test on this PR to ensure the correct behavior is being seen

@jrvaldes
Copy link
Contributor Author

jrvaldes commented Feb 23, 2022

@jrvaldes please run the platform none test on this PR to ensure the correct behavior is being seen

For the test to pass needs #900

@jrvaldes
Copy link
Contributor Author

/close

Closing this PR to cover all e2e test adjustments for platform-none in #896, where the platform-none-vsphere-e2e-operator job must pass.

@jrvaldes jrvaldes closed this Feb 24, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 24, 2022

@jrvaldes: Closed this PR.

In response to this:

/close

Closing this PR to cover all e2e test adjustments for platform-none in #896, where the platform-none-vsphere-e2e-operator job must pass.

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.

@jrvaldes jrvaldes deleted the WINC-607-ignore-machine-deletion branch March 17, 2022 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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