[CNSL-1934] Add pre-release pending deploy branch management#105
[CNSL-1934] Add pre-release pending deploy branch management#105linhcrl wants to merge 1 commit intocockroachdb:mainfrom
Conversation
f81608f to
427284b
Compare
f9a2f35 to
cb4189b
Compare
cb4189b to
3f5a6bc
Compare
fantapop
left a comment
There was a problem hiding this comment.
I left some feedback. In general, this feels like a lot of logic to be inlining into these workflows and going untested. Did you consider the approach we took in the actions repo to separate out some of the logic to actual code files?
| GH_TOKEN: ${{ secrets.MANAGED_SERVICE_TOKEN }} | ||
| run: | | ||
| # Get all release tags matching release-YYYY-MM-DD-N pattern | ||
| all_tags=$(gh api repos/cockroachlabs/managed-service/tags --paginate --jq '.[].name' | grep -E '^release-[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]+$') |
There was a problem hiding this comment.
what does --paginate do here? Does that restrict us to the first page?
| > not_deployed.txt | ||
| > missing_trailer.txt | ||
| > unexpected_status.txt |
There was a problem hiding this comment.
This is kind of a weird syntax... I guess if it works. Normally I would use touch
| while IFS='|' read -r sha subject; do | ||
| echo "Checking commit $sha: $subject" | ||
|
|
||
| # Extract Managed-service-commit-SHA trailer from commit message |
There was a problem hiding this comment.
I'm not really clear whats going on here. Is trailer the right terminology to be used?
| - name: Fetch latest remote refs | ||
| run: | | ||
| # Ensure we have the latest branches and tags from origin | ||
| git fetch origin --tags --force | ||
| git fetch origin --prune |
There was a problem hiding this comment.
I was surprised this step would be necessary in either workflow. Can you document why that is in a comment?
| git fetch origin --tags --force | ||
| git fetch origin --prune | ||
|
|
||
| - name: Find latest pending deploy branch |
There was a problem hiding this comment.
It looks like a lot of the stuff from this workflow are copied from the other workflow. Maybe it would make sense to bundle this stuff into an action instead.
78434b0 to
e52ef90
Compare
Introduces two workflows to manage the release process:
1. pending-deploy-pr.yml (workflow_dispatch trigger):
- Finds the latest pending-deploy-YYYYMMDD-hhmmss branch
- Creates a PR to merge it into main
2. pending-deploy-check.yml (pull_request trigger):
- Validates pending deploy PRs before merge
- Checks that Managed-service-commit-SHA trailers reference deployed
commits
- Blocks merge until all changes are confirmed deployed in
managed-service
- Posts PR comments detailing any undeployed commits
This ensures SDK releases only reference deployed CC API changes.
Co-Authored-By: roachdev-claude <[email protected]>
e52ef90 to
1b798ac
Compare
Introduces two workflows to manage the release process:
pending-deploy-pr.yml (repository_dispatch trigger):
pending-deploy-check.yml (pull_request trigger):
This ensures SDK releases only include changes that are live in production.
Relevant screenshots
PR opened by pending-deploy-pr.yml
Comment left by pending-deploy-check.yml on failed check