Add retry for HTTP status 502 #590
Merged
Merged
Conversation
ghukill
commented
May 26, 2026
| OPTIONAL_ENV_VARS = ("RECORD_SKIP_LIST", "SENTRY_DSN", "STATUS_UPDATE_INTERVAL") | ||
| REQUIRED_ENV_VARS: tuple = () | ||
| OPTIONAL_ENV_VARS: tuple = ( | ||
| "WORKSPACE", |
Contributor
Author
There was a problem hiding this comment.
Also removed WORKSPACE as a required env var, which is something we've slowly started adopting in newer projects. FWIW, this env var is set in AWS for the OAI harvester, so the effect is only a nice-to-have for local dev work.
ehanson8
approved these changes
May 26, 2026
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.
Purpose and background context
Add
502as a status code to retry on. New DSpace CRIS instance (and likely GLAM) will intermittently throw502's under load, but react well to retries.How can a reviewer manually see the effects of these changes?
Very difficult to recreate! Failures have been intermittent for DSpace CRIS harvesting, particularly for long running ones. With this change, not seeing any failed harvests (at least not yet, at which time we may need to add more codes).
Includes new or updated dependencies?
YES: took opportunity to update dependencies
Changes expectations for external applications?
NO
What are the relevant tickets?
Code review
here
and you are encouraged to have a constructive dialogue with your reviewers
about their preferences and expectations.