Merge "List deliverables not released since given date"

This commit is contained in:
Zuul
2019-07-19 05:21:47 +00:00
committed by Gerrit Code Review
2 changed files with 111 additions and 19 deletions

View File

@@ -45,7 +45,13 @@ Between Summit and Milestone-1
Milestone-1
===========
#. Generate release requests for all cycle-with-intermediary libraries
#. Generate a list of all cycle-with-intermediary libraries which did not
release since the previous release. For this, run::
tox -e venv -- list-deliverables --unreleased \
--model cycle-with-intermediary --type client-library --type library
Generate release requests for all cycle-with-intermediary libraries
which had changes, but did not release since the previous release.
That patch will be used as a base to communicate with the team:
if a team wants to wait for a specific patch to make it to the library,
@@ -71,15 +77,16 @@ Between Milestone-1 and Milestone-2
#. Use the countdown emails to list which projects have not done any
stable release yet, to encourage them to do so.
#. Use the countdown emails to list which intermediary-released (or
independent) deliverables haven't done a release yet. Remind teams that
intermediary-released services that have not done a release by
milestone-2 should be switched to the cycle-with-rc model.
#. Use the countdown emails to list which intermediary-released deliverables
haven't done a release yet. Remind teams that intermediary-released
deliverables that have not done a release by milestone-2 should be
switched to the cycle-with-rc model.
For this, run::
tox -e venv -- list-deliverables --unreleased --model cycle-with-intermediary \
--type client-library --type horizon-plugin --type library --type other
tox -e venv -- list-deliverables --unreleased \
--model cycle-with-intermediary \
--type horizon-plugin --type other --type service
#. Mention the upcoming MembershipFreeze deadline in the countdown emails.
@@ -98,7 +105,13 @@ Between Milestone-1 and Milestone-2
Milestone-2
===========
#. Generate release requests for all cycle-with-intermediary libraries
#. Generate a list of all cycle-with-intermediary libraries which did not
release since the YYYY-MM-DD date of milestone-1. For this, run::
tox -e venv -- list-deliverables --unreleased-since YYYY-MM-DD
--model cycle-with-intermediary --type client-library --type library
Generate release requests for all cycle-with-intermediary libraries
which had changes, but did not release since milestone-1.
That patch will be used as a base to communicate with the team:
if a team wants to wait for a specific patch to make it to the library,
@@ -131,10 +144,17 @@ Between Milestone-2 and Milestone-3
#. Check with the election team about whether the countdown email
needs to include any updates about the election schedule.
#. For intermediary-released service projects that have not done a
release by milestone-2, propose a change from cycle-with-intermediary
to cycle-with-rc. Engage with PTLs and release liaisons to either
get an intermediary release, or a confirmation of the model switch.
#. Generate a list of intermediary-released service deliverables that have
not done a release in this cycle yet. For this, use::
tox -e venv -- list-deliverables --unreleased \
--model cycle-with-intermediary \
--type horizon-plugin --type other --type service
For intermediary-released deliverables that have not done a release yet,
propose a change from cycle-with-intermediary to cycle-with-rc.
Engage with PTLs and release liaisons to either get an intermediary
release, or a confirmation of the model switch.
#. Two weeks before Milestone-3, include a reminder about the final
library release freeze coming the week before Milestone-3.
@@ -167,7 +187,14 @@ Between Milestone-2 and Milestone-3
Final Library Release (week before Milestone-3)
===============================================
#. Generate release requests for all cycle-with-intermediary libraries
#. Generate a list of all cycle-with-intermediary libraries (except client
libraries) which did not release since the YYYY-MM-DD date of milestone-2.
For this, run::
tox -e venv -- list-deliverables --unreleased-since YYYY-MM-DD
--model cycle-with-intermediary --type library
Generate release requests for all cycle-with-intermediary libraries
(except client libraries) which had changes, but did not release since
milestone-2. That patch will be used as a base to communicate with the
team: if a team wants to wait for a specific patch to make it to the
@@ -196,7 +223,14 @@ Final Library Release (week before Milestone-3)
Milestone-3
===========
#. Generate release requests for all client libraries which had changes,
#. Generate a list of all cycle-with-intermediary client libraries which
did not release since the YYYY-MM-DD date of milestone-2.
For this, run::
tox -e venv -- list-deliverables --unreleased-since YYYY-MM-DD
--model cycle-with-intermediary --type client-library
Generate release requests for all client libraries which had changes,
but did not release since milestone-2. That patch will be used as a base
to communicate with the team: if a team wants to wait for a specific patch
to make it to the library, someone from the team can -1 the patch to have
@@ -245,10 +279,17 @@ Milestone-3
Between Milestone-3 and RC1
===========================
#. Warn cycle-with-intermediary services that have releases more than
2 months old that we will use their existing release as a point for
branching if they have not prepared a newer release by the final RC
deadline.
#. List cycle-with-intermediary deliverables that have not been refreshed in
the last 2 months. For this, use the following command, with YYYY-MM-DD
being the day two nmonths ago::
tox -e venv -- list-deliverables --unreleased-since YYYY-MM-DD
--model cycle-with-intermediary \
--type horizon-plugin --type other --type service
Warn teams with deliverables that have releases more than 2 months old
that we will use their existing release as a point for branching if they
have not prepared a newer release by the final RC deadline.
#. Propose ``stable/$series`` branch creation for all client and non-client
libraries that had not requested it at freeze time. The following command

