CI: Various required fixes
- Pins CI jobs to xena as an attempted fix for them passing
- Removes no-longer-used Zuul Queue param
- cherry-pick of "Fix sqlalchemy" [1]
[1] 4bc75327aa
Change-Id: I8389391f0f4ff270460341f42729cd01d01e2172
This commit is contained in:
parent
533d29f029
commit
419717eefb
@ -255,21 +255,25 @@ class MigrationCheckersMixin(object):
|
|||||||
|
|
||||||
def _check_e169a4a81d88(self, engine, data):
|
def _check_e169a4a81d88(self, engine, data):
|
||||||
rule_conditions = db_utils.get_table(engine, 'rule_conditions')
|
rule_conditions = db_utils.get_table(engine, 'rule_conditions')
|
||||||
# set invert with default value - False
|
with engine.begin() as connection:
|
||||||
data = {'id': 1, 'op': 'eq', 'multiple': 'all'}
|
# set invert with default value - False
|
||||||
rule_conditions.insert().execute(data)
|
data = {'id': 1, 'op': 'eq', 'multiple': 'all'}
|
||||||
|
insert_rc = rule_conditions.insert()
|
||||||
|
connection.execute(insert_rc, data)
|
||||||
|
|
||||||
conds = rule_conditions.select(
|
rc_stmt = rule_conditions.select(
|
||||||
rule_conditions.c.id == 1).execute().first()
|
rule_conditions.c.id == 1)
|
||||||
self.assertFalse(conds['invert'])
|
conds = connection.execute(rc_stmt).first()
|
||||||
|
self.assertFalse(conds['invert'])
|
||||||
|
|
||||||
# set invert with - True
|
# set invert with - True
|
||||||
data = {'id': 2, 'op': 'eq', 'multiple': 'all', 'invert': True}
|
data2 = {'id': 2, 'op': 'eq', 'multiple': 'all', 'invert': True}
|
||||||
rule_conditions.insert().execute(data)
|
connection.execute(insert_rc, data2)
|
||||||
|
|
||||||
conds = rule_conditions.select(
|
rc_stmt2 = rule_conditions.select(
|
||||||
rule_conditions.c.id == 2).execute().first()
|
rule_conditions.c.id == 2)
|
||||||
self.assertTrue(conds['invert'])
|
conds2 = connection.execute(rc_stmt2).first()
|
||||||
|
self.assertTrue(conds2['invert'])
|
||||||
|
|
||||||
def _pre_upgrade_d2e48801c8ef(self, engine):
|
def _pre_upgrade_d2e48801c8ef(self, engine):
|
||||||
ok_node_id = uuidutils.generate_uuid()
|
ok_node_id = uuidutils.generate_uuid()
|
||||||
@ -289,8 +293,10 @@ class MigrationCheckersMixin(object):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
nodes = db_utils.get_table(engine, 'nodes')
|
nodes = db_utils.get_table(engine, 'nodes')
|
||||||
for node in data:
|
with engine.begin() as connection:
|
||||||
nodes.insert().execute(node)
|
for node in data:
|
||||||
|
insert_node = nodes.insert()
|
||||||
|
connection.execute(insert_node, node)
|
||||||
return {'err_node_id': err_node_id, 'ok_node_id': ok_node_id}
|
return {'err_node_id': err_node_id, 'ok_node_id': ok_node_id}
|
||||||
|
|
||||||
def _check_d2e48801c8ef(self, engine, data):
|
def _check_d2e48801c8ef(self, engine, data):
|
||||||
@ -311,24 +317,29 @@ class MigrationCheckersMixin(object):
|
|||||||
|
|
||||||
ok_node_id = data['ok_node_id']
|
ok_node_id = data['ok_node_id']
|
||||||
err_node_id = data['err_node_id']
|
err_node_id = data['err_node_id']
|
||||||
# assert the ok node is in the (default) finished state
|
with engine.begin() as connection:
|
||||||
ok_node = nodes.select(nodes.c.uuid == ok_node_id).execute().first()
|
# assert the ok node is in the (default) finished state
|
||||||
self.assertEqual(istate.States.finished, ok_node['state'])
|
ok_node_stmt = nodes.select(nodes.c.uuid == ok_node_id)
|
||||||
# assert err node state is error after the migration
|
ok_node = connection.execute(ok_node_stmt).first()
|
||||||
# even though the default state is finished
|
self.assertEqual(istate.States.finished, ok_node['state'])
|
||||||
err_node = nodes.select(nodes.c.uuid == err_node_id).execute().first()
|
# assert err node state is error after the migration
|
||||||
self.assertEqual(istate.States.error, err_node['state'])
|
# even though the default state is finished
|
||||||
|
err_node_stmt = nodes.select(nodes.c.uuid == err_node_id)
|
||||||
|
err_node = connection.execute(err_node_stmt).first()
|
||||||
|
self.assertEqual(istate.States.error, err_node['state'])
|
||||||
|
|
||||||
def _pre_upgrade_d00d6e3f38c4(self, engine):
|
def _pre_upgrade_d00d6e3f38c4(self, engine):
|
||||||
nodes = db_utils.get_table(engine, 'nodes')
|
nodes = db_utils.get_table(engine, 'nodes')
|
||||||
data = []
|
data = []
|
||||||
for finished_at in (None, 1234.0):
|
with engine.begin() as connection:
|
||||||
node = {'uuid': uuidutils.generate_uuid(),
|
for finished_at in (None, 1234.0):
|
||||||
'started_at': 1232.0,
|
node = {'uuid': uuidutils.generate_uuid(),
|
||||||
'finished_at': finished_at,
|
'started_at': 1232.0,
|
||||||
'error': None}
|
'finished_at': finished_at,
|
||||||
nodes.insert().values(node).execute()
|
'error': None}
|
||||||
data.append(node)
|
insert_node = nodes.insert().values(node)
|
||||||
|
connection.execute(insert_node)
|
||||||
|
data.append(node)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _check_d00d6e3f38c4(self, engine, data):
|
def _check_d00d6e3f38c4(self, engine, data):
|
||||||
@ -342,35 +353,41 @@ class MigrationCheckersMixin(object):
|
|||||||
self.assertIsInstance(nodes.c.finished_at.type,
|
self.assertIsInstance(nodes.c.finished_at.type,
|
||||||
sqlalchemy.types.DateTime)
|
sqlalchemy.types.DateTime)
|
||||||
|
|
||||||
for node in data:
|
with engine.begin() as connection:
|
||||||
finished_at = datetime.datetime.utcfromtimestamp(
|
for node in data:
|
||||||
node['finished_at']) if node['finished_at'] else None
|
finished_at = datetime.datetime.utcfromtimestamp(
|
||||||
row = nodes.select(nodes.c.uuid == node['uuid']).execute().first()
|
node['finished_at']) if node['finished_at'] else None
|
||||||
self.assertEqual(
|
|
||||||
datetime.datetime.utcfromtimestamp(node['started_at']),
|
stmt = nodes.select(nodes.c.uuid == node['uuid'])
|
||||||
row['started_at'])
|
row = connection.execute(stmt).first()
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
finished_at,
|
datetime.datetime.utcfromtimestamp(node['started_at']),
|
||||||
row['finished_at'])
|
row['started_at'])
|
||||||
|
self.assertEqual(
|
||||||
|
finished_at,
|
||||||
|
row['finished_at'])
|
||||||
|
|
||||||
def _pre_upgrade_882b2d84cb1b(self, engine):
|
def _pre_upgrade_882b2d84cb1b(self, engine):
|
||||||
attributes = db_utils.get_table(engine, 'attributes')
|
attributes = db_utils.get_table(engine, 'attributes')
|
||||||
nodes = db_utils.get_table(engine, 'nodes')
|
nodes = db_utils.get_table(engine, 'nodes')
|
||||||
self.node_uuid = uuidutils.generate_uuid()
|
self.node_uuid = uuidutils.generate_uuid()
|
||||||
node = {
|
with engine.begin() as connection:
|
||||||
'uuid': self.node_uuid,
|
node = {
|
||||||
'started_at': datetime.datetime.utcnow(),
|
'uuid': self.node_uuid,
|
||||||
'finished_at': None,
|
'started_at': datetime.datetime.utcnow(),
|
||||||
'error': None,
|
'finished_at': None,
|
||||||
'state': istate.States.starting
|
'error': None,
|
||||||
}
|
'state': istate.States.starting
|
||||||
nodes.insert().values(node).execute()
|
}
|
||||||
data = {
|
insert_node = nodes.insert().values(node)
|
||||||
'uuid': self.node_uuid,
|
connection.execute(insert_node)
|
||||||
'name': 'foo',
|
data = {
|
||||||
'value': 'bar'
|
'uuid': self.node_uuid,
|
||||||
}
|
'name': 'foo',
|
||||||
attributes.insert().values(data).execute()
|
'value': 'bar'
|
||||||
|
}
|
||||||
|
insert_att = attributes.insert().values(data)
|
||||||
|
connection.execute(insert_att)
|
||||||
|
|
||||||
def _check_882b2d84cb1b(self, engine, data):
|
def _check_882b2d84cb1b(self, engine, data):
|
||||||
attributes = db_utils.get_table(engine, 'attributes')
|
attributes = db_utils.get_table(engine, 'attributes')
|
||||||
@ -385,21 +402,25 @@ class MigrationCheckersMixin(object):
|
|||||||
self.assertIn('value', col_names)
|
self.assertIn('value', col_names)
|
||||||
self.assertIsInstance(attributes.c.value.type, sqlalchemy.types.String)
|
self.assertIsInstance(attributes.c.value.type, sqlalchemy.types.String)
|
||||||
|
|
||||||
row = attributes.select(attributes.c.node_uuid ==
|
with engine.begin() as connection:
|
||||||
self.node_uuid).execute().first()
|
stmt = attributes.select(attributes.c.node_uuid == self.node_uuid)
|
||||||
self.assertEqual(self.node_uuid, row.node_uuid)
|
row = connection.execute(stmt).first()
|
||||||
self.assertNotEqual(self.node_uuid, row.uuid)
|
self.assertEqual(self.node_uuid, row.node_uuid)
|
||||||
self.assertIsNotNone(row.uuid)
|
self.assertNotEqual(self.node_uuid, row.uuid)
|
||||||
self.assertEqual('foo', row.name)
|
self.assertIsNotNone(row.uuid)
|
||||||
self.assertEqual('bar', row.value)
|
self.assertEqual('foo', row.name)
|
||||||
|
self.assertEqual('bar', row.value)
|
||||||
|
|
||||||
def _check_2970d2d44edc(self, engine, data):
|
def _check_2970d2d44edc(self, engine, data):
|
||||||
nodes = db_utils.get_table(engine, 'nodes')
|
nodes = db_utils.get_table(engine, 'nodes')
|
||||||
data = {'uuid': 'abcd'}
|
data = {'uuid': 'abcd'}
|
||||||
nodes.insert().execute(data)
|
|
||||||
|
|
||||||
n = nodes.select(nodes.c.uuid == 'abcd').execute().first()
|
with engine.begin() as connection:
|
||||||
self.assertIsNone(n['manage_boot'])
|
insert_node = nodes.insert()
|
||||||
|
connection.execute(insert_node, data)
|
||||||
|
n_stmt = nodes.select(nodes.c.uuid == 'abcd')
|
||||||
|
n = connection.execute(n_stmt).first()
|
||||||
|
self.assertIsNone(n['manage_boot'])
|
||||||
|
|
||||||
def _check_bf8dec16023c(self, engine, data):
|
def _check_bf8dec16023c(self, engine, data):
|
||||||
introspection_data = db_utils.get_table(engine, 'introspection_data')
|
introspection_data = db_utils.get_table(engine, 'introspection_data')
|
||||||
|
13
tox.ini
13
tox.ini
@ -1,14 +1,15 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
skipsdist = True
|
|
||||||
envlist = py3,pep8,functional-py38
|
envlist = py3,pep8,functional-py38
|
||||||
ignore_basepython_conflict=true
|
ignore_basepython_conflict=true
|
||||||
|
requires =
|
||||||
|
tox<4
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
@ -26,7 +27,7 @@ commands = {posargs}
|
|||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
@ -35,7 +36,7 @@ commands =
|
|||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
@ -98,7 +99,7 @@ setenv = PYTHONHASHSEED=0
|
|||||||
sitepackages = False
|
sitepackages = False
|
||||||
# NOTE(dtantsur): documentation building process requires importing ironic
|
# NOTE(dtantsur): documentation building process requires importing ironic
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
@ -120,7 +121,7 @@ deps =
|
|||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = bandit -r ironic_inspector -x test -n 5 -ll -c tools/bandit.yml
|
commands = bandit -r ironic_inspector -x test -n 5 -ll -c tools/bandit.yml
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
timeout: 10800
|
timeout: 10800
|
||||||
required-projects:
|
required-projects:
|
||||||
- name: openstack/devstack
|
- name: openstack/devstack
|
||||||
override-checkout: master
|
override-checkout: stable/xena
|
||||||
- name: openstack/ironic
|
- name: openstack/ironic
|
||||||
override-checkout: bugfix/18.1
|
override-checkout: bugfix/18.1
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
- openstack/ironic-inspector
|
- openstack/ironic-inspector
|
||||||
irrelevant-files:
|
irrelevant-files:
|
||||||
- ^.*\.rst$
|
- ^.*\.rst$
|
||||||
@ -188,3 +190,72 @@
|
|||||||
- job:
|
- job:
|
||||||
name: ironic-inspector-tempest-managed
|
name: ironic-inspector-tempest-managed
|
||||||
parent: ironic-inspector-tempest-managed-non-standalone
|
parent: ironic-inspector-tempest-managed-non-standalone
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-tox-functional-py38-xena
|
||||||
|
parent: openstack-tox-functional-py38
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
|
||||||
|
- project-template:
|
||||||
|
name: openstack-python3-xena-jobs-inspector-bugfix107
|
||||||
|
description: |
|
||||||
|
Runs unit tests for an OpenStack Python project under the CPython
|
||||||
|
version 3 releases designated for testing in the Xena release.
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-pep8:
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
- openstack-tox-py36:
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
- openstack-tox-py38:
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
- openstack-tox-py39:
|
||||||
|
voting:
|
||||||
|
false
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-pep8:
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
- openstack-tox-py36:
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
- openstack-tox-py38:
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
|
||||||
|
- project-template:
|
||||||
|
name: openstack-cover-jobs-inspector-bugfix107
|
||||||
|
description: |
|
||||||
|
Runs openstack-tox-cover in only the check pipeline using
|
||||||
|
yoga upper-constraints.
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-cover:
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
|
- openstack-tox-cover:
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/requirements
|
||||||
|
override-checkout: stable/xena
|
@ -1,10 +1,9 @@
|
|||||||
- project:
|
- project:
|
||||||
templates:
|
templates:
|
||||||
- check-requirements
|
- check-requirements
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs-inspector-bugfix107
|
||||||
- openstack-python3-xena-jobs
|
- openstack-python3-xena-jobs-inspector-bugfix107
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- ironic-inspector-grenade
|
- ironic-inspector-grenade
|
||||||
@ -16,17 +15,16 @@
|
|||||||
override-checkout: bugfix/18.1
|
override-checkout: bugfix/18.1
|
||||||
- ironic-inspector-tempest-discovery
|
- ironic-inspector-tempest-discovery
|
||||||
- ironic-inspector-tempest-managed-non-standalone
|
- ironic-inspector-tempest-managed-non-standalone
|
||||||
- openstack-tox-functional-py38
|
- openstack-tox-functional-py38-xena
|
||||||
- bifrost-integration-tinyipa-ubuntu-focal:
|
- bifrost-integration-tinyipa-ubuntu-focal:
|
||||||
voting: false
|
voting: false
|
||||||
override-checkout: master
|
override-checkout: master
|
||||||
- ironic-inspector-tox-bandit:
|
- ironic-inspector-tox-bandit:
|
||||||
voting: false
|
voting: false
|
||||||
gate:
|
gate:
|
||||||
queue: ironic
|
|
||||||
jobs:
|
jobs:
|
||||||
- ironic-inspector-grenade
|
- ironic-inspector-grenade
|
||||||
- ironic-inspector-tempest
|
- ironic-inspector-tempest
|
||||||
- ironic-inspector-tempest-discovery
|
- ironic-inspector-tempest-discovery
|
||||||
- ironic-inspector-tempest-managed-non-standalone
|
- ironic-inspector-tempest-managed-non-standalone
|
||||||
- openstack-tox-functional-py38
|
- openstack-tox-functional-py38-xena
|
||||||
|
Loading…
Reference in New Issue
Block a user