Add script to facilitate MembershipFreeze handling

This script will compute a list of deliverables present in
governance but unknown to release management, for manual
processing.

Change-Id: Ibebf777911416d978ecea5ba8d7b25b211e7ae52
This commit is contained in:
Thierry Carrez 2019-01-16 16:56:48 +01:00 committed by Hervé Beraud
parent d815ac8ed2
commit 50258742c9
4 changed files with 109 additions and 0 deletions

View File

@ -74,6 +74,17 @@ Between Milestone-1 and Milestone-2
List teams that still haven't done a library release yet and remind
them of the milestone-2 deadline.
5. Ahead of MembershipFreeze, run membership_freeze_test to check for
any new deliverable in governance that has not been released yet::
tox -e membership_freeze_test -- $series ~/branches/governance/reference/projects.yaml
Those should either get a release management exception (see
release-management key in the governance projects.yaml file) or an
empty deliverable file should be added to the series so that we can
properly track it. Leftovers are considered too young to be released
in the next release and will be reconsidered at the next cycle.
Milestone-2
===========

View File

@ -603,6 +603,25 @@ To set the pre-release group membership:
tox -e aclmanager -- groups pre_release ttx
tools/membership_freeze_test.py
--------------------------------
A script to test for new deliverables in governance that were
never under release management and therefore escape any form of
release management tracking.
Those need to be checked around milestone-2 (before MembershipFreeze)
so that we create deliverable files for them if they are to be part of
the final release.
Example:
To check for Stein release:
::
tox -e membership_freeze_test -- stein ~/branches/governance/reference/projects.yaml
propose-final-releases
----------------------

View File

@ -0,0 +1,76 @@
#!/usr/bin/python
#
# List deliverables that appear in governance but not in releases
# in preparation for MemberShipFreeze
#
# Copyright 2019 Thierry Carrez <thierry@openstack.org>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import argparse
import os.path
import sys
import yaml
# Infrastructure/OpenDev repositories escape OpenStack release management
TEAM_EXCEPTIONS = ['Infrastructure']
def deliverable_filename(deliverable, series):
return os.path.join('./deliverables', series, deliverable + '.yaml')
def in_governance_but_not_released(args):
missing = []
dirs = [args.series, '_independent']
with open(args.projects_yaml, 'r') as projects:
teams = yaml.load(projects)
for tname, team in teams.items():
if tname in TEAM_EXCEPTIONS:
continue
for dname, deliverable in team['deliverables'].items():
if 'release-management' in deliverable:
continue
for fname in [deliverable_filename(dname, s) for s in dirs]:
if os.path.isfile(fname):
break
else:
missing.append((tname, dname))
return missing
def main(args=sys.argv[1:]):
parser = argparse.ArgumentParser()
parser.add_argument(
'series',
help='name of the currently-developed series'
)
parser.add_argument(
'projects_yaml',
help='path to governance projects.yaml file'
)
args = parser.parse_args(args)
last_team = ''
for team, deliverable in in_governance_but_not_released(args):
if last_team != team:
print('\n' + team + ':')
last_team = team
print(deliverable)
if __name__ == '__main__':
main()

View File

@ -57,6 +57,9 @@ commands = bash -c "find {toxinidir} \
[testenv:aclmanager]
commands = python {toxinidir}/tools/aclmanager.py {posargs}
[testenv:membership_freeze_test]
commands = python {toxinidir}/tools/membership_freeze_test.py {posargs}
[testenv:venv]
deps = .[sphinxext]
commands = {posargs}