Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • update dockerfile to contain testing package deps

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Dec 26, 2025 8:20pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 26, 2025

Greptile Summary

This PR adds support for the newly introduced @sim/testing package (from PR #2586) to both Docker build configurations. The changes ensure that the testing package's dependencies are properly installed during the Docker image build process by including its package.json in the dependency resolution stages.

Changes made:

  • Added packages/testing directory creation in the deps stage
  • Copied packages/testing/package.json in both deps and builder stages for app.Dockerfile and realtime.Dockerfile
  • Maintains consistency with existing pattern used for packages/db

Impact:

  • Enables the monorepo workspace to recognize and install dependencies for the testing package during Docker builds
  • Ensures tests can run successfully in containerized environments
  • No functional changes to application runtime behavior

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are straightforward, mechanical additions that mirror the existing pattern for packages/db. They're necessary to fix Docker builds broken by PR feat(tests): added testing package, overhauled tests #2586, which added the testing package. All changes follow established conventions and don't modify any runtime logic
  • No files require special attention

Important Files Changed

Filename Overview
docker/app.Dockerfile Added packages/testing directory creation and package.json copy statements in deps and builder stages to support new testing package
docker/realtime.Dockerfile Added packages/testing directory creation and package.json copy statements in deps and builder stages to support new testing package

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docker as Docker Build
    participant Deps as deps Stage
    participant Builder as builder Stage
    participant Bun as Bun Package Manager

    Dev->>Docker: docker build
    Docker->>Deps: Start deps stage
    Note over Deps: Create workspace directories
    Deps->>Deps: mkdir -p apps packages/db packages/testing
    Deps->>Deps: COPY package.json files
    Note over Deps: Copy root, apps/sim, packages/db,<br/>and packages/testing package.json
    Deps->>Bun: bun install
    Note over Bun: Resolves dependencies for all<br/>packages including @sim/testing
    Bun-->>Deps: node_modules with testing deps
    
    Docker->>Builder: Start builder stage
    Builder->>Builder: COPY node_modules from deps
    Builder->>Builder: COPY package.json files
    Note over Builder: Including packages/testing/package.json
    Builder->>Builder: COPY packages ./packages
    Note over Builder: Full testing package source copied
    Builder->>Builder: bun run build
    Builder-->>Docker: Build artifacts
    
    Docker-->>Dev: Image ready with testing support
Loading

@waleedlatif1 waleedlatif1 merged commit d707d18 into staging Dec 26, 2025
6 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/build branch December 26, 2025 20:20
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.

2 participants