Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable using session with unmarshalable repository specs #512

Merged
merged 4 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmds/ocm/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ import (
"strings"
"unicode"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/keyoption"
_ "github.com/open-component-model/ocm/pkg/contexts/clictx/config"
_ "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs"
"github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/signingattr"
"github.com/open-component-model/ocm/pkg/signing"

"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/commands/cachecmds"
"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/keyoption"
"github.com/open-component-model/ocm/cmds/ocm/commands/misccmds/action"
creds "github.com/open-component-model/ocm/cmds/ocm/commands/misccmds/credentials"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocicmds"
Expand Down Expand Up @@ -69,10 +67,12 @@ import (
"github.com/open-component-model/ocm/pkg/contexts/datacontext"
"github.com/open-component-model/ocm/pkg/contexts/datacontext/attrs/vfsattr"
datacfg "github.com/open-component-model/ocm/pkg/contexts/datacontext/config/attrs"
"github.com/open-component-model/ocm/pkg/contexts/ocm/attrs/signingattr"
"github.com/open-component-model/ocm/pkg/contexts/ocm/registration"
"github.com/open-component-model/ocm/pkg/contexts/ocm/utils"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/out"
"github.com/open-component-model/ocm/pkg/signing"
"github.com/open-component-model/ocm/pkg/version"
)

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/common/options/keyoption/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"encoding/base64"
"strings"

"github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
ocmsign "github.com/open-component-model/ocm/pkg/contexts/ocm/signing"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/signing"
"github.com/open-component-model/ocm/pkg/utils"
)

