diff --git a/doc/source/reference/process.rst b/doc/source/reference/process.rst index 57a19a7897..2a8b23ec9f 100644 --- a/doc/source/reference/process.rst +++ b/doc/source/reference/process.rst @@ -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 =========== diff --git a/doc/source/reference/using.rst b/doc/source/reference/using.rst index 2781dffa0f..a98b5dc0e5 100644 --- a/doc/source/reference/using.rst +++ b/doc/source/reference/using.rst @@ -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 ---------------------- diff --git a/tools/membership_freeze_test.py b/tools/membership_freeze_test.py new file mode 100644 index 0000000000..9d4cd12a46 --- /dev/null +++ b/tools/membership_freeze_test.py @@ -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 +# 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() diff --git a/tox.ini b/tox.ini index 5d9c814d11..968c8655c3 100644 --- a/tox.ini +++ b/tox.ini @@ -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}