Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct handling of key and secret for S3 session and actual test with key-secret bucket #183

Merged
merged 9 commits into from
Feb 15, 2024

Conversation

valeriupredoi
Copy link
Collaborator

@valeriupredoi valeriupredoi commented Feb 15, 2024

Description

OK it actually works: a netCDF4 file in an actual S3 bucket (with key and secret, NOT anon=True), a Reductionist deployed elsewhere, and a PyActiveStorage client some other place too 🍻 Look at the GA Action and the test of interest is the beautifully named: tests/test_compression_remote_reductionist.py::test_compression_and_filters_cmip6_forced_s3_from_local_2 - boom!

The reason why this is labeled as "bug" is that it took me a good part of today figuring out that the Reductionist session was getting built with the config.py's S3_ACCESS_KEY and S3_SECRET_KEY regardless of what S3 bucket the test was pointing to 🤦‍♂️

Checklist

  • This pull request has a descriptive title and labels
  • This pull request has a minimal description (most was discussed in the issue, but a two-liner description is still desirable)
  • Unit tests have been added (if codecov test fails)
  • Any changed dependencies have been added or removed correctly (if need be)
  • All tests pass

@valeriupredoi valeriupredoi changed the title Add a test that should run Correct handling of key and secret for S3 session and actual test with key-secret bucket Feb 15, 2024
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8517401) 88.11% compared to head (22ac832) 88.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
+ Coverage   88.11%   88.40%   +0.28%     
==========================================
  Files           8        8              
  Lines         648      664      +16     
==========================================
+ Hits          571      587      +16     
  Misses         77       77              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@valeriupredoi valeriupredoi added the bug Something isn't working label Feb 15, 2024
@valeriupredoi valeriupredoi merged commit fe79079 into main Feb 15, 2024
10 checks passed
@valeriupredoi valeriupredoi deleted the test_storage_options branch February 15, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant