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

Rerun sonobuoy #352

Merged
merged 3 commits into from
Mar 24, 2022
Merged

Rerun sonobuoy #352

merged 3 commits into from
Mar 24, 2022

Conversation

ecpullen
Copy link
Contributor

Issue number:

Closes #181

Description of changes:

Adds a function rerun_failed to the Runner trait. After run is called, rerun_failed will be called up to retries times or Outcome::Pass is returned.

Testing done:

Forced a sonobuoy test to fail and the test was properly rerun.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

agent/test-agent/src/lib.rs Outdated Show resolved Hide resolved
testsys/src/run_aws_k8s.rs Outdated Show resolved Hide resolved
testsys/src/run_vmware.rs Outdated Show resolved Hide resolved
agent/test-agent/src/lib.rs Outdated Show resolved Hide resolved
agent/test-agent/src/lib.rs Outdated Show resolved Hide resolved
bottlerocket/agents/src/bin/sonobuoy-test-agent/main.rs Outdated Show resolved Hide resolved
@ecpullen
Copy link
Contributor Author

^ rebase to develop

@ecpullen ecpullen requested a review from webern March 21, 2022 17:40
Copy link
Contributor

@etungsten etungsten left a comment

Choose a reason for hiding this comment

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

Nice job. Can you also show in the testing description what testsys status shows for a test that went through multiple retries?

Comment on lines 99 to 102
let retries = self.client.retries().await.unwrap_or_default();
let mut retry_count = 0;
while test_results.outcome != Outcome::Pass && retry_count < retries {
info!("Test did not pass, retrying ...");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: might be a good idea to log the number of retries/retry # we're about to attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sonobuoy-test-agent: rerun failed tests
3 participants