Upload 503 Error and Batchjob Interaction Fix - #3347
Open
daralynnrhode wants to merge 7 commits into
Open
Conversation
tmplummer
reviewed
Jul 24, 2026
tmplummer
left a comment
Contributor
There was a problem hiding this comment.
You implemented exactly what was suggested in the ticket.
I am wondering if we should try the upload again in the case of the specific 503 error mentioned in the ticket. It seems like if the exception is a 503 slow down (I have no idea if that is all 503 errors) then we could potentially sleep for a few seconds and try again. Just a thought.
Contributor
Author
|
@tmplummer I can make an attempt to add a short wait and retry when a |
daralynnrhode
requested review from
bryan-harter,
tech3371 and
tmplummer
and removed request for
bryan-harter and
tech3371
July 28, 2026 16:43
tmplummer
approved these changes
Jul 28, 2026
tmplummer
left a comment
Contributor
There was a problem hiding this comment.
Great. This looks good to me!
Comment on lines
+991
to
+1000
| # Upload should attempt 3 times | ||
| assert mocks["mock_upload"].call_count == 3 | ||
|
|
||
| # Sleep should be called 2 times after first two failures | ||
| assert mock_sleep.call_count == 2 | ||
|
|
||
| # Checks the upload failure was logged | ||
| assert any( | ||
| "Upload failed with error" in str(call) for call in mock_error.call_args_list | ||
| ) |
Contributor
There was a problem hiding this comment.
Great test coverage. Thanks for mocking and checking the call counts!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix for the Upload Batchjob DeadLock Error Occurring
Overview
closes #3010
Checking the response of the Upload API before the
upload_products()function fails and gives a response to batch. Also added a test to check for the upload 503 error.File changes
Testing
Added
test_post_processing_upload_503_error()totest_cli.py