Add shared GCP Vertex AI env template#6
Conversation
Copied from fullsend-ai/fullsend scaffold (internal/scaffold/fullsend-repo/env/gcp-vertex.env). Shared by all agents using Vertex AI inference. Actual values are injected via environment variables at runtime. Signed-off-by: Claude <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
PR Summary by QodoAdd shared GCP Vertex AI env template
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used 1. Empty env exports
|
| export ANTHROPIC_VERTEX_PROJECT_ID=${ANTHROPIC_VERTEX_PROJECT_ID} | ||
| export CLOUD_ML_REGION=${CLOUD_ML_REGION} | ||
| export GOOGLE_APPLICATION_CREDENTIALS=/tmp/.gcp-credentials.json | ||
| export GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT} |
There was a problem hiding this comment.
1. Empty env exports 🐞 Bug ☼ Reliability
env/gcp-vertex.env self-assigns and exports ANTHROPIC_VERTEX_PROJECT_ID, CLOUD_ML_REGION, and GOOGLE_CLOUD_PROJECT, which will set these variables to empty strings when they are unset in the sourcing environment. This can silently override expected configuration for Vertex usage (the file is uploaded for triage runs), leading to misconfigured runtime env without an explicit failure.
Agent Prompt
### Issue description
`env/gcp-vertex.env` currently contains self-referential exports like `export FOO=${FOO}`. If `FOO` is not set at source-time, this will export `FOO` as an empty string, silently masking missing configuration.
### Issue Context
This env file is shipped into the triage sandbox via `host_files`, so its contents are expected to influence runtime behavior.
### Fix Focus Areas
- env/gcp-vertex.env[1-5]
- harness/triage.yaml[10-21]
### Suggested fix
Update the env template to fail fast or only export when set. For example:
- Fail-fast (recommended for required vars):
- `: "${ANTHROPIC_VERTEX_PROJECT_ID:?ANTHROPIC_VERTEX_PROJECT_ID must be set}"`
- `: "${CLOUD_ML_REGION:?CLOUD_ML_REGION must be set}"`
- `: "${GOOGLE_CLOUD_PROJECT:?GOOGLE_CLOUD_PROJECT must be set}"`
- then `export` them normally.
Or, if these are optional, export only when non-empty:
- `if [ -n "${ANTHROPIC_VERTEX_PROJECT_ID:-}" ]; then export ANTHROPIC_VERTEX_PROJECT_ID; fi`
(and similarly for the others).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
🤖 Finished Review · ✅ Success · Started 12:42 PM UTC · Completed 12:45 PM UTC |
|
Review skipped — this PR is already merged. The Posted by fullsend pre-review check |
|
Review skipped — this PR is already merged. The Posted by fullsend post-review check |
|
🤖 Finished Retro · ✅ Success · Started 12:46 PM UTC · Completed 12:53 PM UTC |
Retro: PR #6 — Add shared GCP Vertex AI env templateTimeline:
Assessment: This was a straightforward human PR with no agent involvement (no triage, no code agent). The review agent ran to completion but couldn't post its review because the PR was already merged. The retro agent was then dispatched on a PR that had no agent workflow to analyze. Both agent runs represent wasted compute. No new proposals. All improvement opportunities identified are already covered by existing open issues:
Implementing #1439 or #2388 plus #2708 would have the highest impact — preventing both the review and retro dispatches entirely, saving ~10 minutes of agent compute on a PR that needed neither. |
Summary
env/gcp-vertex.env— shared Vertex AI configuration template used by all agents withinference: provider: vertexfullsend-ai/fullsendscaffold (internal/scaffold/fullsend-repo/env/gcp-vertex.envatupstream/main)host_fileswith relative paths are resolved against the source repo — this file must exist hereContext
The triage agent's
host_filesreferenceenv/gcp-vertex.env. With config-driven registration,resolveBaseHostFilesfetches it from this repo, but it didn't exist here — only in the fullsend scaffold. See fullsend-ai/fullsend#2845.Test plan
/fs-triageonggallen-sandbox/integration-service#1after merging🤖 Generated with Claude Code