From 92fe7cf0f5d3919be5e620c791d8d0b1205f8cca Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Fri, 19 Jun 2026 01:59:02 +0800 Subject: [PATCH] Soften plugin signal verification --- ...verify_cloud_run_strategy_plugin_mounts.py | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/scripts/verify_cloud_run_strategy_plugin_mounts.py b/scripts/verify_cloud_run_strategy_plugin_mounts.py index 599be42..8d02ace 100644 --- a/scripts/verify_cloud_run_strategy_plugin_mounts.py +++ b/scripts/verify_cloud_run_strategy_plugin_mounts.py @@ -160,18 +160,36 @@ def _check_signal_path( f"{service}:{env_name} signal_path is outside allowed prefixes: {signal_path}" ) - signal_raw = _run(["gcloud", "storage", "cat", signal_path]) + try: + signal_raw = _run(["gcloud", "storage", "cat", signal_path]) + except RuntimeError as exc: + print( + f"Warning: {service}:{env_name} signal_path is not readable yet; " + f"strategy runtime will ignore the plugin until a valid signal exists: " + f"{signal_path} ({exc})" + ) + return try: signal = json.loads(signal_raw) except json.JSONDecodeError as exc: - raise ValueError(f"{service}:{env_name} signal_path does not contain valid JSON: {signal_path}") from exc + print( + f"Warning: {service}:{env_name} signal_path does not contain valid JSON; " + f"strategy runtime will ignore the plugin until it is fixed: {signal_path} ({exc})" + ) + return if not isinstance(signal, dict): - raise ValueError(f"{service}:{env_name} signal_path must contain a JSON object: {signal_path}") + print( + f"Warning: {service}:{env_name} signal_path must contain a JSON object; " + f"strategy runtime will ignore the plugin until it is fixed: {signal_path}" + ) + return if expected_schema and str(signal.get("schema_version") or "").strip() != expected_schema: - raise ValueError( - f"{service}:{env_name} expected schema {expected_schema}, " - f"got {signal.get('schema_version')!r} at {signal_path}" + print( + f"Warning: {service}:{env_name} expected schema {expected_schema}, " + f"got {signal.get('schema_version')!r} at {signal_path}; " + "strategy runtime will ignore the plugin until it is fixed." ) + return def _verify_target(