本文へ移動
cccskills
無料GitHub で公開

infra-test

Force-push the current branch to infra-test to trigger a GCP deploy, wait for it to complete, then run each associated DAG pipeline one at a time and wait for each to finish. On full success, updates the PR description with a checklist confirming real GCP infra-test results. Use when the user wants to verify backend changes on the test environment before merging, or run /infra-test.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-trackerスター 23(GitHub 23 + cccskills 0)
連携ツールGitHubGoogle Cloud

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

/infra-test

Deploy the current branch to the GCP infra-test environment, run all associated DAG pipelines, and update the PR with verified results.

The user may pass a PR number as an argument (e.g. /infra-test 4854). If none is given, detect the open PR from the current branch.


Step 1 — Identify PR and current branch

gh pr view [<number>] --json number,title,body,headRefName,baseRefName
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
GH_USER=$(gh api user -q .login)
FORK_REMOTE=$(git remote -v | grep -i "github.com[/:]${GH_USER}/" | head -1 | awk '{print $1}')

Confirm the PR base is main. If the PR is already merged or closed, print an error and stop.


Step 2 — Force-push to infra-test

git push origin HEAD:infra-test -f

This triggers the testBackendChangesInfraTest.yml workflow. Capture the run ID by matching the pushed commit's SHA, so a leftover run from a prior push is never picked up by mistake:

HEAD_SHA=$(git rev-parse HEAD)
for i in $(seq 1 12); do
  RUN_ID=$(gh run list --repo $REPO --workflow=testBackendChangesInfraTest.yml --limit 10 \
    --json databaseId,headSha --jq ".[] | select(.headSha==\"$HEAD_SHA\") | .databaseId" | head -1)
  [ -n "$RUN_ID" ] && break
  sleep 5
done
echo "Infra-test deploy run: https://github.com/$REPO/actions/runs/$RUN_ID"

Step 3 — Wait for the deploy to complete

The deploy typically takes 15-25 minutes. Use gh run watch launched with the Bash tool's run_in_background — the harness notifies you when it finishes, so there's no manual poll loop and no sleep:

gh run watch "$RUN_ID" --repo "$REPO" --exit-status

--exit-status returns nonzero if the run concluded in failure. On nonzero, print the logs URL and stop — do not run DAG pipelines against a failed deploy:

echo "Logs: https://github.com/$REPO/actions/runs/$RUN_ID"

Step 4 — Identify associated DAG workflows

Look at the files changed in this PR to determine which DAG workflows are relevant:

git diff origin/main --name-only

Map changed paths to DAG workflows:

Changed path patternDAG workflow file
python/datasources/cawp.py, data/cawp/dagCawp.yml
python/datasources/acs_*.pydagAcsCondition.yml, dagAcsPopulation.yml
python/datasources/cdc_hiv*.pydagCdcHiv.yml
python/datasources/phrma*.pydagPhrma.yml
python/datasources/maternal*.pydagMaternalMortality.yml
python/datasources/bjs*.pydagBjsIncarceration.yml
python/datasources/graphql_ahr*.pydagGraphQlAhr.yml
python/datasources/chr*.pydagChr.yml
python/datasources/cdc_wisqars*.pydagCdcWisqars.yml
python/datasources/vera*.pydagVera.yml
python/datasources/kff*.pydagKffVaccination.yml
python/datasources/cdc_vaccination*.pydagCdcVaccinationCounty.yml, dagCdcVaccinationNational.yml
python/ingestion/, run_gcs_to_bq/, run_ingestion/all DAGs that touch changed datasources

If no DAG workflows are clearly associated (e.g. pure frontend or config change), print a note and skip Steps 5-6.

You can also inspect the DAG workflow files directly to confirm the WORKFLOW_ID env var matches the changed datasource class name:

grep -l "WORKFLOW_ID" .github/workflows/dag*.yml | xargs grep -l "<datasource_id>"

Step 5 — Run each DAG workflow one at a time

For each associated DAG workflow, trigger it targeting the infra-test environment and wait for completion before starting the next one.

Trigger (capture the prior run ID first so you can tell when the new one appears, rather than blindly grabbing the latest):

