chore: Initial database scaffolding by kylecarbs · Pull Request #2 · coder/coder
This implements migrations and code generation for interfacing with a PostgreSQL database. A dependency is added for the "postgres" binary on the host, but that seems like an acceptable requirement considering it's our primary database. An in-memory database object can be created for simple cross-OS and fast testing.
Emyrk
mentioned this pull request
Emyrk
mentioned this pull request
Emyrk
mentioned this pull request
1 task
bpmct
mentioned this pull request
2 tasks
This was referenced
This was referenced
david-fraley added a commit that referenced this pull request
Two regressions from 8c0a1b2 that fail markdownlint and would block CI: - MD009: trailing space after the new getting-started link - MD051: stale '#2-configure-an-llm-provider' fragment in the testing section now that the experiment step is removed and Configure an LLM provider is step 1 > Coder Agent generated this commit on @david-fraley's behalf.
kylecarbs added a commit that referenced this pull request
… history Replaces the previous draft of this PR (a backend workspaces.claimed_at column plus migration plus SDK plumbing) with a frontend-only heuristic per Cian's review. The /agents archive-and-delete molly-guard previously compared workspace.created_at against chat.created_at to decide whether to require typing the workspace name. ClaimPrebuiltWorkspace never updates workspace.created_at, so claimed prebuilds always looked pre-existing and the dialog misfired. Build history already records the truth: build #1's initiator is the prebuilds system user iff the workspace was a prebuild, and build #2 is the claim. Compute that in the resolver and compare its created_at against the chat. From-scratch workspaces fall through to workspace.created_at as before. The prebuilds system user UUID is hardcoded on the frontend; it lives in coderd/database/constants.go on the backend and has not changed since the prebuild feature shipped. If it ever moves, both sides have to move together. 🤖 Generated with the help of Coder Agents.
This was referenced
bpmct added a commit that referenced this pull request
mafredri added a commit that referenced this pull request
waitForTaskIdle used time.NewTicker(5s) which delays the first poll by 5 seconds. Debugger tracing proved the failure mechanism: on slow CI (Windows), the first poll at 5s sees "working" (idle patch has not landed due to goroutine scheduling), needs poll #2 at 10s, but the 25s context expires before it fires. Two changes: 1. Use r.clock.NewTicker (quartz) with time.Nanosecond initial interval and Reset(5s) for immediate first poll. Tests inject a mock clock via clitest.NewWithClock for deterministic control. 2. Rewrite WaitsForWorkingAppState test with quartz traps (NewTicker + TickerReset) for deterministic synchronization instead of racing goroutines. Fix PausedDuringWaitForReady sync point. Closes https://linear.app/codercom/issue/DEVEX-381
mafredri added a commit that referenced this pull request
waitForTaskIdle used time.NewTicker(5s) which delays the first poll by 5 seconds. Debugger tracing proved the failure mechanism: on slow CI (Windows), the first poll at 5s sees "working" (idle patch has not landed due to goroutine scheduling), needs poll #2 at 10s, but the 25s context expires before it fires. Two changes: 1. Use r.clock.NewTicker (quartz) with time.Nanosecond initial interval and Reset(5s) for immediate first poll. Tests inject a mock clock via clitest.NewWithClock for deterministic control. 2. Rewrite WaitsForWorkingAppState test with quartz traps (NewTicker + TickerReset) for deterministic synchronization instead of racing goroutines. Fix PausedDuringWaitForReady sync point. Closes https://linear.app/codercom/issue/DEVEX-381
mafredri added a commit that referenced this pull request
#25648) waitForTaskIdle used time.NewTicker(5s) which delays the first poll by 5 seconds. Debugger tracing proved the failure mechanism: on slow CI (Windows), the first poll at 5s sees "working" (idle patch has not landed due to goroutine scheduling), needs poll #2 at 10s, but the 25s context expires before it fires. Two changes: 1. Use r.clock.NewTicker (quartz) with time.Nanosecond initial interval and Reset(5s) for immediate first poll. Tests inject a mock clock via clitest.NewWithClock for deterministic control. 2. Rewrite WaitsForWorkingAppState test with quartz traps (NewTicker + TickerReset) for deterministic synchronization instead of racing goroutines. Fix PausedDuringWaitForReady sync point. Closes DEVEX-381
tracyjohnsonux added a commit that referenced this pull request
…PR tab for demo Hardcodes 'fix: increase icon sizes for wcag 2.2 compliance' (PR #2 from coder-ux-prototypes) as a second PR tab in the dropdown to demonstrate multi-PR switching UI. The extra tab reuses the remote diff content panel.
bpmct
mentioned this pull request
f0ssel pushed a commit that referenced this pull request
…#26296) Backport of #26204 (commit b5ef700) to `release/2.34` Replace RequestHost with httpmw.EffectiveHost, which honors X-Forwarded-Host only when the original socket peer is a configured trusted origin, otherwise falling back to the received Host header. Cherry-pick was clean; tests pass on this branch. > [!NOTE] > Breaking change. See the original PR for the breaking-change details.