Repository navigation
test(e2e): embedded-postgres smoke leg and WithEmbeddedPostgres (RIG-2906) - #2211
Merged
mattwilkinsonn merged 3 commits intoOct 12, 2026
Merged
Conversation
…2906) TestEmbeddedPostgresSmoke stands up its own stack over the stack-owned postgres, the product default, and checks the pgid record names a live postgres group, Ready health, one authed GetServerInfo, then a clean Down: not Ready, the postgres group reaped, the record removed. Every other leg attaches to the suite postgres, so this is the only e2e leg that covers the supervisor-owns-postgres teardown. WithEmbeddedPostgres pins that arm and fails the test when combined with an external DSN. Fixture.StateDir exposes the record's location. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
😎 This pull request was merged. |
Contributor
Author
|
Review at head
|
|
Compass engineering docs preview: https://compass-comms-rig-2906-embed.compass-eng-docs.pages.dev Deployed from Changed pages: |
…e stub (RIG-2906) The shared stack sets the forge env for the whole test process. A later own-stack NewFixture without WithForgeStub inherited those secret names, so its server declared forge secrets the fixture's secrets file did not hold and failed to boot. NewFixture now blanks that env for the test when the forge stub is off. Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
Author
|
Review at head
|
rigel-mintaka
marked this pull request as ready for review
October 12, 2026 01:13
This was referenced Oct 12, 2026
mattwilkinsonn
added this pull request to stack #2240
October 12, 2026 19:17
mattwilkinsonn
approved these changes
Oct 12, 2026
mattwilkinsonn
deleted the
compass-comms/rig-2906-embedded-postgres-smoke
branch
October 12, 2026 19:18
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.
This PR is part of a stack containing 3 PRs:
mainWhat
T4 of
docs/designs/infra/ci/compass-test-harness-tiers/design.md, built on plainNewFixtureper the T3 errata (there is noWithOwnStack).TestEmbeddedPostgresSmoke(go/e2e/embedded_postgres_test.go,podmantag) stands up its own stack over the stack-owned wrapper-process postgres, the product default. It asserts:stack.pgidsrecord names aproc postgresgroup, and that group is alive;GetServerInfosucceeds;Down: not Ready, the postgres group is reaped (kill(-pgid, 0)returnsESRCH), and the pgid record is removed.WithEmbeddedPostgres()states that a leg needs the stack-owned postgres. PlainNewFixturealready takes that arm, so the option sets nothing onstack.Config. It fails the test if an external DSN is also set (buildFixtureConfig).Fixture.StateDir()exposes where the pgid record lives.assertNoStackPostgresnow uses it instead of deriving the dir from the CA path.NewFixturewithoutWithForgeStubnow blanks the forge, S3 and OTLP env for the test (scrubForgeEnv). The shared stack'sconfigureForgeStubruns on a detached TB, so itsSetenvlasts the whole process. A later own stack inherited the forge secret names, declared secrets its file lacked, and its server failedresolve master key. CI hit this when the new leg ran after the shared legs.Why
Every other e2e leg attaches to the suite postgres through
ExternalDatabase. That path never touches the supervisor-owns-postgres lifecycle or the pgid-record teardown. This leg is the one dedicated e2e coverage of both.Verification
go test -tags podman -run 'TestHarnessCore$|TestEmbeddedPostgresSmoke$|TestWithEmbeddedPostgresRejectsExternalDSN' ./e2e/: all PASS.TestClientModeHeadlessChainthenTestEmbeddedPostgresSmoke): red before the env fix, green after.go test -tags podman ./e2e/:ok, 63 PASS, 0 FAIL, 0 SKIP.TestEmbeddedPostgresSmokewith-count=5: 5/5 PASS (theESRCHcheck is deterministic, because the wrapper waits for the postmaster, which waits for its backends).drainChildren: the group is alive after Down;proc postgresentry;TestWithEmbeddedPostgresRejectsExternalDSN/conflictfails.golangci-lint, tagged set: 0 issues.go vet -tags podman ./e2e/passes.rumdl checkon the record is clean.design-ledger-gate: OK.Spec-impact: none
Ledger-impact: none (ticks T4 in the frozen record's Tasks list; no new decision)
Closes RIG-2906
Refs RIG-2742
Co-authored-by: Matt Wilkinson matt@rigel.build