PREV_ID=$(gh run list --repo $REPO --workflow=<workflow-file> --limit 1 --json databaseId --jq '.[0].databaseId')
gh workflow run <workflow-file> --repo $REPO
for i in $(seq 1 12); do
  DAG_RUN_ID=$(gh run list --repo $REPO --workflow=<workflow-file> --limit 1 --json databaseId --jq '.[0].databaseId')
  [ -n "$DAG_RUN_ID" ] && [ "$DAG_RUN_ID" != "$PREV_ID" ] && break
  sleep 5
done
echo "DAG run: https://github.com/$REPO/actions/runs/$DAG_RUN_ID"

Wait with gh run watch launched via the Bash tool's run_in_background (no manual poll loop):

gh run watch "$DAG_RUN_ID" --repo "$REPO" --exit-status; echo "$WORKFLOW_NAME exit=$?"

--exit-status is nonzero on failure.

If a DAG fails: print the logs URL, mark it failed in your results list, and continue with the remaining DAGs. Report all results at the end before updating the PR.


Step 6 — Update the PR description with verified results

Read the current PR body:

gh pr view <number> --repo $REPO --json body --jq '.body'

Append an infra-test results section above the 🤖 Generated with Claude Code footer (preserve all existing content including bot-generated blocks):

## Infra-test results

Deploy: [run #NNNN](https://github.com/REPO/actions/runs/NNNN) — success

DAG pipelines:
- [x] DAG - CAWP_DATA: [run #NNNN](https://github.com/REPO/actions/runs/NNNN) — success
- [ ] DAG - SOME_OTHER: [run #NNNN](https://github.com/REPO/actions/runs/NNNN) — failed (see logs)

Use - [x] for success, - [ ] for failure or not run. Always link the run ID so a reviewer can drill in.

Write the updated body to /tmp/pr-body-infra.md and apply:

gh pr edit <number> --repo $REPO --body-file /tmp/pr-body-infra.md

Notes

  • Never push directly to origin/main. The infra-test push goes to origin/infra-test only.
  • DAG workflows run against the infra-test GCP project (het-infra-test), not production.
  • The testBackendChangesInfraTest.yml deploy must succeed before running any DAGs — a failed deploy means the code under test was never deployed.
  • If the PR is purely a frontend or config change with no Python datasource changes, the deploy is still useful to verify the build, but DAG steps can be skipped.
  • DAG runs triggered by gh workflow run always use the main ref for the workflow definition but the deployed infra-test code for execution — this is the correct behavior.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

merge

無料

Force-merge an open PR to main (bypassing review requirements), delete the local branch, pull the updated main, and push it to the personal fork remote. Use when the user wants to close out a PR without waiting for review, or run /merge.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

next

無料

Figure out the best new thing to work on. Pulls open items from the GitHub project board, weighs assignment and labels, then prioritizes cleanly closeable scoped work and issues that would wrap up a milestone. Use when the user wants to know what to work on next, or run /next.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

pr

無料

Polish an open PR for review. Classify the diff by bucket (frontend / python / go) and run only the relevant checks — Biome+tsc+Playwright for frontend, black+pylint+pytest for python, build+test for go. Address open review comments, update CLAUDE.md docs if stale, rewrite the PR title and description, then watch CI until all checks pass (diagnosing and reporting any failures). Use when the user wants to close out a PR, verify it's ready for review, or run /pr.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

Summarize what's new on dev since the last release and investigate for footguns — config/infra changes, breaking changes, anything that could bring down production. Use before cutting a release, or run /pre-release.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

release

無料

Cut a new production release — pre-flight checks, auto-increment tag, publish GitHub release, monitor prod deploy, verify prod loads, targeted Playwright smoke tests, then trigger nightly E2E. Use when the user wants to ship a release or run /release.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

Generate a non-technical executive summary of the previous month's work and post it to the Deliverable Metrics Catch-All Notion page. Pulls GitHub merged PRs across the full repo, Gmail threads, and Google Drive docs for the period; asks interactively about how significant items landed; then translates everything into impact language (health equity, financial sustainability, profile, team velocity) with quantified metrics wherever possible. Use when the user wants to report out on the month's work, catch up the Notion page, or run /report-out.

日本語の概要は準備中です。原文の説明を表示しています。

SatcherInstitute/health-equity-tracker232026年10月24日 更新

SatcherInstitute のスキルをすべて見る

このスキルの問題を報告する