Skip to content

Commit

Permalink
Allow opting out of PULUMI_OPTIMIZED_CHECKPOINT_PATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 authored and aq17 committed Dec 6, 2022
1 parent bb1ef96 commit 590003f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/backend/httpstate/backend.go
Expand Up @@ -1798,6 +1798,15 @@ func doDetectCapabilities(ctx context.Context, d diag.Sink, client *client.Clien
d.Warningf(diag.Message("" /*urn*/, "failed to decode capabilities: %v"), err)
return capabilities{}
}

// Allow users to opt out of deltaCheckpointUpdates even if the backend indicates it should be used. This
// remains necessary while PULUMI_OPTIMIZED_CHECKPOINT_PATCH has higher memory requirements on the client and
// may cause out-of-memory issues in constrained environments.
switch strings.ToLower(os.Getenv("PULUMI_OPTIMIZED_CHECKPOINT_PATCH")) {
case "0", "false":
caps.deltaCheckpointUpdates = nil
}

return caps
}

Expand Down

0 comments on commit 590003f

Please sign in to comment.