From d40d73c696a9e1e53c2fa3cc5d63917cccd6a68e Mon Sep 17 00:00:00 2001 From: mitchell Date: Wed, 16 Apr 2025 10:53:29 -0400 Subject: [PATCH] Log a warning if a depot artifact to undeploy does not exist. Do not error out. --- pkg/runtime/depot.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/runtime/depot.go b/pkg/runtime/depot.go index b943538dff..fa7d457c38 100644 --- a/pkg/runtime/depot.go +++ b/pkg/runtime/depot.go @@ -331,7 +331,11 @@ func (d *depot) Undeploy(id strfmt.UUID, relativeSrc, path string) error { // Perform uninstall based on deployment type if err := smartlink.UnlinkContents(filepath.Join(d.Path(id), relativeSrc), path); err != nil { - return errs.Wrap(err, "failed to unlink artifact") + if os.IsNotExist(err) { + logging.Warning("artifact no longer exists: %s", filepath.Join(d.Path(id), relativeSrc)) + } else { + return errs.Wrap(err, "failed to unlink artifact") + } } // Re-link or re-copy any files provided by other artifacts.