Hello community,

here is the log from the commit of package python-cfn-lint for openSUSE:Factory 
checked in at 2019-09-07 11:50:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cfn-lint (Old)
 and      /work/SRC/openSUSE:Factory/.python-cfn-lint.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cfn-lint"

Sat Sep  7 11:50:10 2019 rev:2 rq:728480 version:0.21.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cfn-lint/python-cfn-lint.changes  
2019-06-18 14:57:28.441361967 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-cfn-lint.new.7948/python-cfn-lint.changes    
    2019-09-07 11:50:17.278300835 +0200
@@ -1,0 +2,9 @@
+Thu Sep  5 11:17:31 UTC 2019 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Add upstream patch to fix EOL dates for lambda runtimes
+  + cl_fix-lambda-runtimes-EOL-dates.patch
+- Add upstream patch to fix test_config_expand_paths test
+  + cl_fix-config-expand-paths-test.patch
+- Add python to BuildRequires for suse_version < 1500
+
+-------------------------------------------------------------------

New:
----
  cl_fix-config-expand-paths-test.patch
  cl_fix-lambda-runtimes-EOL-dates.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cfn-lint.spec ++++++
--- /var/tmp/diff_new_pack.dQW75V/_old  2019-09-07 11:50:18.834300616 +0200
+++ /var/tmp/diff_new_pack.dQW75V/_new  2019-09-07 11:50:18.878300609 +0200
@@ -26,6 +26,11 @@
 URL:            https://github.com/aws-cloudformation/cfn-python-lint
 Source:         
https://github.com/aws-cloudformation/cfn-python-lint/archive/v%{version}.tar.gz#/cfn-python-lint-%{version}.tar.gz
 Patch0:         cl_drop-compatible-releases-operator.patch
+Patch1:         cl_fix-lambda-runtimes-EOL-dates.patch
+Patch2:         cl_fix-config-expand-paths-test.patch
+%if 0%{?suse_version} < 1500
+BuildRequires:  python
+%endif
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -77,6 +82,8 @@
 %prep
 %setup -q -n cfn-python-lint-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %python_build

++++++ cl_fix-config-expand-paths-test.patch ++++++
>From 4e31772eab4f39a5bfd6ae6c0ad192cf1299456f Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <yan12...@gmail.com>
Date: Sun, 23 Jun 2019 21:22:45 +0800
Subject: [PATCH] Fix a flaky test

test_config_expand_paths sometimes fails with:

======================================================================
FAIL: test_config_expand_paths (module.config.test_config_mixin.TestConfigMixIn)
Test precedence in
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/yen/var/syncthing/Projects/cfn-python-lint/.tox/py37/lib/python3.7/site-packages/mock/mock.py",
 line 1330, in patched
    return func(*args, **keywargs)
  File 
"/home/yen/var/syncthing/Projects/cfn-python-lint/test/module/config/test_config_mixin.py",
 line 97, in test_config_expand_paths
    'test/fixtures/templates/public/rds-cluster.yaml'])
AssertionError: Lists differ: ['tes[23 chars]blic/rds-cluster.yaml', 
'test/fixtures/templat[25 chars]aml'] != ['tes[23 
chars]blic/lambda-poller.yaml', 'test/fixtures/templ[25 chars]aml']

First differing element 0:
'test/fixtures/templates/public/rds-cluster.yaml'
'test/fixtures/templates/public/lambda-poller.yaml'

- ['test/fixtures/templates/public/rds-cluster.yaml',
-  'test/fixtures/templates/public/lambda-poller.yaml']
? ^                                                   ^

+ ['test/fixtures/templates/public/lambda-poller.yaml',
? ^                                                   ^

+  'test/fixtures/templates/public/rds-cluster.yaml']

----------------------------------------------------------------------
---
 src/cfnlint/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py
index 5b16a231..9d7debc2 100644
--- a/src/cfnlint/config.py
+++ b/src/cfnlint/config.py
@@ -545,7 +545,7 @@ def templates(self):
                     if add_filename not in ignore_templates:
                         all_filenames.append(add_filename)
 
