From 1fe7707cf04852d024b64f695e40568696851b15 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 5 Mar 2024 08:30:19 -0800 Subject: [PATCH] Ignore 500 status code in generate plugin script Due to various reasons, this script may encounter the 500 status code from some repo (x/fuel-plugin-onos in current case[1]) If that happen then it return failure status code to the propose-updates job and fail that job - https://zuul.openstack.org/builds?job_name=propose-updates&project=openstack%2Fdevstack&skip=0 It is better not to raise the 500 error in this script and just ignore those repo to process further to detect the plugin. [1] https://zuul.openstack.org/build/dba0aa41d145472397916dfcd13948de/log/job-output.txt#2442 Change-Id: Ibca0a2aac404161340e8fc00170018eecf5c8326 --- tools/generate-devstack-plugins-list.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/generate-devstack-plugins-list.py b/tools/generate-devstack-plugins-list.py index 1cacd06bf8..bc28515a26 100644 --- a/tools/generate-devstack-plugins-list.py +++ b/tools/generate-devstack-plugins-list.py @@ -73,8 +73,11 @@ logging.debug("Found %d projects" % len(projects)) s = requests.Session() # sometimes gitea gives us a 500 error; retry sanely # https://stackoverflow.com/a/35636367 +# We need to disable raise_on_status because if any repo endup with 500 then +# propose-updates job which run this script will fail. retries = Retry(total=3, backoff_factor=1, - status_forcelist=[ 500 ]) + status_forcelist=[ 500 ], + raise_on_status=False) s.mount('https://', HTTPAdapter(max_retries=retries)) found_plugins = filter(functools.partial(has_devstack_plugin, s), projects)