-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Botocore 1.32.1 breaks some tests with moto #7031
Comments
Mote does not handle some compressed models in botocore 1.32.1, and it fails our "latest botocore" tests. Moto should be released with a fix to handle compressed versions but until that we limit botocore and boto3 when upgrading then. This limit should be removed as soon as getmoto/moto#7031 is fixed and moto with the fixes is releasedi
Ah . I checked before I opened mine but our issues/pr's crossed :) Yes confirmed it fixes the issue:
|
Super quick fix ! Do you know when you might release it? This way I might simply not merge apache/airflow#35671 and just wait for moto release |
This is quite high-prio, so I'll try to get a release out today. Will ping you once that's done. |
Fantastic. It's all I need. No need to ping. Our CI attempts to upgrde to latest versions of everything every time CI build in "main" branch happens, so once it is released we will find out because our dedicated "Latest botocore" build will stop failing. This is how we found it out actually just hours after botocore was relased. |
Done @potiuk! https://pypi.org/project/moto/4.2.9/ I'll close this, but do let me know if you run into any other issues. |
🙇 |
Problem
Latest botocore 1.32.1 released few hours ago breakes some tests in moto (4.2.8 - i.e. latest). Some of the internal models stored in botocore are gzipped (and it changes between botocore versions) are not recognized by moto when it tries to load the models. Botocore internally uses JSONFIleLoader https://github.com/boto/botocore/blob/develop/botocore/loaders.py#L149 that automatically handles .json.gz data and decomresseses it, while moto uses "load_resources" which does not try to load .gz versions of files https://github.com/getmoto/moto/blob/master/moto/utilities/utils.py#L16
There are a number of such internal models in botocore that are gzipped but In case of botocore 1.32.1 what changed is that
botocore/data/emr/2009-03-31/service-2.json
that previously (1.32.0) was stored as plain .json became now `botocore/data/emr/2009-03-31/service-2.json.gz’ - you can see it by downloading the packages from pypi and comparing them.Example stacktrace
This leads to errors similar to:
You can see a failure of Airflow
canary
run (this is what triggered our investigation):https://github.com/apache/airflow/actions/runs/6882709099/job/18722609903#step:5:14716
Potential solution
For now we will limit moto to < 1.32.1 in Airflow as a workaround but I think the best solution would be to extes
load_resources
method in moto to handle also .gz version automatically. That should fix this problem (and also address any future problem like that if botocore team will compress more models.The text was updated successfully, but these errors were encountered: