Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • add missing deps to db container for running script
  • sim/tsconfig and uuid were missing

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 Jan 9, 2026

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

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Jan 9, 2026 4:08pm

@waleedlatif1 waleedlatif1 changed the title fix(sso): add missing deps to db container for running script fix(docker): add missing deps to db container for running script Jan 9, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

Fixes missing dependencies in the database Docker container that prevented SSO registration script from running successfully.

  • Added uuid package dependency to packages/db/package.json (used by register-sso-provider.ts and migrate-deployment-versions.ts scripts)
  • Added root package.json copy to Dockerfile for workspace dependency resolution (required by Bun to resolve workspace packages like @sim/tsconfig)
  • Fixed documentation path in script comment to reflect correct location

Confidence Score: 5/5

  • This PR is safe to merge - it adds necessary missing dependencies without introducing any risks
  • The changes are straightforward dependency additions that fix a real bug. The uuid package is required by two scripts (register-sso-provider.ts and migrate-deployment-versions.ts), and the root package.json is needed for Bun's workspace resolution. All changes are properly reflected in the lockfile, and the documentation fix ensures clarity for users.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
docker/db.Dockerfile 5/5 Added copy of root package.json for workspace resolution - necessary for Bun to resolve workspace dependencies when running scripts in the container
packages/db/package.json 5/5 Added uuid dependency (^11.1.0) to support UUID generation in database scripts
packages/db/scripts/register-sso-provider.ts 5/5 Updated usage comment to correct script path (scripts/register-sso-provider.ts instead of register-sso-provider.ts)
bun.lock 5/5 Lockfile updated to include uuid dependency for packages/db

Sequence Diagram

sequenceDiagram
    participant DC as Docker Compose
    participant DB as db.Dockerfile
    participant Bun as Bun Runtime
    participant Script as register-sso-provider.ts
    participant PG as PostgreSQL

    DC->>DB: Build migrations container
    DB->>DB: Copy root package.json (NEW)
    DB->>DB: Copy node_modules with uuid
    DB->>DB: Copy packages/tsconfig
    DB->>DB: Copy packages/db
    
    DC->>Bun: Run script in container
    Bun->>Bun: Resolve workspace deps via package.json
    Bun->>Script: Execute register-sso-provider.ts
    Script->>Script: Import uuid package (NEW)
    Script->>Script: Generate UUID with uuidv4()
    Script->>PG: Insert SSO provider with UUID
    PG-->>Script: Success
    Script-->>Bun: Complete
    Bun-->>DC: Exit 0
Loading

@waleedlatif1 waleedlatif1 merged commit 9502227 into staging Jan 9, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/sso branch January 9, 2026 17:42
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