-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add release 0.0.0 version substitution to run configuration and updat… #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
591aa7d
34ed619
0bb72ac
ee863cb
1464f73
c47e893
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,17 +21,44 @@ steps: | |
| - name: 'us-central1-docker.pkg.dev/cloud-db-nl2sql/evalbench/eval_server:latest' | ||
| entrypoint: 'bash' | ||
| # Decrypts the secret from Secret Manager into the DB_PASSWORD environment variable | ||
| secretEnv: ['DB_PASSWORD'] | ||
| secretEnv: ['DB_PASSWORD', 'GITHUB_TOKEN'] | ||
| args: | ||
| - '-c' | ||
| - | | ||
| 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..." | ||
|
|
||
| # Fetch PR data using curl approach | ||
| PR_DATA=$(curl -s -H "Authorization: token $$GITHUB_TOKEN" \ | ||
| "https://api.github.com/repos/$REPO_FULL_NAME/pulls/$_PR_NUMBER") | ||
|
|
||
| # Extract labels and title from PR data (Use $$ to escape bash variables) | ||
| PR_LABELS=$(echo "$$PR_DATA" | jq -r '.labels[].name' | paste -sd ',') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavior might differ on some linux machines for: paste -sd ',' |
||
| PR_TITLE=$(echo "$$PR_DATA" | jq -r '.title') | ||
|
|
||
| # Determine Release Version (Use double quotes and $$ for bash variables) | ||
| if [[ "$$PR_LABELS" == *"autorelease: triggered"* ]]; then | ||
| if [[ "$$PR_TITLE" =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then | ||
| export RELEASE_VERSION="$${BASH_REMATCH[1]}" | ||
| else | ||
| export RELEASE_VERSION="unknown" | ||
| fi | ||
| else | ||
| export RELEASE_VERSION="unknown" | ||
| fi | ||
|
|
||
| # Workaround for evalbench bug: settings are only applied if path basename matches extension ID | ||
| ln -s /workspace /workspace/cloud-sql-postgresql | ||
| cd /evalbench | ||
|
|
||
| export EVAL_GCP_PROJECT_ID=$PROJECT_ID | ||
| export EVAL_GCP_PROJECT_REGION=us-central1 | ||
| export EVAL_GCP_PROJECT_REGION=$_CLOUD_SQL_REGION | ||
| export GOOGLE_CLOUD_PROJECT=$PROJECT_ID | ||
| export CLOUD_SQL_POSTGRES_PROJECT=$PROJECT_ID | ||
| export CLOUD_SQL_POSTGRES_INSTANCE=$_CLOUD_SQL_INSTANCE | ||
|
|
@@ -58,3 +85,5 @@ availableSecrets: | |
| secretManager: | ||
| - versionName: projects/$PROJECT_ID/secrets/daily-ci-evals-db-password/versions/latest | ||
| env: 'DB_PASSWORD' | ||
| - versionName: projects/$PROJECT_ID/secrets/GITHUB_TOKEN/versions/latest | ||
| env: 'GITHUB_TOKEN' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit add a new line |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,13 +13,13 @@ | |
| # limitations under the License. | ||
|
|
||
| extension_id: cloud-sql-postgresql | ||
| release_version: ${RELEASE_VERSION} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should use separate yaml file this can be confusing we want to have standard config files across evalbench |
||
|
|
||
| dataset_config: /workspace/evals/dataset.json | ||
| dataset_format: gemini-cli-format | ||
|
|
||
| orchestrator: geminicli | ||
| model_config: /workspace/evals/model_config.yaml | ||
| # You can reference default simulated user models provided by the evalbench repo: | ||
| simulated_user_model_config: /workspace/evals/gemini_2.5_pro_model.yaml | ||
|
|
||
| scorers: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the curl call fails (e.g., bad token, rate limit), PR_DATA will be empty and RELEASE_VERSION silently becomes "unknown". Consider adding a check on the HTTP status.