Skip to content

fix: Fix regression in S3 client configuration (backport release-3.6.x) - #20118

Merged
chaudum merged 1 commit into
release-3.6.xfrom
backport-20110-to-release-3.6.x
Dec 4, 2025
Merged

fix: Fix regression in S3 client configuration (backport release-3.6.x)#20118
chaudum merged 1 commit into
release-3.6.xfrom
backport-20110-to-release-3.6.x

Conversation

@loki-gh-app

@loki-gh-app loki-gh-app Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Backport d3f9532 from #20110


Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the s3 field of the aws configuration block was parsed to extract credentials, region, host, and schema.

storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Additionally, a second regression was fixed, which was caused in 7fc68b3

### Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the `s3` field of the `aws` configuration block was parsed to extract credentials, region, host, and schema.

```
storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>
```

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit d3f9532)
@loki-gh-app loki-gh-app Bot added backport size/L type/bug Somehing is not working as expected labels Dec 4, 2025
@loki-gh-app
loki-gh-app Bot requested a review from a team as a code owner December 4, 2025 16:57
@loki-gh-app loki-gh-app Bot added size/L backport type/bug Somehing is not working as expected labels Dec 4, 2025
@loki-gh-app
loki-gh-app Bot requested a review from chaudum December 4, 2025 16:57
@chaudum
chaudum merged commit 7d8176f into release-3.6.x Dec 4, 2025
76 checks passed
@chaudum
chaudum deleted the backport-20110-to-release-3.6.x branch December 4, 2025 17:05
@Intellectual777

Copy link
Copy Markdown

Backport d3f9532 from #20110


Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the s3 field of the aws configuration block was parsed to extract credentials, region, host, and schema.

storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Additionally, a second regression was fixed, which was caused in 7fc68b3

2 similar comments
@Intellectual777

Copy link
Copy Markdown

Backport d3f9532 from #20110


Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the s3 field of the aws configuration block was parsed to extract credentials, region, host, and schema.

storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Additionally, a second regression was fixed, which was caused in 7fc68b3

@Intellectual777

Copy link
Copy Markdown

Backport d3f9532 from #20110


Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the s3 field of the aws configuration block was parsed to extract credentials, region, host, and schema.

storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Additionally, a second regression was fixed, which was caused in 7fc68b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/L type/bug Somehing is not working as expected

2 participants