fix: allow S3 test to pass regardless of AWS config - #21499
Merged
Conversation
Users with invalid AWS config profile may be unable to run tests. This makes the tests more independent
jnewbigin
force-pushed
the
jnewbigin/test-ignore-aws-config
branch
from
April 10, 2026 02:23
ae1074c to
73058d1
Compare
DanHopperGrafana
approved these changes
Apr 10, 2026
chaudum
added a commit
that referenced
this pull request
Apr 10, 2026
Follow up on #21499 The test suite would fail in case the AWS_PROFILE environment variable is set on the host that references a profile, which cannot be present, because of AWS_CONFIG_FILE being empty.
6 tasks
This was referenced Apr 20, 2026
This was referenced May 20, 2026
This was referenced Jun 8, 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.
Users with invalid AWS config profile may be unable to run tests. This makes the tests more independent
What this PR does / why we need it:
The grafana tooling rewrites the AWS config file in a way which is not compatible with the loki S3 storage test.
This PR removes the external dependency making the test more pure/independent of it's environment.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PRNote
Low Risk
Low risk: test-only change that forces AWS SDK config/credentials files to
/dev/nullto avoid failures from invalid local AWS profiles.Overview
Adds a
TestMainins3_storage_client_test.gothat setsAWS_CONFIG_FILEandAWS_SHARED_CREDENTIALS_FILEto/dev/nullbefore running the suite, preventing S3 client tests from reading (and potentially failing on) the developer machine’s AWS configuration.Reviewed by Cursor Bugbot for commit 73058d1. Bugbot is set up for automated code reviews on this repo. Configure here.