chore: adopt Data Services Versioning Standard#680
Merged
Conversation
- Bump pyproject version to 1.0.0 + add release-please manifest/config - Add release-please workflow (watches production + hotfix/v* branches) - Add hotfix-start workflow (workflow_dispatch creates hotfix/vX.Y.Z+1 off a release tag) - Add PR title lint workflow (Conventional Commits) - Retarget CD (Production) to fire on v*.*.* tag (no more push-to-branch deploys); drop self-tagging step; pass APP_VERSION through to App Engine env - Surface APP_VERSION via Settings.version (env override -> importlib.metadata fallback) and add /health endpoint returning version - Use settings.version for public OpenAPI schema (was hardcoded 0.0.1) - Remove Sentry release workflow Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the Data Services Versioning Standard for OcotilloAPI by introducing release automation (release-please), switching production deploys to tag-driven releases, and surfacing the runtime application version via settings/OpenAPI and a new health endpoint.
Changes:
- Add release-please configuration + workflow, plus a hotfix branch creation workflow and PR title Conventional Commits linting.
- Retarget production CD to deploy on
v*.*.*tag pushes, injectAPP_VERSIONinto App Engine, and remove the obsolete Sentry release workflow. - Surface version consistently (
Settings.version, public OpenAPI version,/healthendpoint) and update org lexicon entries; bump a few Python dependencies.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Bumps pinned dependency versions in the lockfile. |
requirements.txt |
Updates hashed pins to match dependency bumps. |
pyproject.toml |
Bumps project version to 1.0.0 and updates dependency pins. |
release-please-config.json |
Adds release-please configuration for Python releases with v tags. |
.release-please-manifest.json |
Introduces the manifest pinning the current release version. |
.github/workflows/release-please.yml |
Adds release-please workflow for production and hotfix/v* branches. |
.github/workflows/pr-title-lint.yml |
Adds PR title lint enforcing Conventional Commits for squash merges. |
.github/workflows/hotfix-start.yml |
Adds workflow_dispatch helper to create hotfix/vX.Y.(Z+1) branches from tags. |
.github/workflows/CD_production.yml |
Switches prod deploy trigger to semver tag pushes; injects APP_VERSION; removes self-tagging. |
.github/app.template.yaml |
Adds APP_VERSION env var to deployed App Engine configuration. |
.github/workflows/release.yml |
Removes obsolete Sentry release workflow. |
core/settings.py |
Resolves version from APP_VERSION or package metadata (fallback 0.0.0). |
core/app.py |
Uses settings.version in public OpenAPI and adds /health returning {status, version}. |
api/search.py |
Improves contact search label fallback (name → organization). |
core/lexicon.json |
Adds several new organization terms. |
.env.example |
Adds example PyGeoAPI Postgres credentials variables. |
transfers/migrate_nmbgmr_site_names.py |
Adds one-time idempotent migration script to populate NMBGMR site names into ThingIdLink. |
uv sync --locked compares lockfile project metadata to pyproject.toml; mismatched version (lock pinned 0.1.0 vs pyproject 1.0.0) would fail CI. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ning-standard # Conflicts: # .github/workflows/release.yml
- release-please-config.json: set "prerelease": true and "prerelease-type": "rc" on the root package so the next Release PR cuts 1.0.0rc1; subsequent cuts roll rc2, rc3, etc. Flip to false to graduate to 1.0.0 GA. - CD_production.yml: extend tag trigger to also match SemVer prerelease tags (v*.*.*-*) and PEP 440 prerelease tags (v*.*.*[a-z]*) so v1.0.0rc1 fires the deploy. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
app.template.yaml requires APP_VERSION via envsubst; previously only the
production workflow supplied it, so staging/testing deploys would render an
empty value and Settings.version would fall back to importlib.metadata.
That fallback also fails because uv export --no-emit-project skips installing
the project, so /health and OpenAPI info.version were both reporting "0.0.0"
on non-prod App Engine services.
Sets APP_VERSION to "{branch}-{sha}" for staging + testing — unambiguous,
sortable, and not mistakable for a release tag.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment on lines
+23
to
+27
| ".": { | ||
| "package-name": "OcotilloAPI", | ||
| "prerelease": true, | ||
| "prerelease-type": "rc" | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+23
to
+27
| ".": { | ||
| "package-name": "OcotilloAPI", | ||
| "prerelease": true, | ||
| "prerelease-type": "rc" | ||
| } |
Comment on lines
+221
to
+224
| @app.get("/health", tags=["meta"]) | ||
| @public_route | ||
| async def health(): | ||
| return {"status": "ok", "version": settings.version} |
Comment on lines
+34
to
+36
| if [ -z "$BASE" ]; then | ||
| BASE="$(git tag --list 'v*.*.*' --sort=-v:refname | head -n1)" | ||
| fi |
Comment on lines
+5
to
+8
| tags: | ||
| - 'v*.*.*' # GA releases: v1.0.0, v1.4.2 | ||
| - 'v*.*.*-*' # SemVer pre-releases: v1.0.0-rc.1 | ||
| - 'v*.*.*[a-z]*' # PEP 440 pre-releases: v1.0.0rc1, v1.0.0b2 (release-please-python form) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt the Data Services Versioning Standard on OcotilloAPI. Wires release-please + tag-triggered deploy per spec §§5–10.
pyproject.tomlto 1.0.0, add.release-please-manifest.json+release-please-config.json.release-pleaseworkflow watchingproductionandhotfix/v*.hotfix-startworkflow (workflow_dispatch) that brancheshotfix/vX.Y.(Z+1)off the latest (or specified)v*.*.*tag.CD (Production)to fire onv*.*.*tag push (no more push-to-branch deploys); drop the self-tagging step; injectAPP_VERSIONinto App Engine env.Settings.versionreadsAPP_VERSIONenv, falls back toimportlib.metadata.version("OcotilloAPI"). Public OpenAPI usessettings.version(was hardcoded0.0.1). New/healthreturns{status, version}.Why
Implements the Data Services Versioning Standard. Pins the public contract at 1.0.0 so SemVer rules engage going forward.
Release flow after merge
staging(CD Staging deploys to staging env as usual).staging->productionpromotion PR when ready to cut 1.0.0.production,release-pleaseopens a Release PR titledchore(production): release 1.0.0.v1.0.0tag + GitHub Release created automatically.CD (Production)-> Alembic migrations + App Engine deploy.Follow-up (manual, not in this PR)
production(required reviews + status checks). Squash-only merge is already enforced at the repo level.Test plan
pr-title-lintpasses.unit-tests/bdd-testspass against the new/healthendpoint +settings.versionchange.curl localhost:8000/healthreturns{"status":"ok","version":"1.0.0"}./healthand confirm version field present.release-pleaseRelease PR appears onproduction.v1.0.0tag exists,CD (Production)succeeds, prod/healthreturns the tagged version.🤖 Generated with Claude Code