Skip to content

Allow s3 testing in face of ambient AWS credentials - #3947

Merged
d-v-b merged 1 commit into
zarr-developers:mainfrom
chuckwondo:main
May 6, 2026
Merged

Allow s3 testing in face of ambient AWS credentials#3947
d-v-b merged 1 commit into
zarr-developers:mainfrom
chuckwondo:main

Conversation

@chuckwondo

@chuckwondo chuckwondo commented May 5, 2026

Copy link
Copy Markdown
Contributor

This PR allows tests that use s3fs to run successfully in environments where there are "ambient" AWS credentials (i.e., either AWS_* env vars set or presence of ~/.aws/config) and the AWS region is set to something other than "us-east-1". In such cases, tests using s3fs fail with IllegalLocationConstraintException.

This PR allows tests to succeed in such environments (i.e., typically a local dev setup). Further, since mypy was failing during pre-commit for code in the module tests.test_store.test_fsspec, it also adds that module to the mypy "ignore" list in pyproject.toml until mypy configuration can be addressed to avoid the problem (to be addressed in a separate PR that will make mypy execution more robust/consistent). In the process of diagnosing the mypy error, I updated the mypy configuration to provide more informative output.

Finally, I adjusted a test fixture to eliminate the "noise" of the "AssertionError: Session was never entered" message (and traceback) upon completion of test execution, which is disconcerting and confusing (made me wonder how the tests all passed while showing a traceback).

TODO:

  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label May 5, 2026
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.23%. Comparing base (85890b3) to head (54970a8).
⚠️ Report is 142 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3947   +/-   ##
=======================================
  Coverage   93.23%   93.23%           
=======================================
  Files          87       87           
  Lines       11695    11695           
=======================================
  Hits        10904    10904           
  Misses        791      791           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@d-v-b

d-v-b commented May 6, 2026

Copy link
Copy Markdown
Contributor

thanks for this @chuckwondo!

@d-v-b
d-v-b merged commit 6af3ea4 into zarr-developers:main May 6, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs release notes Automatically applied to PRs which haven't added release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants