Repository navigation
test: run two instances against one Postgres and one S3 bucket in CI - #207
Merged
Merged
Conversation
New multi-instance job: two `easy-cms serve` instances (NODE_ENV=production, migrated first) on one Postgres and one RustFS bucket, behind a round-robin proxy. It checks that REST writes and reads work from either instance, a session and CSRF token made on one are accepted by the other and logout ends it on both, failed logins are counted across instances, a file uploaded through one is served by the other, and that scheduled publishes and config jobs run once when both instances run jobs at once. Runs on its own config (multi-instance/vitest.config.ts), excluded from the integration suites. Closes #154 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #154 (M5, ADR-0051).
What runs
New CI job
multi-instancewith Postgres 17 and RustFS, set up like production:easy-cms migrate:createandeasy-cms migrateonce.easy-cms serve --trust-proxyinstances withNODE_ENV=production.Tests that must prove a request crossed instances call A and B directly. The rest go through the proxy.
/auth/meon B works and gives the same CSRF token; B accepts a POST with A's token and rejects a wrong one; logout on B → session gone on Ajobs/runcalls split across A and B → 20 publishes total, the job runs oncemulti-instance/vitest.config.ts), and the normal integration suites exclude it.packages/integrationgains devDependencieseasy-cms,@easy-cms/storage-s3andaws4fetch(to create the bucket). The lockfile diff is mostly pnpm re-resolving nuxt peers now thataws4fetchis in the graph.Verified locally (Docker: Postgres 17 + RustFS 1.0.0)
pnpm turbo run test typecheck --continue81/81,biome cipasses (the 7 warnings were already there).The 30-second role cache in each process will go in the reference architecture docs (#160) instead of a test.
🤖 Generated with Claude Code