From dba53c9168008ee00902b0d09c855f05cd947e37 Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Thu, 6 Aug 2026 22:32:22 +0000 Subject: [PATCH 1/7] chore: respect api_list_config exclusions in generate-updates --- .toys/generate-updates.rb | 23 +++++++++++++++++++++-- api_list_config.yaml | 5 ++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.toys/generate-updates.rb b/.toys/generate-updates.rb index 5c97e8cf76c..0954077b0a2 100644 --- a/.toys/generate-updates.rb +++ b/.toys/generate-updates.rb @@ -13,6 +13,7 @@ # limitations under the License. require "uri" +require "psych" desc "Run standard Google client generation." @@ -75,17 +76,35 @@ def run end def list_apis_versions - return requested.map { |request| request.split(":") } unless all + return requested.map { |request| request.split(":") }.reject do |(name, version)| + excluded_api?(name, version) + end unless all + path = git_cache.find("https://github.com/googleapis/discovery-artifact-manager.git", path: "discoveries/index.json", update: true) apis_versions = [] - JSON.parse(File.read path)["items"].each do |item| + JSON.parse(File.read(path))["items"].each do |item| + next if excluded_api?(item['name'], item['version']) next unless item["preferred"] || gem_exists?(item) apis_versions << [item["name"], item["version"]] end apis_versions.shuffle end +def excluded_api? name, version + excluded_apis.include?("#{name}.#{version}") || excluded_apis.include?("#{name}:#{version}") +end + +def excluded_apis + @excluded_apis ||= begin + config_path = "#{context_directory}/api_list_config.yaml" + return [] unless File.file?(config_path) + Psych.load_file(config_path)["exclude"] || [] + rescue StandardError + [] + end +end + def gem_exists? item name = item["name"] version = item["version"] diff --git a/api_list_config.yaml b/api_list_config.yaml index de4986c0614..09d985b46d0 100644 --- a/api_list_config.yaml +++ b/api_list_config.yaml @@ -5,5 +5,8 @@ include: - name: youtubePartner version: v1 discovery_rest_url: https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest -exclude: [] +exclude: + - discoveryengine.v1 + - discoveryengine.v1alpha + - discoveryengine.v1beta pause: [] From 626556bb1dea933cfcda7146053d7448637f11af Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:21:41 +0000 Subject: [PATCH 2/7] chore: log parsing errors when reading api_list_config exclusions --- .toys/generate-updates.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.toys/generate-updates.rb b/.toys/generate-updates.rb index 0954077b0a2..3ad3473aec8 100644 --- a/.toys/generate-updates.rb +++ b/.toys/generate-updates.rb @@ -100,7 +100,8 @@ def excluded_apis config_path = "#{context_directory}/api_list_config.yaml" return [] unless File.file?(config_path) Psych.load_file(config_path)["exclude"] || [] - rescue StandardError + rescue StandardError => e + logger.error("Failed to load exclusion list from #{config_path}: #{e.message}") [] end end From f78ec85ce995f240c41629102fd71a8fa8d93c69 Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 17:23:04 +0000 Subject: [PATCH 3/7] chore: explicitly log loaded exclusions --- .toys/generate-updates.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.toys/generate-updates.rb b/.toys/generate-updates.rb index 3ad3473aec8..be3ca3b839f 100644 --- a/.toys/generate-updates.rb +++ b/.toys/generate-updates.rb @@ -99,7 +99,9 @@ def excluded_apis @excluded_apis ||= begin config_path = "#{context_directory}/api_list_config.yaml" return [] unless File.file?(config_path) - Psych.load_file(config_path)["exclude"] || [] + list = Psych.load_file(config_path)["exclude"] || [] + logger.info("Loaded exclusion list: #{list.join(', ')}") + list rescue StandardError => e logger.error("Failed to load exclusion list from #{config_path}: #{e.message}") [] From 3ddcd0b85d1cbb1f2349e7e33ccfd065306bfeeb Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 17:29:29 +0000 Subject: [PATCH 4/7] chore: swap logger for explicit puts to enforce terminal visibility --- .toys/generate-updates.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.toys/generate-updates.rb b/.toys/generate-updates.rb index be3ca3b839f..a92e06438af 100644 --- a/.toys/generate-updates.rb +++ b/.toys/generate-updates.rb @@ -100,10 +100,10 @@ def excluded_apis config_path = "#{context_directory}/api_list_config.yaml" return [] unless File.file?(config_path) list = Psych.load_file(config_path)["exclude"] || [] - logger.info("Loaded exclusion list: #{list.join(', ')}") + puts "Loaded exclusion list: #{list.join(', ')}" if list.any? list rescue StandardError => e - logger.error("Failed to load exclusion list from #{config_path}: #{e.message}") + puts "Failed to load exclusion list from #{config_path}: #{e.message}" [] end end From bdeaeb5fb137c42510549c27716f210765648787 Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 18:26:55 +0000 Subject: [PATCH 5/7] chore: add tracking ticket reference directly to exclude block --- api_list_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/api_list_config.yaml b/api_list_config.yaml index 09d985b46d0..531141291eb 100644 --- a/api_list_config.yaml +++ b/api_list_config.yaml @@ -5,6 +5,7 @@ include: - name: youtubePartner version: v1 discovery_rest_url: https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest +# 📝 Exclusions logged and tracked by b/542740217 exclude: - discoveryengine.v1 - discoveryengine.v1alpha From 099c496175bc3fe5a6928b23cc91d392074c9587 Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:08:50 +0000 Subject: [PATCH 6/7] chore: re-enable discoveryengine.v1beta generation --- api_list_config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/api_list_config.yaml b/api_list_config.yaml index 531141291eb..9fe34112944 100644 --- a/api_list_config.yaml +++ b/api_list_config.yaml @@ -9,5 +9,4 @@ include: exclude: - discoveryengine.v1 - discoveryengine.v1alpha - - discoveryengine.v1beta pause: [] From cc201e2a61de48541a5d866cdedafcff347133ef Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:13:52 +0000 Subject: [PATCH 7/7] chore: relocate tracking comment to precisely target anomalous v1 endpoints --- api_list_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_list_config.yaml b/api_list_config.yaml index 9fe34112944..3c9f781610d 100644 --- a/api_list_config.yaml +++ b/api_list_config.yaml @@ -5,8 +5,8 @@ include: - name: youtubePartner version: v1 discovery_rest_url: https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest -# 📝 Exclusions logged and tracked by b/542740217 exclude: + # 📝 Exclusions logged and tracked by b/542740217 - discoveryengine.v1 - discoveryengine.v1alpha pause: []