Feature/ci azure improvements - #25
Conversation
Documents the compound if: gates, push-only event guards, staging DB cleanup safety net, and version-bump script's tricky bits.
noel
left a comment
There was a problem hiding this comment.
have claude use balboa repo to validate things
you also need to know what all this stuff is doing. not just asking claude to do stuff.
| - transform/* | ||
| - transform/**/* | ||
| - automate/dbt/* | ||
| - automate/dbt/** |
There was a problem hiding this comment.
I dont think we need both versions * and **
look at this and ask claude
https://github.com/datacoves/balboa/blob/main/.github/workflows/10_feature_dbt_checks.yml#L8
There was a problem hiding this comment.
It mirrors the existing transform/* + transform/**/* style already in this file so the new paths matched the established convention. But you're right that it's redundant: automate/dbt/** already covers both direct and nested files, so I'll collapse it to a single line.
| fetch-depth: 0 | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Check for dbt-related changes |
There was a problem hiding this comment.
Those two lines just make sure the "what changed?" check is accurate.
fetch-depth: 0 → pull the full git history. The default checkout only grabs the latest commit, and git diff against main needs the shared history to work correctly.
ref: ...head.sha → check out the actual PR branch. By default, on PRs GitHub checks out a temporary "PR merged into main" commit, which would make the diff show main's files too. This points it at the real PR commit so we only see what the PR actually changed.
| @@ -0,0 +1,39 @@ | |||
| #!/bin/bash | |||
| set -e | |||
|
|
|||
There was a problem hiding this comment.
yes, I implemented the feature/* and infra/* branch names. feature can merge into feature or main, and infra can merge only to main. Following what we have in Sevita.
What & why
Ports a set of CI/CD improvements that already exist in the equivalent Azure DevOps pipeline for this project into our two GitHub Actions workflows. Keeps our existing two-stage model (PR build → deploy) — the Azure QA/release middle tier is intentionally not ported.
Changes
pull_request_build.yml(PR build stage)validate-branchjob: source must start withfeature/orinfra/;feature/*may targetmainor anotherfeature/*, whileinfra/*may target onlymain; the source must not be behindmain; andinfra/*branches may not modifytransform/. (Ports Azure'sbranch_validator.py+ infra guard.)detect-changesjob skips thedbtjob when nothing undertransform/orautomate/dbt/changed; still runs onworkflow_dispatch.3.3→5.0.push-to-main.yml(deploy stage)[deploy:full-refresh]marker in the merge commit → appends--full-refreshto both blue/green commands.YYYYMMDD.N.0), committed with[skip ci]and pushed tomain. Gated toif: github.event_name == 'push'to avoid double-bumping on merge and to avoid firing on unmerged-PR-close or manual dispatch. Job grantedpermissions: contents: write.build3.3→5.0,drop-pr-db-on-close3.2→5.0(previously inconsistent).mainmust allow the Actions bot to push directly — otherwise the version-bump/tag push fails.contents: write.