diff --git a/doc/source/reference/process.rst b/doc/source/reference/process.rst index 45378eb8b2..be5dce8988 100644 --- a/doc/source/reference/process.rst +++ b/doc/source/reference/process.rst @@ -206,6 +206,15 @@ Week before milestone-1 Milestone-1 =========== +#. Ensure that all trailing projects have been branched for the previous + series. + + - List unbranched projects using:: + + tools/list_unbranched_projects.sh + + - Propose a patch to branch the missing ones. + #. Propose autoreleases for cycle-with-intermediary libraries which did not release since the previous release. diff --git a/doc/source/reference/using.rst b/doc/source/reference/using.rst index d7c095d1e4..72e57a45c7 100644 --- a/doc/source/reference/using.rst +++ b/doc/source/reference/using.rst @@ -833,6 +833,24 @@ deliverable become EOL, this tool aim to list projects that have been declared EOL on a series that is EM and where the corresponding series branch still exists. +tools/list_unbranched_projects.sh +--------------------------------- + +A script to detect deliverables who haven't been branched during previous +series. + +Example: + +:: + + tools/list_unbranched_projects.sh + +This tooling aim to avoid to miss branching. This is a side effect of +the trailing projects, each series some of them are missed and remain +unbranched. We faced similar use case previously and that leaded us to +issues during releasing on stable branches. + + tools/membership_freeze_test.py -------------------------------- diff --git a/openstack_releases/cmds/list_em_series.py b/openstack_releases/cmds/list_series.py similarity index 79% rename from openstack_releases/cmds/list_em_series.py rename to openstack_releases/cmds/list_series.py index c0f59e9905..ed7a374f47 100644 --- a/openstack_releases/cmds/list_em_series.py +++ b/openstack_releases/cmds/list_series.py @@ -19,8 +19,16 @@ BASE_PATH = os.path.dirname(os.path.realpath(__file__)) ROOT_DIR = f'{BASE_PATH}/../../data' -def main(): +def em(): series = series_status.SeriesStatus.from_directory(ROOT_DIR) for serie in series: if series.get(serie).is_em: print(serie) + + +def maintained(): + series = series_status.SeriesStatus.from_directory(ROOT_DIR) + for serie in series: + if series.get(serie).is_maintained: + if serie != 'independent': + print(serie) diff --git a/openstack_releases/series_status.py b/openstack_releases/series_status.py index 051df75c9b..523734c250 100644 --- a/openstack_releases/series_status.py +++ b/openstack_releases/series_status.py @@ -51,6 +51,10 @@ class Series(object): def is_em(self): return self.status == 'extended maintenance' + @property + def is_maintained(self): + return self.status == 'maintained' or self.status == 'development' + class SeriesStatus(collections.abc.Mapping): diff --git a/setup.cfg b/setup.cfg index 2702e088ec..dfe76edc3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,8 @@ packages = openstack_releases console_scripts = validate-request = openstack_releases.cmds.validate:main list-changes = openstack_releases.cmds.list_changes:main - list-em-series = openstack_releases.cmds.list_em_series:main + list-em-series = openstack_releases.cmds.list_series:em + list-maintained-series = openstack_releases.cmds.list_series:maintained list-unreleased-changes = openstack_releases.cmds.list_unreleased_changes:main list-constraints = openstack_releases.cmds.list_constraints:main new-release = openstack_releases.cmds.new_release:main diff --git a/tools/list_unbranched_projects.sh b/tools/list_unbranched_projects.sh new file mode 100755 index 0000000000..60025b743c --- /dev/null +++ b/tools/list_unbranched_projects.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# +# 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. +function help { +# Display helping message +cat <] + +Retrieve unbranched projects for maintained series. +Can be used to retrieve branch inconsistencies on maintained series. + +Arguments: + -d, --debug Turn on the debug mode + -h, --help show this help message and exit +examples: + $(basename $0) +EOF +} + +for i in "$@"; do + case $i in + # Turn on the debug mode + -d|--debug) + set -x + shift 1 + ;; + # Display the helping message + -h|--help) + help + exit 0 + ;; + esac +done + + +GERRIT_URL="https://review.opendev.org" +TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname $TOOLSDIR) +source $TOOLSDIR/functions +enable_tox_venv + +series=($(list-maintained-series)) + +# Make sure no pager is configured so the output is not blocked +export PAGER= + +for current_series in "${series[@]}"; do + echo -e "\nUnbranched projects for ${current_series}:\n" + grep -L "stable/${current_series}" ${BASEDIR}/deliverables/${current_series}/*.yaml | \ + sed 's@'"${BASEDIR}"'\/@@g' | \ + grep -v tempest | \ + grep -v patrol +done