Skip to content

Feat/fauxsq#405

Closed
kibertoad wants to merge 29 commits intomainfrom
feat/fauxsq
Closed

Feat/fauxsq#405
kibertoad wants to merge 29 commits intomainfrom
feat/fauxsq

Conversation

@kibertoad
Copy link
Owner

@kibertoad kibertoad commented Feb 22, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Added support for multiple queue backend options (fauxqs and localstack) via QUEUE_BACKEND environment variable.
    • Restored LocalStack service in Docker Compose with explicit port mappings and configuration.
    • Enhanced CI/CD pipeline to separately test AWS packages with configurable queue backend matrix.
    • Updated development dependencies including turbo to 2.8.10.
    • Improved test environment initialization with setup utilities for consistent test runs.

@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This change introduces fauxqs-based test infrastructure with environment-aware backend switching (fauxqs vs localstack), refactors test utilities through a centralized TestAwsResourceAdmin abstraction, updates CI workflows to separately handle AWS packages and propagate queue backend configuration, and reintroduces localstack in docker-compose.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.common.yml, .github/workflows/ci.yml
Added QUEUE_BACKEND input and environment variable propagation to workflow steps. Introduced AWS package detection via path classification (AWS_PACKAGE_PATHS), splits packages into aws_packages and packages outputs, creates separate aws-packages job with matrix strategy (node-version, package-name, queue-backend), and updates automerge job to depend on both general and aws-packages results with tightened gating logic.
Infrastructure & Turbo Config
docker-compose.yml, turbo.json, package.json
Reintroduced localstack service with port mappings and environment configuration. Added QUEUE_BACKEND to turbo.json globalEnv for environment inheritance. Updated turbo devDependency from ^2.6.2 to ^2.8.10 and cleared test:coverage task dependencies.
GCP Pub/Sub Test Utilities
packages/gcp-pubsub/test/...
Renamed emptyBucket → emptyBuckets in gcsUtils.ts to accept multiple bucket names via rest parameters. Updated all test imports and calls to use the new function signature.
S3 Payload Store Test Infrastructure
packages/s3-payload-store/...
Introduced fauxqsInstance.ts with server management helpers (ensureFauxqsServer, getFauxqsServer, getFauxqsPort). Refactored testS3Config.ts from static TEST_AWS_CONFIG to dynamic getTestS3Config() function. Added vitest.setup.ts to initialize FauxQS server. Updated vitest.config.ts with maxWorkers and setupFiles. Modified docker:start script to conditionally start localstack. Replaced direct AWS config with getTestS3Config in test files.
SNS Package Test Infrastructure
packages/sns/package.json, packages/sns/test/utils/*
Added fauxqs devDependency and created fauxqsInstance.ts for environment-aware port/host resolution. Introduced TestAwsResourceAdmin class abstracting AWS resource operations (create/delete queues, topics, buckets). Renamed emptyBucket → emptyBuckets for multi-bucket support. Updated testSnsConfig.ts with dynamic port handling and separate TEST_S3_CONFIG. Updated testContext.ts to wire testAdmin into DI container. Modified docker:start to conditionally start localstack based on QUEUE_BACKEND.
SNS Test Suites
packages/sns/test/consumers/*, packages/sns/test/publishers/*, packages/sns/test/utils/snsSubscriber.spec.ts
Refactored 11+ test files to replace direct AWS SDK calls (deleteQueue/deleteTopic/assertQueue/assertBucket/emptyBucket) with centralized TestAwsResourceAdmin via diContainer.cradle.testAdmin. Updated queue/topic URLs to use dynamic getPort() instead of hardcoded 4566. Modified setup/teardown flows to use testAdmin equivalents (createQueue, deleteQueues, createTopic, deleteTopics, createBucket, emptyBuckets).
SQS Package Test Infrastructure
packages/sqs/package.json, packages/sqs/test/utils/*
Added fauxqs devDependency. Created fauxqsInstance.ts with environment-driven port/host resolution. Introduced TestAwsResourceAdmin class for unified AWS resource management. Renamed emptyBucket → emptyBuckets for batch operations. Updated testAwsConfig.ts with separate TEST_S3_CONFIG and dynamic endpoint generation. Updated testContext.ts to wire testAdmin as singleton. Modified docker:start script for conditional localstack startup.
SQS Test Suites
packages/sqs/test/consumers/*, packages/sqs/test/publishers/*, packages/sqs/lib/fakes/TestSqsPublisher.spec.ts
Refactored 10+ test files to replace direct queue/topic/bucket utilities with TestAwsResourceAdmin from diContainer.cradle. Updated all resource lifecycle operations (queue creation, deletion, bucket management) to use testAdmin methods. Adjusted beforeEach/afterEach hooks to use centralized admin helper. Modified test setup to create queues with attributes via testAdmin instead of assertions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Add fauxqs AWS engine #400 — Overlapping refactoring of fauxqs support, TestAwsResourceAdmin, emptyBucket→emptyBuckets rename, and test config updates across multiple packages.
  • chore: Vitest 4 #394 — Related vitest configuration updates (maxWorkers, setupFiles, mockReset) and test devDependencies.
  • Implement test publisher #357 — Touches SQS test infrastructure and TestSqsPublisher modifications.

Suggested labels

minor

Suggested reviewers

  • CarlosGamero
  • Drodevbar
  • kjamrog

Poem

🐰 The queues now hop through a backend choice divine,
Fauxqs and LocalStack both in perfect alignment,
Test AdminRabbit tidies the AWS woodland,
No more SDK confusion—abstraction's the good land!
CI workflows orchestrate with grace,
QUEUE_BACKEND floats through the digital space. 🐇✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/fauxsq

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kibertoad kibertoad closed this Feb 22, 2026
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