From 51e11ed1a49cf96eea515838521ba436181bd10f Mon Sep 17 00:00:00 2001
From: Thierry Carrez <thierry@openstack.org>
Date: Thu, 12 Sep 2024 16:57:18 +0200
Subject: [PATCH] Remove description to simplify release-announce

Current release-announce job proceeds with installing the package being
released, just in order to compute the "description" of the package and
include it in the announcement. This is costly and error-prone, for very
little gain.

This change removes the costly computation of the "description". The
"project_name" was overridden by $ZUUL_PROJECT anyway. The email
template already has logic to skip the description if it's not provided.

Change-Id: I5a60556f7d321fd4c37f1424509469da28a1eec9
---
 tools/announce.sh | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/tools/announce.sh b/tools/announce.sh
index 3c0da3b67c..f1047df46f 100755
--- a/tools/announce.sh
+++ b/tools/announce.sh
@@ -168,26 +168,15 @@ echo "$DIFF_START to $VERSION on $SERIES"
 
 relnotes_file="$RELNOTESDIR/$SHORTNAME-$VERSION"
 
-# As we use importlib to retrieve information we have to pass the
-# importable name of the module, example: oslo.messaging => oslo_messaging
-modified_shortname=${SHORTNAME//\./_}
-
-# ensure that the package is a valid package that can be imported by
-# importlib.metadata
-python -m pip install .
-project_name=$(python -c "import importlib.metadata; print(importlib.metadata.metadata('${modified_shortname}')['Name'])" || true)
-if [ -n "${project_name}" ] ; then
-    description=$(python -c "import importlib.metadata; print(importlib.metadata.metadata('${modified_shortname}')['Summary'])")
-else
-    # As a last resort, guess that the project name may be the same as that
-    # of the local working directory at the point this script is invoked.
-    project_name="$(basename $(pwd))"
-fi
 
 # If we are running in the context of a Zuul CI system,
 # we can just infer the project name from the repo name it supplies.
 if [ -n "$ZUUL_PROJECT" ] ; then
     project_name="$(basename ${ZUUL_PROJECT})"
+else
+    # As a last resort, guess that the project name may be the same as that
+    # of the local working directory at the point this script is invoked.
+    project_name="$(basename $(pwd))"
 fi
 
 echo
@@ -200,7 +189,6 @@ release-notes \
     --publishing-dir-name "$SHORTNAME" \
     . "$project_name" "$DIFF_START" "$VERSION" \
     $include_pypi_link \
-    --description "$description" \
     | tee $relnotes_file
 
 echo