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

Add new OS available from EC2 + make translate_platform_name a little more robust #651

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

meowtochondria
Copy link
Contributor

Addresses the following exception when running python3 ./scrape.py:

Traceback (most recent call last):
  File "./scrape.py", line 1054, in <module>
    scrape("www/instances.json")
  File "./scrape.py", line 1018, in scrape
    add_pricing_info(all_instances)
  File "./scrape.py", line 234, in add_pricing_info
    ec2.add_pricing(by_type)
  File "/home/dghai/ec2instances.info/ec2.py", line 198, in add_pricing
    add_spot_pricing(imap)
  File "/home/dghai/ec2instances.info/ec2.py", line 269, in add_spot_pricing
    price["ProductDescription"], "NA"
  File "/home/dghai/ec2instances.info/ec2.py", line 38, in translate_platform_name
    return os[operating_system] + software[preinstalled_software]
KeyError: 'Red Hat Enterprise Linux (Amazon VPC)'

@EverettBerry
Copy link
Contributor

I think I can actually merge this without testing - did you happen to build the docker container all the way through?

@meowtochondria
Copy link
Contributor Author

Nope... just reran scrape.py as it seemed to be pretty straightforward. If you would like me to build the container, please let me know!

@EverettBerry
Copy link
Contributor

I think we need to add Red Hat Enterprise Linux (Amazon VPC) here for this change to make it's way to the frontend

% for platform in ['linux', 'rhel', 'sles', 'mswin', 'mswinSQLWeb', 'mswinSQL', 'mswinSQLEnterprise', 'linuxSQLWeb', 'linuxSQL', 'linuxSQLEnterprise']:
. Also in the JS file here
'cost-ondemand-rhel',

I can take care of that if you're unfamiliar, or you can use render.py to test that change. With that, I believe the new OS should show up in the columns dropdown.
image

@EverettBerry
Copy link
Contributor

@meowtochondria was the frontend something you were interested in taking a crack at? Happy to make those changes myself too and merge this.

@meowtochondria
Copy link
Contributor Author

meowtochondria commented Sep 1, 2022 via email

@EverettBerry EverettBerry merged commit b189452 into vantage-sh:master Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants