summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhanshyam Mann <gmann@ghanshyammann.com>2020-09-10 19:05:30 -0500
committerGhanshyam Mann <gmann@ghanshyammann.com>2020-09-10 20:25:27 -0500
commit0ba9e3a12e806e4cf3201d381aa1307d2749f82b (patch)
tree64aa508d472ff7d6d09e6add9a718aa866946243
parent0b9d98b37b88d1be3a5e419ecc8395eb459f5a93 (diff)
downloadkeystone-0ba9e3a12e806e4cf3201d381aa1307d2749f82b.tar.gz
Fix gate by running l-c job on Bionic
l-c job template moved the l-c jobs running on Focal and currently fails on many constraints. Let's keep running l-c job on bionic as it was before and we can move it to Focal once issues are identified and fixed. - Fixing the hacking tests which are behaving differently between < 3.8.0 (until Ubuntu Bionic) and 3.8.2 (Ubuntu Focal). Squashing below review also - https://review.opendev.org/#/c/750786/ Co-Author: Lance Bragstad <lbragstad@gmail.com> Change-Id: If733e9824d87d8c73797f753e4daf95489bed9c2
-rw-r--r--.zuul.yaml13
-rw-r--r--keystone/tests/unit/ksfixtures/hacking.py8
-rw-r--r--lower-constraints.txt2
3 files changed, 20 insertions, 3 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 1af47ece5..5dc4fe389 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -204,7 +204,7 @@
- project:
templates:
- openstack-cover-jobs
- - openstack-lower-constraints-jobs
+ #- openstack-lower-constraints-jobs
- openstack-python3-victoria-jobs
- publish-openstack-docs-pti
- periodic-stable-jobs
@@ -221,6 +221,14 @@
- ^etc/.*$
- ^keystone/tests/unit/.*$
- ^releasenotes/.*$
+ - openstack-tox-lower-constraints:
+ nodeset: ubuntu-bionic
+ irrelevant-files: &func_irrelevant-files
+ - ^.*\.rst$
+ - ^api-ref/.*$
+ - ^doc/.*$
+ - ^etc/.*$
+ - ^releasenotes/.*$
- keystone-dsvm-py3-functional-federation-ubuntu-focal:
voting: false
irrelevant-files: *irrelevant-files
@@ -249,6 +257,9 @@
- keystone-tox-protection
gate:
jobs:
+ - openstack-tox-lower-constraints:
+ nodeset: ubuntu-bionic
+ irrelevant-files: *func_irrelevant-files
- keystone-dsvm-py3-functional:
irrelevant-files: *irrelevant-files
- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k:
diff --git a/keystone/tests/unit/ksfixtures/hacking.py b/keystone/tests/unit/ksfixtures/hacking.py
index 550f53a00..c7c2622f1 100644
--- a/keystone/tests/unit/ksfixtures/hacking.py
+++ b/keystone/tests/unit/ksfixtures/hacking.py
@@ -65,7 +65,7 @@ class HackingCode(fixtures.Fixture):
'expected_errors': [
(7, 10, 'K001'),
(10, 15, 'K001'),
- (10, 29, 'K001'),
+ (10, 28, 'K001'),
(13, 15, 'K001'),
(16, 15, 'K001'),
(16, 31, 'K001'),
@@ -87,6 +87,12 @@ class HackingCode(fixtures.Fixture):
mutable_default_args['expected_errors'][12] = (28, 27, 'K001')
mutable_default_args['expected_errors'][14] = (32, 11, 'K001')
+ # NOTE(gmann): Python version < 3.8.2 (before Ubuntu Focal) returns
+ # the incorrect col_offset for below function defined in above code sample
+ # def f(foo, bad=[], more_bad=[x for x in range(3)]):
+ if sys.version_info < (3, 8, 2):
+ mutable_default_args['expected_errors'][2] = (10, 29, 'K001')
+
comments_begin_with_space = {
'code': """
# This is a good comment
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 6f3bcec04..88764db5a 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -1,4 +1,4 @@
-amqp==2.2.2
+amqp==5.0.0
Babel==2.3.4
bashate==0.5.1
bcrypt==3.1.3