Skip to content

Add explicit deployment state modes and optional DMS history - #7151

Draft
shreyas-goenka wants to merge 20 commits into
mainfrom
shreyas-goenka_data/shreyas/statedb-modes
Draft

shreyas-goenka wants to merge 20 commits into
mainfrom
shreyas-goenka_data/shreyas/statedb-modes

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Replace the separate write and history booleans in DeploymentState with six explicit modes: ReadingFile, WritingFile, ReadingDMS, WritingDMS, WritingFileWithHistory, and WritingFileWithHistoryEnforced. Update Open, UpgradeToWrite, assertions, and their callers to select and validate the persistence policy.

The file history modes retain WAL recovery and full resources.json state while recording operations to DMS. The operation queue is unbounded and coalesces updates per resource. Recording fails open, with a drain budget of five seconds per staged operation that cancels outstanding requests on expiry. No additional per-request timeout is applied. Enforced history persists the sticky deployment_history_best_effort feature through WAL recovery and rejects writes that bypass recording. DMS-authoritative writes continue without a WAL.

Why

History recording needs to work independently of using DMS as the state source. Explicit modes make the permitted reads, writes, and compatibility checks clear. This adds state DB API support; selecting the new history modes through bundle configuration is separate work.

Tests

  • Unit tests for the state DB, DMS buffer, and updated caller packages, using the repository's Go toolchain.
  • Race checks for bundle/direct/dstate and libs/dms.
  • Existing bundle/dms and bundle/deploy/wal acceptance suites.
  • golangci-lint on all affected packages, using the repository's Go toolchain: zero issues.

@github-actions github-actions Bot added the DABs DABs related issues label Oct 21, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c6a030a

Run: 39790137655

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 4:06
✅​ aws-windows-latest-4core-16gb 283 13 3:21
✅​ azure linux-2core-8gb 280 15 4:04
✅​ azure-windows-latest-4core-16gb 282 13 3:37
✅​ gcp linux-2core-8gb 281 15 4:09
✅​ gcp-windows-latest-4core-16gb 283 13 3:22
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:29 azure-windows-latest-4core-16gb TestAccept
3:09 gcp-windows-latest-4core-16gb TestAccept
3:09 aws-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants