Skip to content

Commit

Permalink
Fix setting of env vars in gcloud deploy (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii authored Feb 13, 2024
1 parent e876089 commit 33a2194
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions prediction_market_agent_tooling/deploy/gcp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def gcloud_deploy_cmd(
api_keys: dict[str, str],
memory: int, # in MB
) -> str:
api_keys_str = " ".join([f"{k}={v}" for k, v in api_keys.items()])
cmd = (
f"gcloud functions deploy {gcp_function_name} "
f"--runtime {get_gcloud_python_runtime_str()} "
Expand All @@ -25,8 +24,8 @@ def gcloud_deploy_cmd(
f"--memory {memory}MB "
f"--no-allow-unauthenticated "
)
if api_keys:
cmd += f"--set-env-vars {api_keys_str} "
for k, v in api_keys.items():
cmd += f"--set-env-vars {k}={v} "

return cmd

Expand Down

0 comments on commit 33a2194

Please sign in to comment.