Repository navigation
[EC2] Fix empty instance type lists for af-south-1 and ap-northeast-3 - #2234
Open
shaynhornik wants to merge 1 commit into
Open
shaynhornik wants to merge 1 commit into
shaynhornik wants to merge 1 commit into
Conversation
The sizing data scraper matches products by the "location" attribute of the AWS price list, but af-south-1 was keyed by its region id and ap-northeast-3 by the old "Asia Pacific (Osaka-Local)" name, so every product for those two regions was skipped. Both regions ended up with an empty instance type list and list_sizes() returned no sizes for them. Key both regions by the location names AWS uses and fill in their instance types from the current per-region AWS price lists, limited to types which already have a size definition. Generated-by: Claude Code (Claude Fable 5.2) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
[EC2] Fix empty instance type lists for af-south-1 and ap-northeast-3
Description
Fixes #1984.
list_sizes()returns nothing foraf-south-1andap-northeast-3, so a node can't be created there, because both regions have an emptyinstance_typeslist inec2_region_details_complete.py.The cause is in
contrib/scrape-ec2-sizes.py. ItsREGION_DETAILStable is keyed by thelocationattribute of the AWS price list, and products with an unknown location are skipped:af-south-1was keyed by its region id instead ofAfrica (Cape Town).ap-northeast-3was keyedAsia Pacific (Osaka-Local); AWS now calls itAsia Pacific (Osaka).Changes:
parse()finds 0 instance types for these regions before and 439 / 405 after.instance_typesfor the two regions. A full regenerate needs the 9 GB global price list, so I used the two per-region price lists with the scraper's own selection, and kept only types that already have a size definition inec2_instance_types.py:The types left out are newer families (c8i, m8i, r8i, i7i, i8g and similar). They will come in with the next full scrape, which now recognizes both regions.
m6i.xlarge, the type from the issue.No other region is touched.
git diff --patienceshows the real change to the constants file (+736/−4); the default diff looks larger because it matches lines across regions.Not changed here:
us-gov-west-1is also empty for the same kind of reason (the scraper hasAWS GovCloud (US), the price list saysAWS GovCloud (US-West)). I can send that separately if you want it.cn-north-1andcn-northwest-1are not in this price list at all.Status
Done, ready for review.
Checklist (tick everything that applies)
CHANGES.rst)Run locally:
libcloud/test/compute(4830 passed, 5 skipped), black, isort, flake8 and rstcheck. The new test fails on trunk with "No sizes available in region af-south-1".Generated-by: Claude Code (Claude Fable 5.2). I reviewed and tested the change.
🤖 Generated with Claude Code