From 2f9bf8068ef65cea600ea01dfb1018d1b62d3ce9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Fri, 29 Sep 2017 09:15:43 +0000 Subject: [PATCH] Ensure tag can be looked up outside cgit Under the very special cases where a release still need to happen for a deliverable which contained releases of a deprecated repository, the release would fail. A deprecated repository has its ACL changed and therefore the interface to cgit disappears. We cannot reliably use cgit for discovering references. Because all the repositories should have been already staged in workdir, we could directly fetch the reference there. And because a tag is a reference like a commit, we re-use the same code to discover the presence of the tag. Change-Id: Idad096e334ba444d28faf064b7d7f2d3d163ca8e --- openstack_releases/cmds/validate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openstack_releases/cmds/validate.py b/openstack_releases/cmds/validate.py index e97906f9df..8f75b1fe69 100644 --- a/openstack_releases/cmds/validate.py +++ b/openstack_releases/cmds/validate.py @@ -423,8 +423,9 @@ def validate_releases(deliverable_info, zuul_layout, # doesn't exist. continue - version_exists = gitutils.tag_exists( - project['repo'], release['version'], + # Check the presence of tag in the references + version_exists = gitutils.commit_exists( + workdir, project['repo'], release['version'], ) # Check that the sdist name and tarball-base name match.