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

--update-specs even if official CloudFormation Resource Specification hasn't changed #1554

Closed
wants to merge 1 commit into from

Conversation

@codecov

This comment has been minimized.

Comment on lines +47 to +49
# commented out for now due to https://github.com/aws-cloudformation/cfn-python-lint/pull/1383#issuecomment-629891506
# if not url_has_newer_version(url):
# return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to keep the url_has_newer_version() call, but instead of returning from the function continue on instead, just skipping the downloads. This would let you do the patching regardless of whether new external specs are available or not.

    # Check to see if we already have the latest version, otherwise download it
    if url_has_newer_version(url):
        spec_content = get_url_content(url, caching=True)
        spec = json.loads(spec_content)
    else:
        with open(filename, 'r') as f:
            spec = json.load(f)

Tests will likely need to be adjusted.

Copy link
Contributor Author

@PatMyron PatMyron May 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to keep the url_has_newer_version() call, but instead of returning from the function continue on instead, just skipping the downloads. This would let you do the patching regardless of whether new external specs are available or not.

@Tro95 Agreed, just using this in the meantime. I'm not sure we've stored the previous unpatched official CloudFormation Resource Specifications anywhere where we could easily do this. Think we only have the final merged results, so it might take more time to properly fix

Copy link
Contributor Author

@PatMyron PatMyron Jun 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tro95 @kddejong @miparnisari
maybe just an undocumented --force flag for now that skips this url_has_newer_version() check?

cfn-lint --update-specs --force

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a good short-term solution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kddejong
Copy link
Contributor

Went ahead and created a force option. Please take a look #2334

@kddejong kddejong closed this Sep 8, 2022
@kddejong kddejong deleted the PatMyron-patch-2 branch September 8, 2022 22:01
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.

3 participants