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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix flaky tests by introducing komega #252

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Dec 2, 2023

This change will hopefully fix the flaky integration tests that have been annoying me in several PRs. I like Ginkgo/Gomega, but I know the maintainers are not big fans. 馃榿 But as long as we are using Ginkgo/Gomega, I think komega (part of controller-runtime) makes the code more compact and avoids attempts on outdated test resource updates.

/cc @inteon @SgtCoDFish

Signed-off-by: Erik Godding Boye <egboye@gmail.com>
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 2, 2023
@inteon
Copy link
Member

inteon commented Dec 4, 2023

/test pull-trust-manager-smoke

Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

I wasn't aware of komega but it definitely looks like it makes things simpler! Even if this doesn't fix flakes I feel like it makes things easier to reason about.

I like Ginkgo/Gomega, but I know the maintainers are not big fans.

I should expand on this: I feel personally that these tools make the tests harder to understand. I've also been burned by the big changes introduced in Ginkgo v2 which meant we had (and have) to do lots of work to port to the new test format.

Specifically, the flakiness of these tests could be caused by many things but I find the flow so confusing with ginkgo that I can't be sure of where the issue is actually introduced.

I'd prefer plain old go tests - I've never really felt like ginkgo adds much for me personally. But if we can get these tests to be non-flaky with ginkgo, I see no reason to rush to move away from it!

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2023
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2023
@jetstack-bot jetstack-bot merged commit 131a37c into cert-manager:main Dec 4, 2023
4 checks passed
@erikgb
Copy link
Contributor Author

erikgb commented Jan 2, 2024

/cherrypick release-0.7

Required to cherry-pick #260.

@jetstack-bot
Copy link
Contributor

@erikgb: #252 failed to apply on top of branch "release-0.7":

Applying: test: fix flaky tests by introducing komega
Using index info to reconstruct a base tree...
M	test/integration/bundle/suite.go
Falling back to patching base and 3-way merge...
Auto-merging test/integration/bundle/suite.go
CONFLICT (content): Merge conflict in test/integration/bundle/suite.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 test: fix flaky tests by introducing komega
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-0.7

Required to cherry-pick #260.

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.

@erikgb
Copy link
Contributor Author

erikgb commented Jan 2, 2024

Created manual cherry-pick PR: #264

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. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants