From 0296603c824b3883e81a3f6d665937f5fbe59caf Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Tue, 14 Jan 2025 16:25:39 +0100 Subject: [PATCH] FIXME: use CommonTransportFormat archives to store OCM components --- cmds/ocm/commands/ocmcmds/common/resources.go | 3 +++ cmds/ocm/commands/ocmcmds/components/download/cmd.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmds/ocm/commands/ocmcmds/common/resources.go b/cmds/ocm/commands/ocmcmds/common/resources.go index 63c1d63c44..9886b15ad6 100644 --- a/cmds/ocm/commands/ocmcmds/common/resources.go +++ b/cmds/ocm/commands/ocmcmds/common/resources.go @@ -456,10 +456,13 @@ func (o *ResourceAdderCommand) ProcessResourceDescriptions() error { return addhdlrs.PrintElements(printer, elems, dr.Outfile, o.Context.FileSystem()) } + // FIXME: use CommonTransportFormat archives to store OCM components + //nolint:staticcheck // Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489 obj, err := comparch.Open(o.Context.OCMContext(), accessobj.ACC_WRITABLE, o.Archive, 0, accessio.PathFileSystem(fs)) if err != nil { return err } + //nolint:staticcheck // Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489 defer obj.Close() return ProcessElements(ictx, obj, elems, o.Handler) } diff --git a/cmds/ocm/commands/ocmcmds/components/download/cmd.go b/cmds/ocm/commands/ocmcmds/components/download/cmd.go index 1254cf7b57..71ac2a8d7f 100644 --- a/cmds/ocm/commands/ocmcmds/components/download/cmd.go +++ b/cmds/ocm/commands/ocmcmds/components/download/cmd.go @@ -134,10 +134,13 @@ func (d *action) Save(o *comphdlr.Object, f string) (err error) { } format := formatoption.From(d.cmd) + // FIXME: use CommonTransportFormat archives to store OCM components + //nolint:staticcheck // Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489 set, err := comparch.Create(d.cmd.OCMContext(), accessobj.ACC_CREATE, f, format.Mode(), format.Format, accessio.PathFileSystem(dest.PathFilesystem)) if err != nil { return err } + //nolint:staticcheck // Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489 defer errors.PropagateError(&err, set.Close) nv := common.VersionedElementKey(src)