-
Notifications
You must be signed in to change notification settings - Fork 671
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
test_env.py: add more attempts when executing ssh command #9015
test_env.py: add more attempts when executing ssh command #9015
Conversation
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have the "retry" capability in a separate function that could be used with run_with_stdout_logging
whenever there is a need.
The interface of run_with_stdout_logging
is standardized - things are good when result.returncode == 0
, so the wrapper has the ability to know what's going on. As a result, the wrapper could either return the first result corresponding to the 0 return code, or it would return the last result obtained at the retry limit.
Such function would enable retry functionality for other use cases in the project.
233b8a8
to
00057dc
Compare
Hello @matusmarhefka! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-06-24 15:10:05 UTC |
Introduces more attempts when executing ssh command. This should prevent race conditions when we try to connect to a VM after a snapshot revert which might not be fully finished, might help with ComplianceAsCode#8914
00057dc
to
498c456
Compare
Code Climate has analyzed commit 498c456 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 42.7% (0.0% change). View more on Code Climate. |
LGTM, Thank you for the PR! |
isn't this enough to close #8914 ? |
Introduces more attempts when executing ssh command.
This should prevent race conditions when we try to connect
to a VM after a snapshot revert which might not be fully
finished, might help with
#8914