Skip to content

Commit e6b39ea

Browse files
committed
Warn when deletion errors are ignored without deployment history
1 parent 7d1eb61 commit e6b39ea

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎acceptance/bundle/destroy/summary-on-error/output.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The following resources will be deleted:
6868

6969
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-destroy-summary-on-error/default
7070

71+
Warn: destroying resources.jobs.job_01: Ignoring error when deleting resources.jobs.job_01 id=[JOB_01_ID_3]: Fault injected by test.
7172
Destroy: 2 deleted, 1 removed from state
7273

7374
>>> [CLI] jobs get [JOB_01_ID_3]

‎acceptance/bundle/resources/materialization_sets/settled_failure/output.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ Deleting a Feature View that a FeatureSpec serves is not blocked, and leaves the
5555

5656
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-matset-settled-[UNIQUE_NAME]/default
5757

58+
Warn: destroying resources.materialization_sets.set1: Ignoring error when deleting resources.materialization_sets.set1 id=[UUID][0]: materialization set [UUID][0]: operation failed: [INTERNAL_ERROR] Deleted 0 of 2 materialized features in materialization set '[UUID][0]'. The operation's progress lists which deletion succeeded, which failed and why.; members left unchanged: [UUID][1] (INTERNAL_ERROR): Failed to delete materialized feature '[UUID][1]'. If the issue persists, please retry or contact support.; [UUID][2] (INTERNAL_ERROR): Failed to delete materialized feature '[UUID][2]'. If the issue persists, please retry or contact support.
5859
Destroy: 2 deleted, 1 removed from state

‎bundle/direct/apply.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ func (d *DeploymentUnit) Delete(ctx context.Context, db *dstate.DeploymentState,
268268
}
269269

270270
err = d.Adapter.DoDelete(ctx, oldID, oldState)
271+
// A parent-managed resource may remain if its parent is kept or fails to delete.
271272
unbound := isManagedByParent(err)
272273
if err != nil && !apierr.IsMissing(err) && !isManagedByParent(err) {
273274
// Rather than failing delete and requiring user to unbind, we perform unbind automatically there.
@@ -286,6 +287,7 @@ func (d *DeploymentUnit) Delete(ctx context.Context, db *dstate.DeploymentState,
286287
return err
287288
} else {
288289
unbound = true
290+
log.Warnf(ctx, "Ignoring error when deleting %s id=%s: %s", d.ResourceKey, oldID, err)
289291
}
290292
}
291293

0 commit comments

Comments
 (0)