-        return all_filenames
+        return sorted(all_filenames)
 
     def _ignore_templates(self):
         """ templates """
++++++ cl_fix-lambda-runtimes-EOL-dates.patch ++++++
>From 3189b0b190c80f9dcd1bd13188baff852e952ca1 Mon Sep 17 00:00:00 2001
From: Chuck Meyer <chuck.me...@boldpenguin.com>
Date: Tue, 2 Jul 2019 12:58:34 -0400
Subject: [PATCH] Patched date tests and rule descriptions EOL lambda runtimes
 (#999)

---
 .gitignore                                    |  3 ++
 .../resources/lmbd/DeprecatedRuntimeEnd.py    |  2 +-
 .../results/public/lambda-poller.json         | 50 +++++++++----------
 .../results/quickstart/nist_config_rules.json |  9 ++--
 .../lmbd/test_deprecated_runtime_end.py       |  3 ++
 .../lmbd/test_deprecated_runtime_eol.py       |  3 ++
 6 files changed, 38 insertions(+), 32 deletions(-)

diff --git a/.gitignore b/.gitignore
index f8b9373f..54c5859f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -109,3 +109,6 @@ venv.bak/
 
 # vscode
 .vscode/
+
+# osx
+.DS_Store
diff --git a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEnd.py 
b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEnd.py
index e7c95b5f..9443b0f5 100644
--- a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEnd.py
+++ b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEnd.py
@@ -23,7 +23,7 @@ class DeprecatedRuntimeEnd(DeprecatedRuntime):
     """Check if EOL Lambda Function Runtimes are used"""
     id = 'E2531'
     shortdesc = 'Check if EOL Lambda Function Runtimes are used'
-    description = 'Check if an EOL Lambda Runtime is specified and give a 
warning if used. '
+    description = 'Check if an EOL Lambda Runtime is specified and give an 
error if used. '
     source_url = 
'https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html'
     tags = ['resources', 'lambda', 'runtime']
 
diff --git a/test/fixtures/results/public/lambda-poller.json 
b/test/fixtures/results/public/lambda-poller.json
index 5899e810..2bbb159e 100644
--- a/test/fixtures/results/public/lambda-poller.json
+++ b/test/fixtures/results/public/lambda-poller.json
@@ -1,29 +1,27 @@
-[
-    {
-        "Filename": "test/fixtures/templates/public/lambda-poller.yaml",
-        "Level": "Warning",
-        "Location": {
-            "End": {
-                "ColumnNumber": 14,
-                "LineNumber": 151
-            },
-            "Path": [
-                "Resources",
-                "PollerFunction",
-                "Properties",
-                "Runtime"
-            ],
-            "Start": {
-                "ColumnNumber": 7,
-                "LineNumber": 151
-            }
+[{
+    "Filename": "test/fixtures/templates/public/lambda-poller.yaml",
+    "Level": "Warning",
+    "Location": {
+        "End": {
+            "ColumnNumber": 14,
+            "LineNumber": 151
         },
-        "Message": "EOL runtime (nodejs6.10) specified. Runtime is EOL since 
2019-04-30 and updating will be disabled at 2019-06-30, please consider to 
update to nodejs10.x",
-        "Rule": {
-            "Description": "Check if an EOL Lambda Runtime is specified and 
give a warning if used. ",
-            "Id": "W2531",
-            "ShortDescription": "Check if EOL Lambda Function Runtimes are 
used",
-            "Source": 
"https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html";
+        "Path": [
+            "Resources",
+            "PollerFunction",
+            "Properties",
+            "Runtime"
+        ],
+        "Start": {
+            "ColumnNumber": 7,
+            "LineNumber": 151
         }
+    },
+    "Message": "EOL runtime (nodejs6.10) specified. Runtime is EOL since 
2019-04-30 and updating will be disabled at 2019-06-30, please consider to 
update to nodejs10.x",
+    "Rule": {
+        "Description": "Check if an EOL Lambda Runtime is specified and give 
an error if used. ",
+        "Id": "E2531",
+        "ShortDescription": "Check if EOL Lambda Function Runtimes are used",
+        "Source": 
"https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html";
     }
-]
+}]
\ No newline at end of file
diff --git a/test/fixtures/results/quickstart/nist_config_rules.json 
b/test/fixtures/results/quickstart/nist_config_rules.json
index 9ad3b5fb..55810ef8 100644
--- a/test/fixtures/results/quickstart/nist_config_rules.json
+++ b/test/fixtures/results/quickstart/nist_config_rules.json
@@ -1,5 +1,4 @@
-[
-    {
+[{
         "Filename": 
"test/fixtures/templates/quickstart/nist_config_rules.yaml",
         "Level": "Warning",
         "Location": {
@@ -46,7 +45,7 @@
         },
         "Message": "Deprecated runtime (nodejs) specified. Updating disabled 
since 2016-10-31, please consider to update to nodejs10.x",
         "Rule": {
-            "Description": "Check if an EOL Lambda Runtime is specified and 
give a warning if used. ",
+            "Description": "Check if an EOL Lambda Runtime is specified and 
give an error if used. ",
             "Id": "E2531",
             "ShortDescription": "Check if EOL Lambda Function Runtimes are 
used",
             "Source": 
"https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html";
@@ -126,7 +125,7 @@
         },
         "Message": "Deprecated runtime (nodejs) specified. Updating disabled 
since 2016-10-31, please consider to update to nodejs10.x",
         "Rule": {
-            "Description": "Check if an EOL Lambda Runtime is specified and 
give a warning if used. ",
+            "Description": "Check if an EOL Lambda Runtime is specified and 
give an error if used. ",
             "Id": "E2531",
             "ShortDescription": "Check if EOL Lambda Function Runtimes are 
used",
             "Source": 
"https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html";
@@ -159,4 +158,4 @@
             "Source": 
"https://github.com/aws-cloudformation/cfn-python-lint/blob/master/docs/cfn-resource-specification.md#valueprimitivetype";
         }
     }
-]
+]
\ No newline at end of file
diff --git a/test/rules/resources/lmbd/test_deprecated_runtime_end.py 
b/test/rules/resources/lmbd/test_deprecated_runtime_end.py
index 519fa560..9a3e1ccb 100644
--- a/test/rules/resources/lmbd/test_deprecated_runtime_end.py
+++ b/test/rules/resources/lmbd/test_deprecated_runtime_end.py
@@ -14,16 +14,19 @@
   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 
THE
   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 """
+from datetime import datetime
 from cfnlint.rules.resources.lmbd.DeprecatedRuntimeEnd import 
DeprecatedRuntimeEnd  # pylint: disable=E0401
 from ... import BaseRuleTestCase
 
 
 class TestDeprecatedRuntimeEnd(BaseRuleTestCase):
     """Test Lambda Deprecated Runtime usage"""
+
     def setUp(self):
         """Setup"""
         super(TestDeprecatedRuntimeEnd, self).setUp()
         self.collection.register(DeprecatedRuntimeEnd())
+        self.collection.rules[0].current_date = datetime(2019, 6, 29)
 
     def test_file_positive(self):
         """Test Positive"""
diff --git a/test/rules/resources/lmbd/test_deprecated_runtime_eol.py 
b/test/rules/resources/lmbd/test_deprecated_runtime_eol.py
index ff9daaa3..bb978400 100644
--- a/test/rules/resources/lmbd/test_deprecated_runtime_eol.py
+++ b/test/rules/resources/lmbd/test_deprecated_runtime_eol.py
@@ -14,16 +14,19 @@
   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 
THE
   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 """
+from datetime import datetime
 from cfnlint.rules.resources.lmbd.DeprecatedRuntimeEol import 
DeprecatedRuntimeEol  # pylint: disable=E0401
 from ... import BaseRuleTestCase
 
 
 class TestDeprecatedRuntimeEol(BaseRuleTestCase):
     """Test Lambda Deprecated Runtime usage"""
+
     def setUp(self):
         """Setup"""
         super(TestDeprecatedRuntimeEol, self).setUp()
         self.collection.register(DeprecatedRuntimeEol())
+        self.collection.rules[0].current_date = datetime(2019, 6, 29)
 
     def test_file_positive(self):
         """Test Positive"""

Reply via email to