Adding logic to handle gzip'd botocore ec2 service-2.json #2073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Newer versions of
botocore
are now shipping with some files gzipped to save on storage space. Runway's K8s module depended on one of these files to determine available EC2 instance types, and could not read it as the path had changed (service-2.json
vsservice-2.json.gz
).Why This Is Needed
Because of this upstream change, users who install a newer
botocore
version are unable to executerunway
without an error.What Changed
Because we can't tell which version of
botocore
a user may have in their environment, logic has been added to check for which is available. In local testing this seems to work well. We were able to do a freshrunway
install and confirm functionality with the gzipped file, then performed agunzip
on it andrunway
still operated fine with the uncompressed file.Checklist