func From(o options.OptionSetProvider) *Option {
Expand Down
5 changes: 3 additions & 2 deletions cmds/ocm/commands/misccmds/action/execute/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
"strings"

"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/names"
"github.com/open-component-model/ocm/cmds/ocm/commands/verbs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
Expand All @@ -20,8 +23,6 @@ import (
"github.com/open-component-model/ocm/pkg/out"
"github.com/open-component-model/ocm/pkg/runtime"
utils2 "github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/hash/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"strings"

"github.com/mandelsoft/vfs/pkg/vfs"
utils2 "github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

Expand All @@ -23,6 +22,7 @@ import (
"github.com/open-component-model/ocm/pkg/out"
"github.com/open-component-model/ocm/pkg/signing"
"github.com/open-component-model/ocm/pkg/signing/handlers/rsa"
utils2 "github.com/open-component-model/ocm/pkg/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/rsakeypair/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

parse "github.com/mandelsoft/spiff/dynaml/x509"
"github.com/mandelsoft/vfs/pkg/vfs"
utils2 "github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

Expand All @@ -26,6 +25,7 @@ import (
"github.com/open-component-model/ocm/pkg/out"
"github.com/open-component-model/ocm/pkg/signing"
"github.com/open-component-model/ocm/pkg/signing/handlers/rsa"
utils2 "github.com/open-component-model/ocm/pkg/utils"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ package artifacthdlr
import (
"strings"

"github.com/open-component-model/ocm/pkg/generics"
"github.com/opencontainers/go-digest"

"github.com/open-component-model/ocm/cmds/ocm/pkg/output"
"github.com/open-component-model/ocm/cmds/ocm/pkg/processing"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/generics"
)

func Attachment(d digest.Digest, suffix string) string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package comp
import (
"fmt"

"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
. "github.com/open-component-model/ocm/pkg/finalizer"

"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common"
Expand All @@ -17,6 +17,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/addhdlrs/rscs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/addhdlrs/srcs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/ocm"
Expand Down
4 changes: 2 additions & 2 deletions cmds/ocm/commands/ocmcmds/common/addhdlrs/rscs/elements.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ package rscs
import (
"fmt"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/skipdigestoption"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/validation/field"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/addhdlrs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/skipdigestoption"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/ocm"
"github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/common/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (

"github.com/mandelsoft/vfs/pkg/osfs"
"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/open-component-model/ocm/pkg/utils"
"sigs.k8s.io/yaml"

metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/utils"
)

func gkind(kind ...string) string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"strings"

"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/pflag"
"sigs.k8s.io/yaml"

"github.com/open-component-model/ocm/pkg/cobrautils/flag"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/utils"
)

type Registration struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"encoding/json"

"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/open-component-model/ocm/pkg/utils"

"github.com/open-component-model/ocm/pkg/common/accessio"
cfgcpi "github.com/open-component-model/ocm/pkg/contexts/config/cpi"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/runtime"
"github.com/open-component-model/ocm/pkg/utils"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package scriptoption

import (
"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
Expand All @@ -15,6 +14,7 @@ import (
"github.com/open-component-model/ocm/pkg/contexts/ocm/transfer/transferhandler"
"github.com/open-component-model/ocm/pkg/contexts/ocm/transfer/transferhandler/spiff"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/utils"
)

func From(o options.OptionSetProvider) *Option {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"crypto/x509"
"strings"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/keyoption"
"github.com/open-component-model/ocm/pkg/utils"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/keyoption"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/hashoption"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/open-component-model/ocm/pkg/signing"
"github.com/open-component-model/ocm/pkg/signing/handlers/rsa"
"github.com/open-component-model/ocm/pkg/signing/hasher/sha256"
"github.com/open-component-model/ocm/pkg/utils"
)

func From(o options.OptionSetProvider) *Option {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package skipdigestoption

import (
"github.com/open-component-model/ocm/pkg/contexts/ocm"
"github.com/spf13/pflag"

"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/pkg/cobrautils/flag"
"github.com/open-component-model/ocm/pkg/contexts/ocm"
)

func From(o options.OptionSetProvider) *Option {
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/common/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"fmt"

_ "github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/types"
"github.com/open-component-model/ocm/pkg/generics"

"github.com/mandelsoft/vfs/pkg/vfs"
"github.com/spf13/pflag"
Expand All @@ -33,6 +32,7 @@ import (
"github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc"
"github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch"
"github.com/open-component-model/ocm/pkg/errors"
"github.com/open-component-model/ocm/pkg/generics"
"github.com/open-component-model/ocm/pkg/logging"
"github.com/open-component-model/ocm/pkg/mime"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package transfer

import (
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/spf13/cobra"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/formatoption"
Expand All @@ -17,6 +16,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/srcbyvalueoption"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/names"
"github.com/open-component-model/ocm/cmds/ocm/commands/verbs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/add/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"

"github.com/mandelsoft/vfs/pkg/vfs"
topicocmlabels "github.com/open-component-model/ocm/cmds/ocm/topics/ocm/labels"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

Expand All @@ -25,6 +24,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/names"
"github.com/open-component-model/ocm/cmds/ocm/commands/verbs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
topicocmlabels "github.com/open-component-model/ocm/cmds/ocm/topics/ocm/labels"
common2 "github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/add/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
"github.com/open-component-model/ocm/pkg/contexts/ocm/valuemergehandler/handlers/defaultmerge"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
Expand All @@ -23,6 +22,7 @@ import (
metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
"github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/ctf"
"github.com/open-component-model/ocm/pkg/contexts/ocm/resourcetypes"
"github.com/open-component-model/ocm/pkg/contexts/ocm/valuemergehandler/handlers/defaultmerge"
"github.com/open-component-model/ocm/pkg/mime"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/contexts/ocm/resourcetypes"
. "github.com/open-component-model/ocm/pkg/contexts/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"

Expand All @@ -20,6 +19,7 @@ import (
metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
"github.com/open-component-model/ocm/pkg/contexts/ocm/grammar"
"github.com/open-component-model/ocm/pkg/contexts/ocm/repositories/comparch"
"github.com/open-component-model/ocm/pkg/contexts/ocm/resourcetypes"
"github.com/open-component-model/ocm/pkg/mime"
)

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/hash/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc"
. "github.com/open-component-model/ocm/pkg/testutils"

"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc"
metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
"github.com/open-component-model/ocm/pkg/contexts/ocm/resourcetypes"
"github.com/open-component-model/ocm/pkg/mime"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/components/transfer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package transfer
import (
"fmt"

"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/spf13/cobra"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/closureoption"
Expand All @@ -27,6 +26,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/versionconstraintsoption"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/names"
"github.com/open-component-model/ocm/cmds/ocm/commands/verbs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/cmds/ocm/pkg/output"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
"github.com/open-component-model/ocm/pkg/common"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
. "github.com/open-component-model/ocm/pkg/contexts/oci/testhelper"
. "github.com/open-component-model/ocm/pkg/testutils"
"github.com/open-component-model/ocm/pkg/utils"

"github.com/spf13/cobra"

Expand All @@ -31,6 +30,7 @@ import (
"github.com/open-component-model/ocm/pkg/contexts/ocm/resourcetypes"
handlercfg "github.com/open-component-model/ocm/pkg/contexts/ocm/transfer/transferhandler/config"
"github.com/open-component-model/ocm/pkg/mime"
"github.com/open-component-model/ocm/pkg/utils"
)

const ARCH = "/tmp/ctf"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/ctf/transfer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package transfer

import (
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/spf13/cobra"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/closureoption"
Expand All @@ -22,6 +21,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/options/uploaderoption"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/names"
"github.com/open-component-model/ocm/cmds/ocm/commands/verbs"
"github.com/open-component-model/ocm/cmds/ocm/pkg/options"
"github.com/open-component-model/ocm/cmds/ocm/pkg/utils"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessobj"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/resources/get/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package get

import (
"github.com/open-component-model/ocm/pkg/generics"
"github.com/spf13/cobra"

"github.com/open-component-model/ocm/cmds/ocm/commands/common/options/closureoption"
Expand All @@ -23,6 +22,7 @@ import (
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/ocm"
metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
"github.com/open-component-model/ocm/pkg/generics"
)

var (
Expand Down
Loading