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

Issue 5284 prevent retries for genuinely failed uploads #5613

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

MertD95
Copy link

@MertD95 MertD95 commented Mar 8, 2024

Description (required)

Fixes #5284

The overall change of this PR is to add a check in ContributionFragment.retryUpload for whether the failure reason of the previous upload is a "genuine" failure, ie a failure that can't be solved by just retrying. And if it is a "genuine" failure we abandon the retry attempt.

This is accomplished by in uploadWorker passing along the failure point and any accompanying exceptions through two new fields in Contributions. And then checking if these qualify as a "genuine" failure through a simple whitelist of known "genuine" failure patterns and exceptions.

This PR is a draft because we wont be able to continue further due to our course ending. And while the code works, the whitelist content is currently very minimal due to us having issues with reproducing the error, meaning we haven't been able to identify many "genuine" failure patterns or exceptions. However the code should still work to roll out as it is a white list, meaning that for any problem not matching our "genuine" errors it will just fall back on retrying 10 times

Tests performed (required)

Testing was performed, the entire test suite was run and all the of tests that succeeded before the rewrite succeed now also

Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.

This was tested on on :app:testBetaDebugUnitTest, the API level was 34

Screenshots (for UI changes only)

Need help? See https://support.google.com/android/answer/9075928


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

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.

Prevent retries for genuinely failed uploads
2 participants