Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@
- name: 'release-please:force-run'
color: bdca82
description: Manually trigger the release please workflow on a PR.

- name: 'ci:run-evals'
color: 4285f4
description: Manually trigger the evaluation CI pipeline on a PR.
32 changes: 19 additions & 13 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

options:
logging: CLOUD_LOGGING_ONLY
pool:
name: 'projects/ext-test-alloydb/locations/us-central1/workerPools/alloydb-evals-pool'
Comment thread
omkargaikwad23 marked this conversation as resolved.
Outdated

steps:

Expand All @@ -27,12 +29,7 @@ steps:
- |
set -e

# Only run on release branches
if [[ "$_HEAD_BRANCH" != release-please-* ]]; then
echo "Not a release-please branch. Exiting."
exit 0
fi
echo "Release branch detected. Fetching PR data from GitHub API..."
echo "Fetching PR data from GitHub API..."

# Fetch PR data and status code
HTTP_STATUS=$(curl -s -o pr_data.json -w "%{http_code}" -H "Authorization: token $$GITHUB_TOKEN" \
Expand All @@ -46,29 +43,38 @@ steps:

PR_DATA=$(cat pr_data.json)

# Extract labels and title from PR data (Use $$ to escape bash variables)
PR_LABELS=$(echo "$$PR_DATA" | jq -r '[.labels[].name] | join(",")')
# Extract title from PR data (Use $$ to escape bash variables)
PR_TITLE=$(echo "$$PR_DATA" | jq -r '.title')

# Determine Release Version (Use double quotes and $$ for bash variables)
if [[ "$$PR_LABELS" == *"autorelease: pending"* ]]; then
# Check if execution labels are present using exact matching via jq
if ! jq -e '.labels | any(.name == "autorelease: pending" or .name == "ci:run-evals")' pr_data.json > /dev/null; then
echo "PR does not have 'autorelease: pending' or 'ci:run-evals' label. Skipping execution."
exit 0
fi
echo "Execution label detected. Processing release version context..."

# Determine Release Version based on branch name
if [[ "$_HEAD_BRANCH" == release-please-* ]]; then
if [[ "$$PR_TITLE" =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
export RELEASE_VERSION="$${BASH_REMATCH[1]}"
else
export RELEASE_VERSION="unknown"
export RELEASE_VERSION="pr-$_PR_NUMBER-release-unknown"
fi
else
export RELEASE_VERSION="unknown"
export RELEASE_VERSION="pr-$_PR_NUMBER-ci-run-evals"
fi

# Workaround for evalbench bug: settings are only applied if path basename matches extension ID
ln -s /workspace /workspace/alloydb
cd /evalbench

# Evalbench environment variables
export EVAL_GCP_PROJECT_ID=$PROJECT_ID
export EVAL_GCP_PROJECT_REGION=$_ALLOYDB_REGION
export EVAL_REPORTING_PROJECT=$_EVAL_REPORTING_PROJECT

export GOOGLE_CLOUD_PROJECT=$PROJECT_ID

# AlloyDB PostgreSQL specific environment variables
export ALLOYDB_POSTGRES_PROJECT=$PROJECT_ID
export ALLOYDB_POSTGRES_REGION=$_ALLOYDB_REGION
export ALLOYDB_POSTGRES_CLUSTER=$_ALLOYDB_CLUSTER
Expand Down
2 changes: 1 addition & 1 deletion evals/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"scenarios": [
{
"id": "alloydb-debug-instance",
"starting_prompt": "Check my AlloyDB databases in project ${EVAL_GCP_PROJECT_ID}.",
"starting_prompt": "Check my AlloyDB clusters and instances in project ${EVAL_GCP_PROJECT_ID} to verify their availability.",
"conversation_plan": "Ask the agent to list all AlloyDB instances in the project. Once all instances are listed, if ${ALLOYDB_POSTGRES_INSTANCE} exists, get its details and validate it is RUNNABLE.",
"expected_trajectory": [
"list_instances",
Expand Down
3 changes: 3 additions & 0 deletions evals/model_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ generator: gemini_cli
env:
GOOGLE_CLOUD_PROJECT: "${GOOGLE_CLOUD_PROJECT}"
GOOGLE_CLOUD_LOCATION: "global"
GOOGLE_CLOUD_REGION: "${EVAL_GCP_PROJECT_REGION}"
CLOUDSDK_COMPUTE_REGION: "${EVAL_GCP_PROJECT_REGION}"
GOOGLE_GENAI_USE_VERTEXAI: "true"
GEMINI_CLI_TRUST_WORKSPACE: "true"

setup:
extensions:
"/workspace/alloydb":
Expand Down
4 changes: 4 additions & 0 deletions evals/run_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ scorers:
model_config: /workspace/evals/gemini_2.5_pro_model.yaml
behavioral_metrics:
model_config: /workspace/evals/gemini_2.5_pro_model.yaml
skills_best_practices:
model_config: /workspace/evals/gemini_2.5_pro_model.yaml
skills_dir: /workspace/alloydb/skills

# Performance
turn_count: {}
end_to_end_latency: {}
tool_call_latency: {}
token_consumption: {}
skills_trajectory: {}

reporting:
bigquery:
Expand Down
Loading