Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .agents/rules/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Ignore = ["databricks.yml"] # parsed as EnvMatrix.Ignore, not top-level Ignore
- `musterr CMD...`: run CMD and fail the whole test if it *succeeds*; on the expected failure the script continues. Use to assert a command must error.
- `withdir DIR CMD...`: run CMD with the working directory set to DIR, restoring it afterwards.
- `git-repo-init`: initialize a deterministic git repo (fixed user/email, no hooks) and commit `databricks.yml`.
- `uuid`, `sethome DIR`, `venv_activate`, `as-test-sp CMD...`, `readplanarg FILE`, `envsubst`: see `acceptance/script.prepare` for the full list and exact semantics.
- `uuid`, `sethome DIR`, `venv_activate`, `as-test-sp CMD...`, `readplanarg FILE`, `envsubst`, `unset_ci_env`: see `acceptance/script.prepare` for the full list and exact semantics.

**RULE: Wrap commands whose invocation should be visible in `output.txt` with `trace`.** The `>>> ...` line ties each block of output to the command that produced it; without it the output is an unlabeled wall of text.

Expand Down
3 changes: 2 additions & 1 deletion acceptance/air/image-push/script
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ title "in a Claude Code session the auth docker configure child adds no install
# As in a Claude Code tool call, with no session id, so the session throttle
# can't be what keeps the child quiet. The CI variables would drop the native
# line in CI only.
unset CI GITHUB_ACTIONS GITLAB_CI JENKINS_URL TF_BUILD CIRCLECI TRAVIS BITBUCKET_BUILD_NUMBER PROJECT_ID CODEBUILD_BUILD_ARN TFC_RUN_ID CLAUDE_CODE_SESSION_ID
unset_ci_env
unset CLAUDE_CODE_SESSION_ID
# A host CLAUDE_CONFIG_DIR would move the plugin lookup away from the isolated HOME.
unset CLAUDE_CONFIG_DIR
export CLAUDECODE=1 CLAUDE_CODE_CHILD_SESSION=1
Expand Down
3 changes: 1 addition & 2 deletions acceptance/cmd/aitools/claude-config-dir/script
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ export CLAUDECODE=1
# enables the native <claude-code-hint> line; CI suppresses it.
export CLAUDE_CODE_CHILD_SESSION=1
unset CLAUDE_CODE_SESSION_ID
# CI and the CI/CD provider markers the SDK detects (GitHub Actions sets both).
unset CI GITHUB_ACTIONS GITLAB_CI JENKINS_URL TF_BUILD CIRCLECI TRAVIS BITBUCKET_BUILD_NUMBER PROJECT_ID CODEBUILD_BUILD_ARN TFC_RUN_ID
unset_ci_env

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this duplicates the comment on unset_ci_env in acceptance/script.prepare. I'd drop it here and in acceptance/cmd/aitools/telemetry/hint/script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 13578d5: I dropped the comment from both aitools scripts. I left air/image-push alone because its comment explains why the CI vars matter in that test specifically.


# Hint-exempt commands (aitools, auth, one-shot lookups such as version and current-user me,
# completion) skip the install hint; clusters list exercises it against the fake server.
Expand Down
3 changes: 1 addition & 2 deletions acceptance/cmd/aitools/telemetry/hint/script
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ sethome home
export CLAUDECODE=1
# As inside Claude Code: enables the native <claude-code-hint> line (not in CI).
export CLAUDE_CODE_CHILD_SESSION=1
# CI and the CI/CD provider markers the SDK detects (GitHub Actions sets both).
unset CI GITHUB_ACTIONS GITLAB_CI JENKINS_URL TF_BUILD CIRCLECI TRAVIS BITBUCKET_BUILD_NUMBER PROJECT_ID CODEBUILD_BUILD_ARN TFC_RUN_ID
unset_ci_env
unset CLAUDE_CODE_SESSION_ID
# A host CLAUDE_CONFIG_DIR would move the plugin file away from the isolated HOME.
unset CLAUDE_CONFIG_DIR
Expand Down
9 changes: 9 additions & 0 deletions acceptance/script.prepare
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,12 @@ readplanarg() {
printf ""
fi
}

# unset_ci_env clears CI and the CI/CD provider markers, so a test behaves the
# same in CI as on a laptop. The provider list mirrors listCiCdProviders in the
# Go SDK's useragent/cicd.go (read by useragent.CiCdProvider()); keep it in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The sync note names useragent/cicd.go but doesn't link it. .agents/rules/comments.md asks for a source URL when code detects environment variables, and the sibling aitools code does that (libs/aitools/agents/hint.go:26 links useragent/agent.go). Without a link, whoever syncs the list on the next SDK bump has to find the repo and file themselves. Add # https://github.com/databricks/databricks-sdk-go/blob/main/useragent/cicd.go to the comment.

# sync when the SDK adds a provider. PROJECT_ID alone defeats the Google Cloud
# Build check, which requires all of its variables.
unset_ci_env() {
unset CI GITHUB_ACTIONS GITLAB_CI JENKINS_URL TF_BUILD CIRCLECI TRAVIS BITBUCKET_BUILD_NUMBER PROJECT_ID CODEBUILD_BUILD_ARN TFC_RUN_ID
}
Loading