You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(validate-inputs): downgrade validation failures to warnings (#300)
Emit ::warning annotations, log to stderr, and append to step summary
without failing the step. Replace error exits with warnings across all
validation branches.
We can move this to errors in future releases, but don't want to break
downstream users once we cut a release.
@@ -37,39 +36,39 @@ if [[ "${google_api_key_present}" == "true" ]]; then ((auth_methods++)); fi
37
36
if [[ "${gcp_workload_identity_provider_present}"=="true" ]];then((auth_methods++));fi
38
37
39
38
if [[ ${auth_methods}-eq 0 ]];then
40
-
error"No authentication method provided. Please provide one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
39
+
warn"No authentication method provided. Please provide one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
41
40
fi
42
41
43
42
if [[ ${auth_methods}-gt 1 ]];then
44
-
error"Multiple authentication methods provided. Please use only one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
43
+
warn"Multiple authentication methods provided. Please use only one of 'gemini_api_key', 'google_api_key', or 'gcp_workload_identity_provider'."
45
44
fi
46
45
47
46
# WIF validation
48
47
if [[ "${gcp_workload_identity_provider_present}"=="true" ]];then
49
48
if [[ "${gcp_project_id_present}"!="true"||"${gcp_service_account_present}"!="true" ]];then
50
-
error"When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id' and 'gcp_service_account'."
49
+
warn"When using Workload Identity Federation ('gcp_workload_identity_provider'), you must also provide 'gcp_project_id' and 'gcp_service_account'."
51
50
fi
52
51
if [[ "${use_vertex_ai}"!="true"&&"${use_gemini_code_assist}"!="true" ]];then
53
-
error"When using Workload Identity Federation, you must set either 'use_vertex_ai' or 'use_gemini_code_assist' to 'true'. Both are set to 'false', please choose one."
52
+
warn"When using Workload Identity Federation, you must set either 'use_vertex_ai' or 'use_gemini_code_assist' to 'true'. Both are set to 'false', please choose one."
54
53
fi
55
54
if [[ "${use_vertex_ai}"=="true"&&"${use_gemini_code_assist}"=="true" ]];then
56
-
error"When using Workload Identity Federation, 'use_vertex_ai' and 'use_gemini_code_assist' cannot both be 'true'. Both are set to 'true', please choose one."
55
+
warn"When using Workload Identity Federation, 'use_vertex_ai' and 'use_gemini_code_assist' cannot both be 'true'. Both are set to 'true', please choose one."
57
56
fi
58
57
fi
59
58
60
59
# Vertex AI API Key validation
61
60
if [[ "${google_api_key_present}"=="true" ]];then
62
61
if [[ "${use_vertex_ai}"!="true" ]];then
63
-
error"When using 'google_api_key', you must set 'use_vertex_ai' to 'true'."
62
+
warn"When using 'google_api_key', you must set 'use_vertex_ai' to 'true'."
64
63
fi
65
64
if [[ "${use_gemini_code_assist}"=="true" ]];then
66
-
error"When using 'google_api_key', 'use_gemini_code_assist' cannot be 'true'."
65
+
warn"When using 'google_api_key', 'use_gemini_code_assist' cannot be 'true'."
67
66
fi
68
67
fi
69
68
70
69
# Gemini API Key validation
71
70
if [[ "${gemini_api_key_present}"=="true" ]];then
72
71
if [[ "${use_vertex_ai}"=="true"||"${use_gemini_code_assist}"=="true" ]];then
73
-
error"When using 'gemini_api_key', both 'use_vertex_ai' and 'use_gemini_code_assist' must be 'false'."
72
+
warn"When using 'gemini_api_key', both 'use_vertex_ai' and 'use_gemini_code_assist' must be 'false'."
0 commit comments