This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Fix: #254 by increasing timeout, use backoff module instead of flaky #271
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
product-auto-label
bot
added
the
api: translate
Issues related to the googleapis/python-translate API.
label
Oct 7, 2021
google-cla
bot
added
the
cla: yes
This human has signed the Contributor License Agreement.
label
Oct 7, 2021
leahecole
suggested changes
Oct 8, 2021
samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py
Show resolved
Hide resolved
samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py
Outdated
Show resolved
Hide resolved
nicain
changed the title
feat: use backoff module instead of flaky
Fix: #254 by increasing timeout, use backoff module instead of flaky
Oct 8, 2021
nicain
added
the
automerge
Merge the pull request once unit tests and other checks pass.
label
Oct 11, 2021
@aribray Ping, PTAL? |
aribray
approved these changes
Oct 11, 2021
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.
Looks good to me!
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
gcf-merge-on-green
bot
removed
the
automerge
Merge the pull request once unit tests and other checks pass.
label
Oct 11, 2021
leahecole
approved these changes
Oct 11, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
api: translate
Issues related to the googleapis/python-translate API.
cla: yes
This human has signed the Contributor License Agreement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here I have moved away from "flaky" in favor of "backoff", which was already a dependency of the library.
This repository currently uses the "flaky" module/plugin to pytest to allow retries on tests. As I was trying to quantify this flakiness, I quickly realized that under-the-hood, this module uses runtime modification (monkey-patching) of the usual pytest callbacks, which breaks the interface contracts that the pytest ecosystem subscribes to and does not let me aggregate the timing statistics I need for quantifying flakiness.
The "backoff" module is already in this repo. In this PR I modify the "usual" way we set up fixtures to use the callback system from "backoff".
Fixes #254 by increasing timeout via backoff with 4 tries: [100, 250, 300, 500]
The worst execution time was 234 seconds, so the max allowed is now 500:
Flakiness report: