Skip to content

InstallPlan wait for condition update#2510

Merged
timflannagan merged 1 commit intooperator-framework:masterfrom
akihikokuroda:fix2509
Jan 18, 2022
Merged

InstallPlan wait for condition update#2510
timflannagan merged 1 commit intooperator-framework:masterfrom
akihikokuroda:fix2509

Conversation

@akihikokuroda
Copy link
Copy Markdown
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 requested review from benluddy and hasbro17 December 6, 2021 19:15
@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
Copy Markdown

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.

Details

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
Copy Markdown
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
Comment thread test/e2e/installplan_e2e_test.go Outdated
Copy link
Copy Markdown
Member

@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
Copy Markdown
Member

@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
Copy Markdown
Member

/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
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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.

Comment thread test/e2e/installplan_e2e_test.go Outdated
return false
}
return hasCondition(fetchedInstallPlan, cond)
}, 1*time.Minute, interval).Should(BeTrue())
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

Details 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
Copy Markdown
Member

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
Copy Markdown
Member

/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
Copy Markdown
Member

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