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

OCPBUGS-35416: Wait for ControlPlaneMachineSet to be created when waiting for it to be updated #305

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

JoelSpeed
Copy link
Contributor

Seeing this in presubmits sometimes. One of the tests using this helper expects the CPMS generator to regenerate the CPMS right at the end of the test, but we then immediately call EnsureControlPlaneMachineSetUpdated which expects the CPMS to exist.

In the right conditions, this second helper can catch the generator mid way between delete and create as it regenerates, and that causes the test to fail with a not found error.

This should help to prevent that.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 13, 2024
@openshift-ci-robot
Copy link

@JoelSpeed: This pull request references Jira Issue OCPBUGS-35416, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.17.0) matches configured target version for branch (4.17.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Seeing this in presubmits sometimes. One of the tests using this helper expects the CPMS generator to regenerate the CPMS right at the end of the test, but we then immediately call EnsureControlPlaneMachineSetUpdated which expects the CPMS to exist.

In the right conditions, this second helper can catch the generator mid way between delete and create as it regenerates, and that causes the test to fail with a not found error.

This should help to prevent that.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 13, 2024
@openshift-ci openshift-ci bot requested a review from sunzhaohua2 June 13, 2024 13:33
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 13, 2024
@openshift-ci openshift-ci bot requested review from elmiko and racheljpg June 13, 2024 13:40
cpms := &machinev1.ControlPlaneMachineSet{}
cpms := testFramework.NewEmptyControlPlaneMachineSet()
Eventually(komega.Get(cpms)).Should(Succeed(), "control plane machine set should exist")

Expect(k8sClient.Get(testFramework.GetContext(), testFramework.ControlPlaneMachineSetKey(), cpms)).To(Succeed(), "control plane machine set should exist")
Copy link
Member

Choose a reason for hiding this comment

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

Can/Should we drop this if we have the eventually above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops... I had thought I had done so 😅

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Jun 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2024
Copy link
Contributor

openshift-ci bot commented Jun 13, 2024

@JoelSpeed: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 69ab2b7 into openshift:main Jun 13, 2024
13 checks passed
@openshift-ci-robot
Copy link

@JoelSpeed: Jira Issue OCPBUGS-35416: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-35416 has been moved to the MODIFIED state.

In response to this:

Seeing this in presubmits sometimes. One of the tests using this helper expects the CPMS generator to regenerate the CPMS right at the end of the test, but we then immediately call EnsureControlPlaneMachineSetUpdated which expects the CPMS to exist.

In the right conditions, this second helper can catch the generator mid way between delete and create as it regenerates, and that causes the test to fail with a not found error.

This should help to prevent that.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-control-plane-machine-set-operator-container-v4.17.0-202406140211.p0.g69ab2b7.assembly.stream.el9 for distgit ose-cluster-control-plane-machine-set-operator.
All builds following this will include this PR.

@openshift-cherrypick-robot

@damdo: cannot checkout release: error checking out "release": exit status 1 error: pathspec 'release' did not match any file(s) known to git

In response to this:

/cherry-pick release 4-16

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-sigs/prow repository.

@damdo
Copy link
Member

damdo commented Jun 14, 2024

/cherry-pick release-4.16

@openshift-cherrypick-robot

@damdo: new pull request created: #307

In response to this:

/cherry-pick release-4.16

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-sigs/prow repository.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants