You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for raising this @dblanchette. The documentation is not explicit in whether MOTO_AMIS_PATH should come instead of, or in addition to, the existing AMI's. But considering the previous behaviour was 'instead of', then this is indeed a regression.
Context
We are setting
MOTO_AMIS_PATH
in a pytest plugin. Our test usesdescribe_images
on an EC2 client.Expected
We expect the images set in the file at the path set in the environment variables
MOTO_AMIS_PATH
to be the only ones returned.Actual behavior
The images from
MOTO_AMIS_PATH
are there, but there are also other images that are hard-coded in the library.Affected versions
Present in 4.0.9, was not present in 3.1.18. moto installed with poetry (reproduced with moto installed manually in a virtual environment)
Seems to have been introduced by #5427
Code here: https://github.com/spulec/moto/blob/6ab2497a12d8f0a5fe9be91387bc6b589d78e295/moto/ec2/models/amis.py#L157
Reproduction steps
Run the following script
With moto 3.1.18:
With moto 4.0.9:
Conclusion
A workaround is to use the old version for now. Thanks for your help resolving this issue!
The text was updated successfully, but these errors were encountered: