79 lines
2.8 KiB
Markdown
79 lines
2.8 KiB
Markdown
# deployment-coordination
|
|
|
|
How grm releases propagate to infra. grm publishes a PyPI package and
|
|
auto-creates an infra dependency PR. Coordination ensures the PR is
|
|
merged before infra deploys.
|
|
|
|
## When to Invoke
|
|
|
|
Invoke this skill when:
|
|
- Changes to grm affect infra deployments
|
|
- Preparing a grm release that infra depends on
|
|
- Verifying infra has bumped to the latest grm version
|
|
- Coordinating a multi-repo change that includes grm
|
|
|
|
## Prerequisites
|
|
|
|
- grm repo at `/home/emo/dev/ideas/oblachno/grm`
|
|
- `.env` with `DEVELOPER_GITEA_API_TOKEN`
|
|
- See `dependency-graph` skill for the full ecosystem map
|
|
|
|
## What grm Produces
|
|
|
|
grm publishes a Python package to the Gitea PyPI registry. infra pins it:
|
|
```toml
|
|
"grm @ git+https://git.oblachno.oblachno.fyi/oblachno-oss/grm.git@vX.Y.Z"
|
|
```
|
|
|
|
## Release Flow
|
|
|
|
1. PR merged to master
|
|
2. Post-merge workflow runs `devx.ci.release` — classifies changes
|
|
3. If user-facing changes: git-cliff bumps version, creates tag, pushes
|
|
4. `devx.ci.publish` builds and publishes to Gitea PyPI registry
|
|
5. `devx.ci.create_dependency_pr --repo oblachno/infra --package grm`
|
|
auto-creates an infra PR to bump the pinned grm version
|
|
|
|
## Downstream Consumer
|
|
|
|
| Repo | Pin location | Auto-bump? |
|
|
|------|-------------|------------|
|
|
| infra | `pyproject.toml` | Yes — auto PR created by post-merge |
|
|
|
|
## Coordinating a grm Change
|
|
|
|
1. **Merge grm PR** — wait for post-merge publish + dependency-PR creation
|
|
2. **Verify publish** — check the new tag:
|
|
```bash
|
|
curl -sS -H "Authorization: token $DEVELOPER_GITEA_API_TOKEN" \
|
|
https://git.oblachno.oblachno.fyi/api/v1/repos/oblachno-oss/grm/releases/latest \
|
|
| python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','?'))"
|
|
```
|
|
3. **Find the auto-created infra PR** — check infra for open PRs with
|
|
`dependency` label or title containing `bump grm`
|
|
4. **Review and merge the infra dependency PR** — verify the version bump,
|
|
run `make pytest-cov` in infra, add `ready-to-merge`
|
|
5. **Verify infra staging deploy** — after infra merges, staging deploy
|
|
picks up the new grm version
|
|
|
|
## State Verification
|
|
|
|
```bash
|
|
# Current grm version
|
|
grep '__version__' /home/emo/dev/ideas/oblachno/grm/src/grm/__init__.py
|
|
|
|
# What infra pins
|
|
grep 'grm @' /home/emo/dev/ideas/oblachno/infra/pyproject.toml | grep -oP 'v[\d.]+'
|
|
|
|
# Check for open infra dependency PRs
|
|
curl -sS -H "Authorization: token $DEVELOPER_GITEA_API_TOKEN" \
|
|
"https://git.oblachno.oblachno.fyi/api/v1/repos/oblachno/infra/pulls?state=open" \
|
|
| python3 -c "import json,sys; [print(p['number'],p['title']) for p in json.load(sys.stdin) if 'grm' in p.get('title','').lower()]"
|
|
```
|
|
|
|
## Common Mistakes
|
|
|
|
- Merging the grm PR but ignoring the auto-created infra dependency PR
|
|
- Deploying infra before the dependency PR is merged — stale grm version
|
|
- Forgetting that grm also has an Ansible role used by infra at deploy time
|