Merge "Adding a tool to catch projects that missed branching"
This commit is contained in:
commit
c9e96c9c20
@ -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.
|
||||
|
||||
|
@ -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
|
||||
--------------------------------
|
||||
|
||||
|
@ -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)
|
@ -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):
|
||||
|
||||
|
@ -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
|
||||
|
63
tools/list_unbranched_projects.sh
Executable file
63
tools/list_unbranched_projects.sh
Executable file
@ -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 <<EOF
|
||||
usage: $0 [<args>]
|
||||
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user