feat: GCP/GKE migration prep (persistence split, Dockerfiles, CI)#27
Merged
feat: GCP/GKE migration prep (persistence split, Dockerfiles, CI)#27
Conversation
Change DEFAULT_DB_PATH from './data/servo.db' to './data/api.db' so the API and bundler use independent SQLite files when deployed to separate containers. The DB_PATH env var override is preserved for backward compatibility. Add unit tests for PersistenceStore.
Change DEFAULT_DB_PATH from './data/servo.db' to './data/bundler.db' so each service owns its own SQLite file. Add unit tests for BundlerPersistenceStore covering pending operations and sender reputations.
Add chown node:node /app/data and USER node directive to both Dockerfiles. The node:22-slim base image includes a node user at UID/GID 1000, matching the GKE StatefulSet securityContext (runAsUser: 1000, fsGroup: 1000).
When DEPLOY_TARGET is set to 'gke' in GitHub Actions variables, the Railway deploy job is skipped. The github-release job now depends on verify directly so it still runs when deploy is skipped. Default behavior (no variable set) is unchanged -- Railway deploys as before.
Build and push API and bundler Docker images to us-central1-docker.pkg.dev/mainnet-trailblazer/servo/ on v* tags. Uses Workload Identity Federation for keyless auth. The verify job is identical to the existing release.yml.
Replace 'as any' with 'as unknown as PaymasterQuote' in the test quote factory to satisfy @typescript-eslint/no-explicit-any rule.
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
Prepares the
agent-paymastercodebase for migration from Railway to the shared TaikomainnetGKE cluster:api.db, bundler defaults tobundler.db— each service owns its own SQLite file for independent PVCs on GKEnode(UID 1000) viaUSER node, matching the GKE StatefulSetsecurityContextrelease.ymlis skipped whenDEPLOY_TARGET=gke, so the migration tag doesn't redeploy Railwaygke-release.ymlbuilds + pushes images tous-central1-docker.pkg.dev/mainnet-trailblazer/servo/via Workload Identity FederationPersistenceStoreandBundlerPersistenceStore(183 total tests passing)Design spec
docs/superpowers/specs/2026-04-16-gcp-migration-design.mdCompanion PR
Helm chart in
ecosystem-k8s-configs(separate repo, separate PR)Test plan
pnpm test— 183/183 passing (shared 9, bundler 68, API 106)pnpm lint— 0 errors across all packagesPersistenceStoretests: DB creation, quote CRUD, rate-limit CRUDBundlerPersistenceStoretests: DB creation, pending operations, sender reputationsgke-release.ymltriggers on tag push (requires GCP Workload Identity setup)release.ymldeploy job skips whenDEPLOY_TARGET=gke