From 3f96e774cea58778b73326685a61500e3bab6628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C5=91d=20Ill=C3=A9s?= Date: Mon, 20 Feb 2023 18:18:04 +0100 Subject: [PATCH] propose-library-branches command with release_id With the new release identification / naming schema [1] (like: 2023.1 Antelope) new stable branch naming was introduced (like: stable/2023.1). This was not handled in the propose-library-branches command as it still used the release name. This patch fixes this by reading the 'release-id' field from series_status.yaml and if present then uses it as stable/ for the branch creation. [1] https://governance.openstack.org/tc/reference/release-naming.html Change-Id: Ie87862669fb965729e23a9374c34b1ba2e71b445 --- openstack_releases/cmds/propose_library_branches.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openstack_releases/cmds/propose_library_branches.py b/openstack_releases/cmds/propose_library_branches.py index 21e8d5a01b..b00a313244 100644 --- a/openstack_releases/cmds/propose_library_branches.py +++ b/openstack_releases/cmds/propose_library_branches.py @@ -21,6 +21,7 @@ import tempfile import openstack_releases from openstack_releases import defaults +from openstack_releases import series_status from openstack_releases import yamlutils @@ -103,7 +104,12 @@ def main(): args.series, '*.yaml') verbose('Scanning {}'.format(pattern)) deliverable_files = sorted(glob.glob(pattern)) - new_branch = 'stable/' + args.series + + series_status_data = series_status.SeriesStatus.default() + release_id = series_status_data[args.series].release_id + if release_id is None: + release_id = args.series + new_branch = 'stable/' + str(release_id) for filename in deliverable_files: deliverable_name = os.path.basename(filename)[:-5]