Skip to content

Commit 3b63a35

Browse files
committed
Report partial errors
1 parent 61dfcbc commit 3b63a35

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

pkg/modprovider/module.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,8 @@ func (h *moduleHandler) applyModuleOperation(
278278
}
279279

280280
if applyErr != nil {
281-
// TODO[pulumi/pulumi-terraform-module#342] Possibly wrap partial errors in initializationError. This
282-
// does not quite work as expected yet as views get recorded into state as pending_operations. They
283-
// need to be recorded as finalized operations because they did complete.
284-
if 1+2 == 4 {
285-
applyErr = h.initializationError(moduleOutputs, applyErr.Error())
286-
}
287-
288-
// Instead, log and propagate the error for now. This will forget partial TF state but fail Pulumi.
289-
logger.Log(ctx, tfsandbox.Error, fmt.Sprintf("partial failure in apply: %v", applyErr))
281+
// we have a partial error, wrap it with ErrorResourceInitFailed
282+
applyErr = h.initializationError(moduleOutputs, applyErr.Error())
290283
}
291284

292285
return moduleOutputs, views, applyErr

tests/acc_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ func TestLambdaMemorySizeDiff(t *testing.T) {
245245
func TestPartialApply(t *testing.T) {
246246
t.Parallel()
247247

248-
t.Skip("TODO[pulumi/pulumi#19635]")
249-
250248
var debugOpts debug.LoggingOptions
251249

252250
// To enable debug logging in this test, un-comment:

0 commit comments

Comments
 (0)