[distribtest] Use the blessed method to get GCF support Python runtimes (#34554)

The previous hack had bitrotted and was just returning 3.7. This method
was given to us by the GCF team and has backward compatibility
guarantees.

This will also help us to ensure that we don't accidentally remove
support for a particular Python runtime version before GCF does.
pull/34593/head
Richard Belleville 1 year ago committed by GitHub
parent 724e12a1c7
commit 94dd104c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      test/distrib/gcf/python/run.sh

@ -25,10 +25,7 @@ RUN_ID=$(uuidgen)
FAILED_RUNTIMES=""
# This is the only programmatic way to get access to the list of runtimes.
# While hacky, it's better than the alternative -- manually upgrading a
# hand-curated list every few months.
RUNTIMES=$(gcloud functions deploy --help | grep -Eo "python[0-9]+" | sort | uniq)
RUNTIMES=$(gcloud functions runtimes list --filter name:python* --region us-west1 | grep python | awk '{print $1}')
while read -r RUNTIME; do
BARE_VERSION=${RUNTIME//python/}

Loading…
Cancel
Save