Allow to tag projects as "last" on EM branches

For testing for Extended Maintenance branches with branchless
Tempest and Tempest plugins, we need to release the new tag
for Tempest and its plugins as last compatible version for that
Extended Maintenance branches.

This commits adds the documentation and validation machinery changes about
that tag $series-last which will be used for branchless testing tooling.

Change-Id: I799e8e637a54a46fd7ca74dd568ea2c7506fa32d
Depends-On: https://review.opendev.org/c/openstack/project-team-guide/+/769821
This commit is contained in:
Hervé Beraud 2021-01-12 11:04:28 +01:00 committed by Pierre Riteau
parent d851b92474
commit 8d61d2482b
3 changed files with 31 additions and 4 deletions

View File

@ -55,9 +55,9 @@ updates.
.. note::
If a branch is marked as Extended Maintenance, that means individual
projects can be in state *Maintained*, *Unmaintained* or *End of Life* on
that branch. Please check specific project about its actual status on the
given branch.
projects can be in state *Maintained*, *Unmaintained*, *Last* or
*End of Life* on that branch. Please check specific project about its
actual status on the given branch.
.. _Maintenance phases: https://docs.openstack.org/project-team-guide/stable-branches.html#maintenance-phases
.. _old phases: https://github.com/openstack/project-team-guide/blob/1c837bf0~/doc/source/stable-branches.rst

View File

@ -1102,6 +1102,24 @@ def validate_version_numbers(deliv, context):
release.version, deliv.series))
continue
if release.is_last:
LOG.debug('Found new LAST tag {} for {}'.format(
release.version, deliv.name))
if deliv.is_independent:
context.warning(
'LAST tag {} on independent deliverable, branch not validated'.format(
release.version))
continue
if release.version != "{}-last".format(deliv.series):
context.error(
"LAST tag {} should match branch name (e.g {}-last)".format(
release.version, deliv.series))
if not deliv.series_info.is_em:
context.error(
"LAST tag {} aren't allowed on a series ({}) that are not EM".format(
release.version, deliv.series))
continue
for project in release.projects:
if not gitutils.checkout_ref(context.workdir, project.repo.name,
@ -1303,6 +1321,9 @@ def validate_new_releases_in_open_series(deliv, context):
elif release.is_em:
LOG.debug('Found new EM tag {} for {}'.format(
release.version, project.repo))
elif release.is_last:
LOG.debug('Found new LAST tag {} for {}'.format(
release.version, project.repo))
else:
LOG.debug('Found new version {} for {}'.format(
release.version, project.repo))

View File

@ -64,7 +64,9 @@ def _version_sort_key(release):
# won't have more than 1000 major releases of anything, and I
# surely hope that is a safe assumption.
version_string = release['version']
if version_string.endswith('-eol') or version_string.endswith('-em'):
if version_string.endswith('-eol') or \
version_string.endswith('-em') or \
version_string.endswith('-last'):
return _safe_semver('1000.0.0')
return _safe_semver(version_string)
@ -338,6 +340,10 @@ class Release(object):
def is_em(self):
return self.version.endswith('-em')
@property
def is_last(self):
return self.version.endswith('-last')
@property
def em_series(self):
if self.is_em: