Skip to content

Commit

Permalink
FIXME: use CommonTransportFormat archives to store OCM components
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarf committed Jan 14, 2025
1 parent 06c7d8e commit 0296603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmds/ocm/commands/ocmcmds/common/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 3 additions & 0 deletions cmds/ocm/commands/ocmcmds/components/download/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0296603

Please sign in to comment.