Skip to content

ui: honor AWS_ENDPOINT in read_basebackups S3 list/get#3079

Open
SAY-5 wants to merge 1 commit intozalando:masterfrom
SAY-5:fix/ui-basebackups-aws-endpoint-3078
Open

ui: honor AWS_ENDPOINT in read_basebackups S3 list/get#3079
SAY-5 wants to merge 1 commit intozalando:masterfrom
SAY-5:fix/ui-basebackups-aws-endpoint-3078

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 22, 2026

Summary

Fixes #3078.

read_stored_clusters and read_versions in ui/operator_ui/spiloutils.py build their S3 clients with endpoint_url=AWS_ENDPOINT, but read_basebackups used a bare client('s3') for both the list_objects_v2 paginator and the per-key get_object. On MinIO / S3-compatible backends the list+get requests hit the default AWS endpoint, so the UI's Backups tab renders cluster/version prefixes (from the correctly-configured read_stored_clusters) then returns empty base backup details.

Fix

Build s3_client = client('s3', endpoint_url=AWS_ENDPOINT) once per call and reuse it for both the paginator and get_object. No behaviour change when AWS_ENDPOINT is unset — boto3 already defaults to the AWS endpoint in that case.

Test plan

  • python3 -c "import ast; ast.parse(open('spiloutils.py').read())" syntax check.
  • Manual: set AWS_ENDPOINT=http://minio.example.com, push a base backup via Spilo, open the UI's Backups tab — base backup details now populate instead of showing an empty list.

read_stored_clusters and read_versions build their S3 clients with
endpoint_url=AWS_ENDPOINT, but read_basebackups used a bare
client('s3') for both the list_objects_v2 paginator and the per-key
get_object call. On MinIO / S3-compatible backends the list+get
requests go to the default AWS endpoint, so the Backups tab renders
cluster/version prefixes (picked up by the correctly-configured
read_stored_clusters) but then returns empty base backup details
(silently no hits against the real backend) (zalando#3078).

Build s3_client once per call with endpoint_url=AWS_ENDPOINT and reuse
it for both the paginator and get_object. No behaviour change when
AWS_ENDPOINT is unset; boto3 defaults to the AWS endpoint either way.

Fixes zalando#3078

Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
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.

[UI] read_basebackups ignores AWS_ENDPOINT for S3 list/get (MinIO/S3-compatible)

1 participant