본문으로 건너뛰기
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 / 1,000자

이 양식은 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의 스킬 모두 보기

이 스킬의 문제 신고