Skip to content

Commit f681927

Browse files
committed
Don't stop deploy when snapshot is not created
1 parent 0eed91b commit f681927

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

bundle/statemgmt/upload_state_for_yaml_sync.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ func (m *uploadStateForYamlSync) Apply(ctx context.Context, b *bundle.Bundle) di
5555
_, snapshotPath := b.StateFilenameConfigSnapshot(ctx)
5656

5757
created, diags := m.convertState(ctx, b, snapshotPath)
58-
if diags.HasError() || !created {
59-
return diags
58+
if diags.HasError() {
59+
return diag.Warningf("Failed to create config snapshot: %v", diags.Error())
60+
}
61+
if !created {
62+
return nil
6063
}
6164

6265
err := uploadState(ctx, b)
6366
if err != nil {
64-
return diags.Extend(diag.Warningf("Failed to upload config snapshot to workspace: %v", err))
67+
return diag.Warningf("Failed to upload config snapshot to workspace: %v", err)
6568
}
6669

6770
log.Infof(ctx, "Config snapshot created at %s", snapshotPath)

0 commit comments

Comments
 (0)