Skip to content

dev-inf: add EngFlow artifact support to investigate workflow#164587

Draft
rafiss wants to merge 1 commit intocockroachdb:masterfrom
rafiss:investigate-workflow-engflow
Draft

dev-inf: add EngFlow artifact support to investigate workflow#164587
rafiss wants to merge 1 commit intocockroachdb:masterfrom
rafiss:investigate-workflow-engflow

Conversation

@rafiss
Copy link
Collaborator

@rafiss rafiss commented Feb 28, 2026

The investigate workflow could only download artifacts from TeamCity. When it encountered an EngFlow-based failure, it had to skip artifact analysis entirely. This commit adds EngFlow support:

  • engflow_artifacts.py: replace get_token() with get_curl_auth_args() that supports mTLS certificates (via ENGFLOW_CERT_FILE/ENGFLOW_KEY_FILE env vars), JWT from env (ENGFLOW_TOKEN), and the existing engflow_auth CLI fallback. All callers updated to thread auth_args through.

  • investigate.yml: add a step to retrieve EngFlow mTLS certs from Google Cloud Secret Manager after OIDC auth, with graceful fallback if access is denied. Add python3:* to allowedTools. Add a cleanup step to remove temp cert files.

  • investigate.md: replace the "EngFlow not supported" fallback text with full instructions for discovering failed targets, listing artifacts, and downloading test.log/outputs.zip via the script.

The mTLS path requires the ai-review service account to have secretmanager.versions.access on the engflow-mesolite-key/crt secrets, which is an IAM change outside this PR. The workflow fails gracefully if that access is not yet granted.

fixes #163955
Epic: CRDB-60540
Release note: None

The investigate workflow could only download artifacts from TeamCity.
When it encountered an EngFlow-based failure, it had to skip artifact
analysis entirely. This commit adds EngFlow support:

- engflow_artifacts.py: replace get_token() with get_curl_auth_args()
  that supports mTLS certificates (via ENGFLOW_CERT_FILE/ENGFLOW_KEY_FILE
  env vars), JWT from env (ENGFLOW_TOKEN), and the existing engflow_auth
  CLI fallback. All callers updated to thread auth_args through.

- investigate.yml: add a step to retrieve EngFlow mTLS certs from
  Google Cloud Secret Manager after OIDC auth, with graceful fallback
  if access is denied. Add python3:* to allowedTools. Add a cleanup
  step to remove temp cert files.

- investigate.md: replace the "EngFlow not supported" fallback text
  with full instructions for discovering failed targets, listing
  artifacts, and downloading test.log/outputs.zip via the script.

The mTLS path requires the ai-review service account to have
secretmanager.versions.access on the engflow-mesolite-key/crt secrets,
which is an IAM change outside this PR. The workflow fails gracefully
if that access is not yet granted.

Epic: CRDB-60540
Release note: None
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@trunk-io
Copy link
Contributor

trunk-io bot commented Feb 28, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql, test: automate test failure analysis (EngFlow test failures)

2 participants