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

Revert/1952 #1954

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Revert/1952 #1954

merged 2 commits into from
Mar 24, 2021

Conversation

kddejong
Copy link
Contributor

@kddejong kddejong commented Mar 24, 2021

Issue #, if available: autogenerated maintenance failing with::

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.2/x64/bin/cfn-lint", line 33, in <module>
    sys.exit(load_entry_point('cfn-lint', 'console_scripts', 'cfn-lint')())
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/src/cfnlint/__main__.py", line 23, in main
    (args, filenames, formatter) = cfnlint.core.get_args_filenames(sys.argv[1:])
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/src/cfnlint/core.py", line 144, in get_args_filenames
    cfnlint.maintenance.update_iam_policies()
  File "/home/runner/work/cfn-python-lint/cfn-python-lint/src/cfnlint/maintenance.py", line 237, in update_iam_policies
    content['serviceMap']['Amazon API Gateway Management']['Actions'].extend(
KeyError: 'Amazon API Gateway Management'

#1952
Description of changes:

  • Make update iam policies not fail if a key isn't found and future proof possible changes in API Gateway permissions

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 213ac6b into aws-cloudformation:master Mar 24, 2021
@kddejong kddejong deleted the revert/1952 branch March 24, 2021 15:58
@burningalchemist
Copy link

@kddejong will you release the fix to PyPI anytime soon? :) The reason is there are several GitHub-actions (e.g. https://github.com/ScottBrenner/cfn-lint-action) which pull cfn-python-lint from the PyPI, and they seem to be broken at the moment.

P.S. the policies.js file has been changed again to the latest revision, but I guess this is covered now, so just for your information.

@kddejong
Copy link
Contributor Author

Yea let me get the release out today.

direvus pushed a commit to direvus/cfn-python-lint that referenced this pull request Apr 12, 2021
* Revert PR 1952 as policies changed back
* Future proof any oddness with iam policy patching
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