Skip to content

feat: add K8s integration test suite for cluster mode#61

Merged
jbiskur merged 5 commits intomainfrom
feat/cluster-integration-tests
Mar 19, 2026
Merged

feat: add K8s integration test suite for cluster mode#61
jbiskur merged 5 commits intomainfrom
feat/cluster-integration-tests

Conversation

@jbiskur
Copy link
Contributor

@jbiskur jbiskur commented Mar 19, 2026

Summary

  • Adds a full k3d-based integration test suite that deploys 3 replicas with a real PostgreSQL coordinator into a local k3s cluster
  • Verifies leader election, WebSocket mesh connectivity, and event distribution across pods
  • Adds dataSourceOverride passthrough to FlowcoreDataPumpCluster to enable test injection without Flowcore API credentials
  • CI job spins up its own k3d cluster, runs the test, collects logs on failure, and tears down

Test plan

  • deno test -A — existing unit tests still pass (verified locally)
  • deno lint && deno fmt --check — clean (verified locally)
  • CI build job passes (lint, fmt, test, npm build)
  • CI integration-test job passes (k3d cluster, 3 pods, 100 events distributed across >= 2 pods, exactly 1 leader)
  • Can run locally via bash integration/run-integration.sh

🤖 Generated with Claude Code

jbiskur and others added 5 commits March 19, 2026 15:21
Adds a full k3d-based integration test that deploys 3 replicas with
a real PostgreSQL coordinator to verify leader election, WS mesh,
and event distribution across pods. Also adds dataSourceOverride
passthrough to FlowcoreDataPumpCluster for test injection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Events were being processed before workers connected. Now delivers
events in batches of 10 after a 15s startup delay, giving the WS
mesh time to form so events get distributed across pods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When notifier.type is "nats", NATS handles both event notifications and
cluster event distribution via request/reply with queue groups, replacing
the WS mesh for inter-pod communication. Shared NATS connection is reused
by both notifier and distributor. WS mode remains unchanged as fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jbiskur jbiskur merged commit 9ae9869 into main Mar 19, 2026
2 checks passed
@jbiskur jbiskur deleted the feat/cluster-integration-tests branch March 19, 2026 22:00
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.

1 participant