feature: multi-backend backward compatibility; allow invalid region #9
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.
When in the old setup with a single S3 backend an invalid region was provided in a request this would just be ignored as the target region would always be mapped to the configured target region.
For the multi-backend setup specifying an invalid region would result in an internal server error. This change introduces a feature flag ENABLE_LEGACY_BEHAVIOR_INVALID_REGION_TO_DEFAULT_REGION which can be set to true to go back to the old behavior by falling back to the default backend (as specified in backend-config.yaml).
If not set the request would be answered with a Bad Request response explaining to the user that an invalid region was returned.
cleanup: legacy environment variable