Cleanup voting entries in projects.yaml
Add a new test that checks for non-voting jobs in pipelines and informs the user about it. The report currently is: Checking voting status of jobs ============================== Found non-voting job in post: project: openstack/designate job: openstack-tox-cover Found non-voting job in post: project: openstack/manila job: openstack-tox-cover Found non-voting job in post: project: openstack/murano-dashboard job: openstack-tox-cover Found non-voting job in gate: project: openstack/python-keystoneclient job: legacy-keystoneclient-dsvm-functional Found non-voting job in post: project: openstack/python-muranoclient job: openstack-tox-cover Found non-voting job in post: project: openstack/sahara-tests job: openstack-tox-cover (omitting one periodic job) fix this: * Remove the non-voting attribute from all post and periodic jobs. * Remove non-voting job legacy-keystoneclient-dsvm-functional from gate pipeline. Change-Id: I41a44902ca2f7bca1e32692efbb29d2884632ef1
This commit is contained in:
parent
edfaa64f5b
commit
4167b1a6b4
|
@ -108,11 +108,63 @@ def check_release_jobs():
|
|||
return errors
|
||||
|
||||
|
||||
def check_pipeline(project, job_pipeline, pipeline_name):
|
||||
|
||||
errors = False
|
||||
|
||||
for job in job_pipeline:
|
||||
if isinstance(job, dict):
|
||||
for name in job:
|
||||
if ('voting' in job[name]
|
||||
and (not job[name]['voting'])):
|
||||
errors = True
|
||||
print(" Found non-voting job in %s:" % pipeline_name)
|
||||
print(" project: %s" % project['name'])
|
||||
print(" job: %s" % name)
|
||||
return errors
|
||||
|
||||
|
||||
def check_pipelines(project, pipeline_name):
|
||||
|
||||
errors = False
|
||||
|
||||
if pipeline_name in project and 'jobs' in project[pipeline_name]:
|
||||
errors = check_pipeline(project, project[pipeline_name]['jobs'],
|
||||
pipeline_name)
|
||||
return errors
|
||||
|
||||
|
||||
def check_voting():
|
||||
errors = False
|
||||
print("\nChecking voting status of jobs")
|
||||
print("==============================")
|
||||
|
||||
for entry in projects:
|
||||
project = entry['project']
|
||||
errors |= check_pipelines(project, 'gate')
|
||||
# TODO(jaegerandi): Enable in followup change.
|
||||
# errors |= check_pipelines(project, 'experimental')
|
||||
errors |= check_pipelines(project, 'post')
|
||||
errors |= check_pipelines(project, 'periodic')
|
||||
|
||||
if errors:
|
||||
print(" Note the following about non-voting jobs in pipelines:")
|
||||
print(" * Never run non-voting jobs in gate pipeline, they just")
|
||||
print(" waste resources, remove such jobs.")
|
||||
print(" * Experimental, periodic, and post pipelines are always")
|
||||
print(" non-voting. The 'voting: false' line is redundant, remove")
|
||||
print(" it.")
|
||||
else:
|
||||
print("... all fine.")
|
||||
return errors
|
||||
|
||||
|
||||
def check_all():
|
||||
|
||||
errors = check_system_templates()
|
||||
errors = check_projects_sorted() or errors
|
||||
errors = check_release_jobs() or errors
|
||||
errors = check_voting() or errors
|
||||
|
||||
if errors:
|
||||
print("\nFound errors in zuul.d/projects.yaml!\n")
|
||||
|
|
|
@ -6482,8 +6482,7 @@
|
|||
voting: false
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
- openstack-tox-cover
|
||||
|
||||
- project:
|
||||
name: openstack/designate-dashboard
|
||||
|
@ -8945,7 +8944,6 @@
|
|||
periodic:
|
||||
jobs:
|
||||
- legacy-rally-dsvm-fakevirt-heat:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^api-ref/.*$
|
||||
|
@ -10234,8 +10232,7 @@
|
|||
branches: ^(?!driverfixes).*$
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
- openstack-tox-cover
|
||||
|
||||
- project:
|
||||
name: openstack/manila-image-elements
|
||||
|
@ -10890,8 +10887,7 @@
|
|||
voting: false
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
- openstack-tox-cover
|
||||
experimental:
|
||||
jobs:
|
||||
- legacy-dashboard-dsvm-selenium-package:
|
||||
|
@ -16544,10 +16540,6 @@
|
|||
jobs:
|
||||
- legacy-keystoneclient-dsvm-functional:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- legacy-keystoneclient-dsvm-functional:
|
||||
voting: false
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover
|
||||
|
@ -16673,8 +16665,7 @@
|
|||
- legacy-muranoclient-dsvm-functional-mysql-backend
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
- openstack-tox-cover
|
||||
|
||||
- project:
|
||||
name: openstack/python-namosclient
|
||||
|
@ -17974,8 +17965,7 @@
|
|||
- ^sahara_tempest_plugin/.*$
|
||||
post:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
voting: false
|
||||
- openstack-tox-cover
|
||||
experimental:
|
||||
jobs:
|
||||
- legacy-sahara-dsvm-scenario-multinode-spark:
|
||||
|
|
Loading…
Reference in New Issue