View File

@@ -15,6 +15,7 @@ from __future__ import print_function
import argparse
import csv
import operator
import requests
import openstack_releases
from openstack_releases import defaults
@@ -69,6 +70,12 @@ def main():
'--csvfile',
help='Save results (same as when --verbose) to CSV file',
)
parser.add_argument(
'--show-dates',
action='store_true',
default=False,
help='Show last release date (in verbose mode)',
)
parser.add_argument(
'--show-tags',
action='store_true',
@@ -119,6 +126,11 @@ def main():
action='store_true',
help='limit the list to deliverables not released in the cycle',
)
grp.add_argument(
'--unreleased-since',
help=('limit the list to deliverables not released in the cycle '
'since a given YYYY-MM-DD date'),
)
grp.add_argument(
'--missing-rc',
action='store_true',
@@ -139,6 +151,8 @@ def main():
args = parser.parse_args()
series = args.series
GET_REFS_API = 'https://opendev.org/api/v1/repos/{}/git/{}'
GET_COMMIT_API = 'https://opendev.org/api/v1/repos/{}/git/commits/{}'
if args.missing_rc:
model = 'cycle-with-rc'
@@ -150,9 +164,14 @@ def main():
model = args.model
version_ending = None
if args.unreleased_since:
args.show_dates = True
verbose_template = '{name:30} {team:20}'
if not args.unreleased:
verbose_template += ' {latest_release:15}'
verbose_template += ' {latest_release:12}'
if args.show_dates:
verbose_template += ' {last_release_date:11}'
if len(args.type) != 1:
verbose_template += ' {type:15}'
if not args.model:
@@ -233,6 +252,36 @@ def main():
'b' in deliv.latest_release):
continue
release_date = {}
if (args.show_dates or args.unreleased_since) and deliv.is_released:
if args.all_releases:
versions = [a.version for a in deliv.releases]
else:
versions = [deliv.releases[-1].version]
for ver in versions:
ref = "refs/tags/{}".format(ver)
api = GET_REFS_API.format(deliv.repos[0], ref)
tagsjson = requests.get(api).json()
# Gitea returns either a single tag object, or a list of
# tag objects containing the provided string. So we need to
# filter the list for the exact match.
if isinstance(tagsjson, list):
for release_tag in tagsjson:
if release_tag['ref'] == ref:
break
else:
release_tag = tagsjson
release_sha = release_tag['object']['sha']
api = GET_COMMIT_API.format(deliv.repos[0], release_sha)
release_commit = requests.get(api).json()['commit']
release_date[ver] = release_commit['author']['date'][0:10]
if args.unreleased_since and deliv.is_released:
if release_date[ver] >= args.unreleased_since:
continue
if csvfile:
rel = (deliv.releases or [{}])[-1]
for prj in rel.get('projects', [{}]):
@@ -252,6 +301,7 @@ def main():
print(verbose_template.format(
name=deliv.name,
latest_release=r.version,
last_release_date=release_date.get(r.version, ''),
team=deliv.team,
type=deliv.type,
model=deliv.model,
@@ -261,6 +311,7 @@ def main():
print(verbose_template.format(
name=deliv.name,
latest_release=deliv.latest_release or '',
last_release_date=release_date.get(deliv.latest_release, ''),
team=deliv.team,
type=deliv.type,
model=deliv.model,