fix: make postgres port configurable for WSL2 compatibility#28478
Open
Felipeness wants to merge 4 commits intocalcom:mainfrom
Open
fix: make postgres port configurable for WSL2 compatibility#28478Felipeness wants to merge 4 commits intocalcom:mainfrom
Felipeness wants to merge 4 commits intocalcom:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="turbo.json">
<violation number="1" location="turbo.json:49">
P2: `DATABASE_PORT` was added to `globalEnv`, which makes it part of the hash for all Turbo tasks even though it appears to be only needed for local Prisma/docker-compose flows. This can unnecessarily reduce cache reuse across unrelated tasks.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="turbo.json">
<violation number="1" location="turbo.json:338">
P2: `DATABASE_PORT` is only exposed to `@calcom/prisma#db-up`, but `@calcom/prisma#db-reset` also shells into `db-up` via nested scripts and will lose the variable in Turbo strict mode, causing fallback to default port.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Author
|
@cubic-dev-ai addressed your feedback — moved DATABASE_PORT from globalEnv to task-specific env for db-up and db-reset. Should fix both the cache reuse concern and the strict mode variable loss. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DATABASE_PORTenv var inpackages/prisma/docker-compose.yml5450for backward compatibility (${DATABASE_PORT:-5450}:5432)DATABASE_PORTentry in.env.examplewith WSL2 troubleshooting contextdocker-compose.ymlalready uses${REDIS_PORT:-6379}:6379for RedisFixes #28395
Root cause
Docker Desktop on WSL2 has a known issue where its port-forwarding proxy retains stale reservations after unclean container exits. Since Cal.com hardcodes port 5450, users cannot work around the conflict without modifying tracked files. The error manifests as:
Test plan
yarn dxworks with default config (noDATABASE_PORTset) — port 5450 usedyarn dxworks withDATABASE_PORT=5451set in.env— port 5451 used.env.examplehas clear documentation about when to useDATABASE_PORT