Skip to content

Name cloud integration resources after their PR (or 'nightly')#146

Open
sdairs wants to merge 1 commit into
mainfrom
issue-138-name-resources-after-pr
Open

Name cloud integration resources after their PR (or 'nightly')#146
sdairs wants to merge 1 commit into
mainfrom
issue-138-name-resources-after-pr

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 12, 2026

Summary

  • Workflow exports CLICKHOUSE_CLOUD_TEST_RUN_LABEL per event: pr-NNN on pull_request, nightly on schedule, manual-<run_id> on workflow_dispatch.
  • TestContext::from_env reads the new var and folds it into run_id, so existing service names (clickhousectl-it-<run_id>, clickhousectl-it-pg-<run_id>) and the run_id tag value automatically become PR/nightly-prefixed.
  • SHA suffix is preserved (multiple pushes to a PR still get distinct names); local-run behaviour is unchanged.

Closes #138.

Test plan

  • cargo build -p clickhouse-cloud-api --tests
  • cargo test -p clickhouse-cloud-api (all 86 unit tests + 5 spec coverage tests pass)
  • Cloud integration workflow run on this PR produces clickhousectl-it-pr-<NNN>-<sha7> resources and a run_id=pr-<NNN>-<sha7> tag (verify in Cloud console once the workflow finishes)
  • Next nightly run produces nightly-<sha7>

🤖 Generated with Claude Code

Workflow now exports CLICKHOUSE_CLOUD_TEST_RUN_LABEL per event
(pr-NNN / nightly / manual-RUNID). TestContext::from_env folds the
label into run_id so existing service names and tags pick it up,
making leaked resources attributable to their source PR or run.

Closes #138

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Name cloud integration test resources after their PR (or 'nightly')

1 participant