Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .server-changes/fix-resume-user-paused-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: fix
---

Fixed manually paused environments not being resumable. Resuming incorrectly failed with a billing-limit error even when no billing limit was in effect.
7 changes: 6 additions & 1 deletion apps/webapp/app/v3/services/pauseEnvironment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ export class PauseEnvironmentService extends WithRunEngine {
const resumed = await this._prisma.runtimeEnvironment.updateMany({
where: {
id: environment.id,
NOT: { pauseSource: EnvironmentPauseSource.BILLING_LIMIT },
// NOT on a nullable field excludes NULL rows in Prisma, which made
// user-paused envs (pauseSource null) unresumable.
OR: [
{ pauseSource: null },
{ NOT: { pauseSource: EnvironmentPauseSource.BILLING_LIMIT } },
],
},
data: {
paused: false,
Expand Down