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

Log warning when a pricing region isn't found in the region map #1946

Merged

Conversation

kddejong
Copy link
Contributor

@kddejong kddejong commented Mar 18, 2021

Issue #, if available: autogenerated maintenance failing with:

2021-03-18 22:35:21,875 - cfnlint - INFO - Get ElasticMapReduce pricing
Traceback (most recent call last):
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/scripts/update_specs_from_pricing.py", line 242, in <module>
    main()
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/scripts/update_specs_from_pricing.py", line 228, in main
    outputs = update_outputs('EMRInstanceType', get_results('ElasticMapReduce', ['Elastic Map Reduce Instance']), outputs)
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/scripts/update_specs_from_pricing.py", line 203, in get_results
    if not results.get(region_map[product.get('attributes').get('location')]):
KeyError: 'China'

Description of changes:

  • Log a warning when a region isn't in the region map

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong kddejong merged commit 20dcb3c into aws-cloudformation:master Mar 18, 2021
@kddejong kddejong deleted the lifecycle/pricing/regionwarning branch March 18, 2021 22:56
direvus pushed a commit to direvus/cfn-python-lint that referenced this pull request Apr 12, 2021
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.

1 participant