-
Notifications
You must be signed in to change notification settings - Fork 80
fix(manage-api): run initialization in non-test environments to create default org #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…e default org The initializeDefaultUser function was only called when ENVIRONMENT=development, but in CI the ENVIRONMENT variable is not set. This caused the default organization to never be created, resulting in foreign key constraint failures when pushing projects with tenantId='default'. Updated the condition to match factory.ts behavior: run initialization unless in test environment, ensuring the default organization is created for Cypress E2E tests and other CI workflows.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
Claude finished @amikofalvy's task —— View job TypeScript Staff Engineer ReviewSummary: Well-Targeted Fix with Solid Implementation ✅This PR addresses a clear CI failure by aligning initialization behavior between Review Progress
Technical Analysis✅ Strengths
⚡ Architectural Considerations
Critical Checks✅ No Security Issues
✅ Error Handling
|
Summary
initializeDefaultUserfunction was only called whenENVIRONMENT=development, but in CI the variable is not setfactory.tsbehavior)Problem
The Cypress CI was failing at the "Push Weather Example Project" step:
This happened because the
organizationtable (referenced byprojects.tenant_idforeign key) never had a row created for the default tenant.Solution
Changed the initialization condition from:
to:
This ensures the default organization is created in CI environments where
ENVIRONMENTis not explicitly set.Test plan
pnpm dev