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

Adding logic to handle gzip'd botocore ec2 service-2.json #2073

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

jake-skipper
Copy link
Contributor

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 vs service-2.json.gz).

Why This Is Needed

Because of this upstream change, users who install a newer botocore version are unable to execute runway 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 fresh runway install and confirm functionality with the gzipped file, then performed a gunzip on it and runway still operated fine with the uncompressed file.

Checklist

  • Have you followed the guidelines in our Contribution Requirements?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?
  • Have you linted your code locally prior to submission?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?
  • Have you updated documentation, as applicable?

@github-actions github-actions bot added bug Something isn't working changelog:patch Patch change resulting in a patch release python Update to Python code labels Dec 19, 2023
@jake-skipper
Copy link
Contributor Author

This PR is in regards to #2060

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (c9f08e6) 90.18% compared to head (c66016d) 90.17%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2073      +/-   ##
==========================================
- Coverage   90.18%   90.17%   -0.02%     
==========================================
  Files         247      247              
  Lines       15682    15691       +9     
==========================================
+ Hits        14143    14149       +6     
- Misses       1539     1542       +3     
Files Coverage Δ
runway/blueprints/k8s/k8s_workers.py 92.68% <75.00%> (-7.32%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9f08e6...c66016d. Read the comment docs.

@jake-skipper jake-skipper merged commit 385d609 into master Dec 19, 2023
27 of 28 checks passed
@jake-skipper jake-skipper deleted the bugfix/boto-gzipped-file branch December 19, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog:patch Patch change resulting in a patch release python Update to Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants