From d90c3ee326c38946c516d072a5c2f7dcd19302ec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 28 Aug 2026 14:14:41 -0700 Subject: [PATCH] chore: fix storage universe domain secret loading in acceptance tests Nightly acceptance crashed the `google-cloud-storage` suite due to missing universe domain secrets. This unblocks CI by: - Adding universe domain secrets to nightly/continuous Kokoro configs, matching [presubmit](https://github.com/googleapis/google-cloud-ruby/blob/main/.kokoro/presubmit/acceptance.cfg#L32). - Rescuing missing secret errors in `universe_domain_test.rb` to log and skip instead of crashing. Follow-up PRs will address individual failing tests once nightly runs. --- .kokoro/continuous/acceptance.cfg | 8 +++++++- .kokoro/nightly/acceptance-newest.cfg | 8 +++++++- .kokoro/nightly/acceptance-oldest.cfg | 8 +++++++- .kokoro/presubmit/acceptance.cfg | 8 +++++++- .../acceptance/storage/universe_domain_test.rb | 15 ++++++++++----- 5 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.kokoro/continuous/acceptance.cfg b/.kokoro/continuous/acceptance.cfg index 96405f5a757e..1782677e96d0 100644 --- a/.kokoro/continuous/acceptance.cfg +++ b/.kokoro/continuous/acceptance.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/nightly/acceptance-newest.cfg b/.kokoro/nightly/acceptance-newest.cfg index 3d280110fcb7..9479c92babaa 100644 --- a/.kokoro/nightly/acceptance-newest.cfg +++ b/.kokoro/nightly/acceptance-newest.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/nightly/acceptance-oldest.cfg b/.kokoro/nightly/acceptance-oldest.cfg index bda8e9283f1d..fce86c62c55d 100644 --- a/.kokoro/nightly/acceptance-oldest.cfg +++ b/.kokoro/nightly/acceptance-oldest.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/.kokoro/presubmit/acceptance.cfg b/.kokoro/presubmit/acceptance.cfg index 9edd7e6a5267..f972e66d1a93 100644 --- a/.kokoro/presubmit/acceptance.cfg +++ b/.kokoro/presubmit/acceptance.cfg @@ -29,7 +29,13 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "client-library-test-universe-domain, client-library-test-universe-project-id, client-library-test-universe-storage-location, client-library-test-universe-domain-credential,ruby-main-ci-service-account,ruby-firestore-ci-service-account" + value: + "client-library-test-universe-domain," + "client-library-test-universe-domain-credential," + "client-library-test-universe-project-id," + "client-library-test-universe-storage-location," + "ruby-firestore-ci-service-account," + "ruby-main-ci-service-account" } env_vars: { diff --git a/google-cloud-storage/acceptance/storage/universe_domain_test.rb b/google-cloud-storage/acceptance/storage/universe_domain_test.rb index fc7b93a5bd66..2455ebd7d105 100644 --- a/google-cloud-storage/acceptance/storage/universe_domain_test.rb +++ b/google-cloud-storage/acceptance/storage/universe_domain_test.rb @@ -16,11 +16,16 @@ describe Google::Cloud::Storage, :universe_domain do if ENV["KOKORO_GFILE_DIR"] - # Fetch secret values from the secret_manager path - TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) - TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) - TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) - TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) + begin + # Fetch secret values from the secret_manager path + TEST_UNIVERSE_PROJECT_ID = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-project-id"))) + TEST_UNIVERSE_LOCATION = File.read(File.realpath(File.join(ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-storage-location"))) + TEST_UNIVERSE_DOMAIN = File.read(File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain"))) + TEST_UNIVERSE_DOMAIN_CREDENTIAL = File.realpath(File.join( ENV["KOKORO_GFILE_DIR"], "secret_manager", "client-library-test-universe-domain-credential")) + rescue StandardError => e + puts "Unable to load universe domain secrets: #{e.message}" + next + end let :ud_storage do Google::Cloud::Storage.new(