aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.43k stars 586 forks source link

Tests fail after 2021-06-01 #1779

Closed bmwiedemann closed 3 years ago

bmwiedemann commented 3 years ago

See #1705 . It was not really fixed for good with #1777

PatMyron commented 3 years ago

https://github.com/aws-cloudformation/cfn-python-lint/issues/1705#issuecomment-699139633 not really sure I understand the use case for these tests to be permanently passing since these are intentionally time-based, is there a reason these tests need to be fixed so far in advance of when they would start failing?

bmwiedemann commented 3 years ago

I think, what the test should be testing is that python2.7 is not deprecated in 2020 and that python2.7 is deprecated in 2022 - independent of when the test is run.

so far in advance

"far" is relative, because distributions like our openSUSE take their time to update code, so #1777 has not arrived there yet.

so far I thought, 15y is far enough.

PatMyron commented 3 years ago

distributions like our openSUSE take their time to update code, so #1777 has not arrived there yet

cfn-lint bundles lots of static data that gets outdated fairly quickly, so this test would be far from the main issue if distributions are that out of date (tflint as well)

If https://software.opensuse.org/package/python-cfn-lint is saying that the latest version is v0.21.4 from May 2019, that lag is a problem by itself since what constitutes a valid CloudFormation template has changed quite a bit since then

bmwiedemann commented 3 years ago

We (also) have cfn-python-lint-0.37.1.tar.gz from 2020-10-06

PatMyron commented 3 years ago

mitigated in https://github.com/aws-cloudformation/cfn-lint/pull/2029, next instance will be python2.7 later this year:

https://github.com/aws-cloudformation/cfn-lint/blob/04297c1072015bb40e950bf935596cc742246fe8/src/cfnlint/data/AdditionalSpecs/LmbdRuntimeLifecycle.json#L47-L51

yan12125 commented 3 years ago

Time's up for python2.7 :) An approach similar to #2029 makes tests pass. I'm not sure if it's correct, though.

sed -i 's#Runtime: python2\.7#Runtime: python3.8#' test/fixtures/templates/quickstart/{cis_benchmark,openshift}.yaml
yan12125 commented 2 years ago

A similar issue surfaced again on 2021-09-30. The warning

EOL runtime (python2.7) specified. Runtime is EOL since 2021-07-15 and updating will be disabled at 2021-09-30. Please consider updating to python3.8

becomes the error

Deprecated runtime (python2.7) specified. Updating disabled since 2021-09-30. Please consider updating to python3.8

and thus tests fail.

A example log: https://reproducible.archlinux.org/api/v0/builds/168502/log

Update: seems fixed with #2135