Skip to content

feat: deploy gating model — two-stage dev, readonly prod, PR gate - #179

Merged
saqibmanan merged 7 commits into
mainfrom
feat/deploy-gating-model
Sep 15, 2026
Merged

saqibmanan merged 7 commits into
mainfrom
feat/deploy-gating-model

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

Deploy gating model for DataSpaceBackend:

  • dev merges: smoke first → functional (api + consumer) only if smoke passes → rollback on any failure, finalize when green. Provider functional runs report-only (flaky against dev, CivicDataSpace-test#79) — not a rollback/finalize dependency.
  • main (prod): only the readonly allowlist runs against prod (112 audited tests, provider never) → rollback or finalize.
  • PR gate (pr-gate.yml): every PR into main runs the full suite (smoke + functional + regression) against dev, with deployed_sha = PR head, so it fails unless dev is running exactly the code being merged. Provider reports separately and won't be a required check.

Uses CivicDataSpace-test's new suite / only_provider inputs (#76, #78).

Note: this PR is not a dev→main PR, so the new PR gate on it is expected to fail its deployed-SHA check (dev isn't running this branch) — a live check that the gate rejects non-dev code. Branch protection isn't enabled yet, so it won't block.

dev: smoke first; functional runs only if smoke passes; either failing
rolls back, both passing finalizes. main: only the readonly allowlist
runs against prod (provider never), replacing skip_provider. Finalize
uses !failure() because functional-tests is skipped on main by design.
Runs the full suite (smoke, functional, regression) against dev on every
PR into main. deployed_sha is the PR head, so the gate fails unless dev
is running exactly the code being merged.
Provider functional tests fail at shifting points against dev (autosave
races, slow create flows), so gating on them would roll back dev deploys
spuriously. The gating functional stage and the PR gate now skip
provider; separate provider jobs run with only_provider and report,
without being a dependency of rollback/promote or a required check.
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/pr-gate.yml Fixed
Comment thread .github/workflows/pr-gate.yml Fixed
saqibmanan and others added 4 commits September 15, 2026 12:25
Finalize and rollback did not list the report-only provider job in needs,
so a deploy asked for finalize approval while provider tests were still
running. Both now wait for it, and condition on the gating jobs' results
explicitly instead of failure()/!failure(), which would count the
report-only job's result.
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@saqibmanan
saqibmanan merged commit d93c93e into main Sep 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants