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

Increase probability of flake check to reveal flakes #9840

Merged
merged 2 commits into from Jul 4, 2023

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Jun 2, 2023

What this PR does / why we need it:

According to A Survey of Flaky Tests, Section Detection

  • almost all flaky tests were independent of the execution
    platform, so environmental issues should be considered with
    higher priority
  • devs may be unaware of many flakes due to order-dependent
    tests
  • simple techniques of reversing or shuffling the test order
    may be more efficient and effective than more sophisticated
    approaches
  • “One study found that 88% of flaky tests were found to
    consecutively fail up to a maximum of five times before
    passing,
    though another reported finding new flaky tests even after
    10,000 test suite runs.”

Therefore we by default

  • use only latest kubevirtci provider,
  • run all changed tests five times and
  • randomize the test order each time

We fix a couple of deprecated ginkgo flags along the way.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

Increase probability for flake checker script to find flakes

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
According to https://dl.acm.org/doi/abs/10.1145/3476105
* almost all flaky tests were independent of the execution
  platform, so environmental issues should be considered with
  higher priority
* devs may be unaware of many flakes due to order-dependent
  tests
* simple techniques of reversing or shuffling the test order
  may be more efficient and effective than more sophisticated
  approaches
* “One study found that 88% of flaky tests were found to
   consecutively fail up to a maximum of five times before
   passing,
   though another reported finding new flaky tests even after
   10,000 test suite runs.”

Therefore we by default
* use only latest kubevirtci provider,
* run all changed tests five times and
* randomize the test order each time

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M labels Jun 2, 2023
@dhiller
Copy link
Contributor Author

dhiller commented Jun 3, 2023

/cc @enp0s3 @xpivarc

@dhiller dhiller changed the title Improve flake check presubmit Increase probability of flake check to reveal flakes Jun 12, 2023
@dhiller
Copy link
Contributor Author

dhiller commented Jul 3, 2023

@xpivarc

/cc @brianmcarey

Copy link
Contributor

@fossedihelm fossedihelm left a comment

Choose a reason for hiding this comment

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

Thanks @dhiller! Can you answer my question below?

@@ -66,7 +66,7 @@ function functest() {
KUBEVIRT_FUNC_TEST_SUITE_ARGS="-skip-dual-stack-test ${KUBEVIRT_FUNC_TEST_SUITE_ARGS}"
fi

_out/tests/ginkgo -timeout=3h -r -slow-spec-threshold=60s "$@" _out/tests/tests.test -- -kubeconfig=${kubeconfig} -container-tag=${docker_tag} -container-tag-alt=${docker_tag_alt} -container-prefix=${functest_docker_prefix} -image-prefix-alt=${image_prefix_alt} -oc-path=${oc} -kubectl-path=${kubectl} -gocli-path=${gocli} -installed-namespace=${namespace} -previous-release-tag=${PREVIOUS_RELEASE_TAG} -previous-release-registry=${previous_release_registry} -deploy-testing-infra=${deploy_testing_infra} -config=${kubevirt_test_config} --artifacts=${ARTIFACTS} --operator-manifest-path=${OPERATOR_MANIFEST_PATH} --testing-manifest-path=${TESTING_MANIFEST_PATH} ${KUBEVIRT_FUNC_TEST_SUITE_ARGS} -virtctl-path=${virtctl_path} -example-guest-agent-path=${example_guest_agent_path}
_out/tests/ginkgo -timeout=3h -r "$@" _out/tests/tests.test -- -kubeconfig=${kubeconfig} -container-tag=${docker_tag} -container-tag-alt=${docker_tag_alt} -container-prefix=${functest_docker_prefix} -image-prefix-alt=${image_prefix_alt} -oc-path=${oc} -kubectl-path=${kubectl} -gocli-path=${gocli} -installed-namespace=${namespace} -previous-release-tag=${PREVIOUS_RELEASE_TAG} -previous-release-registry=${previous_release_registry} -deploy-testing-infra=${deploy_testing_infra} -config=${kubevirt_test_config} --artifacts=${ARTIFACTS} --operator-manifest-path=${OPERATOR_MANIFEST_PATH} --testing-manifest-path=${TESTING_MANIFEST_PATH} ${KUBEVIRT_FUNC_TEST_SUITE_ARGS} -virtctl-path=${virtctl_path} -example-guest-agent-path=${example_guest_agent_path}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify why the slow spec threshold is now 60 instead of 30?

Copy link
Contributor Author

@dhiller dhiller Jul 4, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad! I got confused with colors 🤦

Copy link
Member

@xpivarc xpivarc left a comment

Choose a reason for hiding this comment

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

/approve
/hold
Hold, to make sure we don't use seed.

automation/repeated_test.sh Show resolved Hide resolved
@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 4, 2023
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xpivarc

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 4, 2023
@fossedihelm
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2023
@xpivarc
Copy link
Member

xpivarc commented Jul 4, 2023

/hold cancel

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 4, 2023
@dhiller
Copy link
Contributor Author

dhiller commented Jul 4, 2023

/skip

@dhiller
Copy link
Contributor Author

dhiller commented Jul 4, 2023

/retest-required

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Jul 4, 2023

@dhiller: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubevirt-e2e-k8s-1.26-sig-compute 38111a2 link unknown /test pull-kubevirt-e2e-k8s-1.26-sig-compute

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.

@kubevirt-bot kubevirt-bot merged commit c6acb5c into kubevirt:main Jul 4, 2023
35 of 36 checks passed
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 the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants