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

InstallPlan wait for condition update #2510

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

akihikokuroda
Copy link
Member

Signed-off-by: akihikokuroda akihikokuroda2020@gmail.com

Description of the change:
There are a small gap between the phase update and the condition update of the InstallPlan. This change makes sure the correct condition is put into the installplan at the beginning of the test.

Motivation for the change:
Closes #2509

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 6, 2021
@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2021

Hi @akihikokuroda. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@akihikokuroda akihikokuroda changed the title wait for condition update InstallPlan wait for condition update Dec 6, 2021
@dinhxuanvu
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 8, 2021
Copy link
Contributor

@timflannagan timflannagan left a comment

Choose a reason for hiding this comment

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

Thanks for continuing to dish these flake/cleanup PRs out - I think these changes are reasonable. I just had one quick comment about simplifying the Eventually block. Any idea on how we could reproduce this more frequently to gauge whether these fixes will remove this flake?

@timflannagan
Copy link
Contributor

@akihikokuroda I'm going to recycle the checks for this PR as well as we may have regressed in CI health in the past couple of weeks and I want to double check whether these changes pop up as failures in the e2e-tests workflow.

@timflannagan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2021
@akihikokuroda
Copy link
Member Author

The unit test failure should be fixed by this: #2521

Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Two nits. Thanks for fixing this.

return false
}
return hasCondition(fetchedInstallPlan, cond)
}, 1*time.Minute, interval).Should(BeTrue())
Copy link
Member

Choose a reason for hiding this comment

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

Non-blocking nit: the minute timeout seems a bit arbitrary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I feel a minute is a little short now. I'll change it to 5.

// first check that a condition with a message exists
fetchedInstallPlan, err := fetchInstallPlanWithNamespace(GinkgoT(), crc, installPlanName, ns.GetName(), buildInstallPlanPhaseCheckFunc(operatorsv1alpha1.InstallPlanPhaseInstalling))
Expect(err).NotTo(HaveOccurred())
Expect(fetchedInstallPlan).NotTo(BeNil())
Copy link
Member

Choose a reason for hiding this comment

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

Based on this return statement within the fetchInstallPlanWithNamespace function, it is possible that the fetchedInstallPlan will be nil if the Get call from the client ever returns nil, nil.

I can't think of a time where this could happen, but we should probably safeguard against it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's right. I'll add nil check for fetchedInstallPaln. Thanks!

Signed-off-by: akihikokuroda <akihikokuroda2020@gmail.com>
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Thanks, nice work on this!

@openshift-ci
Copy link

openshift-ci bot commented Jan 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akihikokuroda, awgreene

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 Jan 17, 2022
return false
}
return hasCondition(fetchedInstallPlan, cond)
}, 5*time.Minute, interval).Should(BeTrue())
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: technically we can drop 5*time.Minute call as it's the global default (and interval might also be the global default but I'm a bit fuzzier on that).

@timflannagan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2022
@timflannagan
Copy link
Contributor

Force merging to try and clear out as many e2e flakes (that don't touch any runtime code) as much as possible.

@timflannagan timflannagan merged commit 08ca061 into operator-framework:master Jan 18, 2022
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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e failure Install Plan when an InstallPlan is created with no valid OperatorGroup present
4 participants