-
Notifications
You must be signed in to change notification settings - Fork 314
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
Refactor LocalS3Session to handle botocore sessions #614
Comments
As per now closed #650, if there was a chance to not use boto directly it seems like it would abstract things away easier. |
I just ran into this while trying to test locally. If I run:
However I locally also see this error on master while the tests keep passing for it on Travis |
I don't understand why this broke though, given that our s3fs is at |
@vringar - is this fixed now you removed a global s3fs? |
Yes, I'll remove them or mark them as off topic as appropriate tomorrow |
Yes, we have unpinned s3fs and no longer directly use boto/botocore |
s3fs > 0.4.0 breaks localstack sessions. See https://travis-ci.org/github/mozilla/OpenWPM/jobs/673635080#L2983-L2997 and fsspec/s3fs#309.
in 0.4.1 s3fs was refactored to use
botocore
rather thanboto3
, meaning that we need to pass in a botocore session object rather than a boto3 session object on initialization: https://github.com/mozilla/OpenWPM/blob/480dd7daf384ff4a620f64daea89e048f8ee71f1/automation/DataAggregator/S3Aggregator.py#L87-L90.This alone would be pretty simple, however we overwrite the
boto3.DEFAULT_SESSION
with our customLocalS3Session
object, both when running the test suite and in crawler.py.This custom session object is used to seamlessly propagate localstack's configuration across OpenWPM. It's unclear to me exactly what we'll need to change to get this working again; I don't think swapping to the default botocore session will be sufficient. My guess is we'll either have to override that as well (perhaps similar to pytest-localstack), or pass the credentials as kwargs into the botocore session within the S3Aggregator.
In our meeting today we talked about eventually removing our dependency on localstack for a variety of reasons, so I don't think it makes sense to prioritize this work right now (unless we end up needing to update s3fs beyond 0.4.0 for some other reason).
The text was updated successfully, but these errors were encountered: