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

Fixes for upcoming issues during demo preparation + improvements discovered during execution of the demo flow #78

Merged
merged 18 commits into from
Sep 7, 2022
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
8 changes: 7 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ linters:

linters-settings:
gci:
local-prefixes: github.com/open-component-model/ocm
sections:
- standard
- blank
- dot
- default
- prefix(github.com/open-component-model/ocm)
custom-order: true
staticcheck:
go: "1.18"
stylecheck:
Expand Down
5 changes: 3 additions & 2 deletions cmds/ocm/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
"fmt"
"strings"

_ "github.com/open-component-model/ocm/pkg/contexts/clictx/config"
_ "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs"

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

Expand Down Expand Up @@ -53,12 +56,10 @@ import (
"github.com/open-component-model/ocm/pkg/cobrautils"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
_ "github.com/open-component-model/ocm/pkg/contexts/clictx/config"
"github.com/open-component-model/ocm/pkg/contexts/credentials"
"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"
_ "github.com/open-component-model/ocm/pkg/contexts/ocm/attrs"
"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/version"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/misccmds/credentials/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ 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/common"
"github.com/open-component-model/ocm/pkg/contexts/credentials"
"github.com/open-component-model/ocm/pkg/contexts/oci/identity"
Expand Down
3 changes: 2 additions & 1 deletion cmds/ocm/commands/misccmds/rsakeypair/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"

"github.com/opencontainers/go-digest"

. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/signing/handlers/rsa"
)

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/artefacts/download/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ 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/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/oci/grammar"
"github.com/open-component-model/ocm/pkg/contexts/oci/repositories/artefactset"
Expand Down
3 changes: 2 additions & 1 deletion cmds/ocm/commands/ocicmds/artefacts/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"

"github.com/sirupsen/logrus"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocicmds/common/handlers/artefacthdlr"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/oci/artdesc"
"github.com/open-component-model/ocm/pkg/mime"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/artefacts/transfer/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ 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/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/oci/repositories/ctf"
"github.com/open-component-model/ocm/pkg/mime"
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/ctf/create/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package create_test
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/oci/repositories/ctf"
)

Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocicmds/tags/show/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ 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/common/accessio"
"github.com/open-component-model/ocm/pkg/mime"
)
Expand Down
9 changes: 5 additions & 4 deletions cmds/ocm/commands/ocmcmds/common/inputs/inputtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/modern-go/reflect2"
"k8s.io/apimachinery/pkg/util/validation/field"

"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/datacontext"
Expand All @@ -35,7 +36,7 @@ import (
type InputSpec interface {
runtime.VersionedTypedObject
Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath string) field.ErrorList
GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error)
GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error)
}
type InputType interface {
runtime.TypedObjectDecoder
Expand Down Expand Up @@ -175,7 +176,7 @@ func (r *UnknownInputSpec) Validate(fldPath *field.Path, ctx clictx.Context, inp
return field.ErrorList{field.Invalid(fldPath.Child("type"), r.GetType(), "unknown type")}
}

func (r *UnknownInputSpec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (r *UnknownInputSpec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
return nil, "", errors.ErrUnknown("input type", r.GetType())
}

Expand Down Expand Up @@ -228,15 +229,15 @@ func (s *GenericInputSpec) Validate(fldPath *field.Path, ctx clictx.Context, inp
return s.effective.Validate(fldPath, ctx, inputFilePath)
}

func (s *GenericInputSpec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (s *GenericInputSpec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
if s.effective == nil {
var err error
s.effective, err = s.Evaluate(For(ctx))
if err != nil {
return nil, "", err
}
}
return s.effective.GetBlob(ctx, inputFilePath)
return s.effective.GetBlob(ctx, nv, inputFilePath)
}

func (s *GenericInputSpec) Evaluate(scheme InputTypeScheme) (InputSpec, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/mime"
Expand Down Expand Up @@ -70,7 +71,7 @@ func (s *Spec) Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath s
return allErrs
}

func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (s *Spec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
fs := ctx.FileSystem()
inputInfo, inputPath, err := inputs.FileInfo(ctx, s.Path, inputFilePath)
if err != nil {
Expand All @@ -94,7 +95,7 @@ func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.Tempo
defer temp.Close()

if s.Compress() {
s.SetMediaTypeIfNotDefined(mime.MIME_GZIP)
s.SetMediaTypeIfNotDefined(mime.MIME_TGZ)
gw := gzip.NewWriter(temp.Writer())
if err := tarutils.TarFileSystem(fs, inputPath, gw, opts); err != nil {
return nil, "", fmt.Errorf("unable to tar input artifact: %w", err)
Expand Down
11 changes: 9 additions & 2 deletions cmds/ocm/commands/ocmcmds/common/inputs/types/docker/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
package docker

import (
"fmt"

"k8s.io/apimachinery/pkg/util/validation/field"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/oci/repositories/artefactset"
Expand Down Expand Up @@ -50,7 +53,7 @@ func (s *Spec) Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath s
return allErrs
}

func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (s *Spec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
locator, version, err := docker.ParseGenericRef(s.Path)
if err != nil {
return nil, "", err
Expand All @@ -65,9 +68,13 @@ func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.Tempo
return nil, "", err
}

if version == "" || version == "latest" {
version = nv.GetVersion()
}
blob, err := artefactset.SynthesizeArtefactBlob(ns, version)
if err != nil {
return nil, "", err
}
return blob, locator, nil
hint := fmt.Sprintf("%s/%s:%s", nv.GetName(), locator, version)
return blob, hint, nil
}
5 changes: 3 additions & 2 deletions cmds/ocm/commands/ocmcmds/common/inputs/types/file/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
)
Expand All @@ -39,6 +40,6 @@ func (s *Spec) Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath s
return (&ProcessSpec{s.MediaFileSpec, nil}).Validate(fldPath, ctx, inputFilePath)
}

func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
return (&ProcessSpec{s.MediaFileSpec, nil}).GetBlob(ctx, inputFilePath)
func (s *Spec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
return (&ProcessSpec{s.MediaFileSpec, nil}).GetBlob(ctx, nv, inputFilePath)
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/errors"
Expand All @@ -46,7 +47,7 @@ func (s *ProcessSpec) Validate(fldPath *field.Path, ctx clictx.Context, inputFil
return allErrs
}

func (s *ProcessSpec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (s *ProcessSpec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
fs := ctx.FileSystem()
inputInfo, inputPath, err := inputs.FileInfo(ctx, s.Path, inputFilePath)
if err != nil {
Expand Down
15 changes: 13 additions & 2 deletions cmds/ocm/commands/ocmcmds/common/inputs/types/helm/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
package helm

import (
"fmt"

"k8s.io/apimachinery/pkg/util/validation/field"

"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/contexts/oci/ociutils/helm"
Expand Down Expand Up @@ -54,7 +57,7 @@ func (s *Spec) Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath s
return allErrs
}

func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
func (s *Spec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
_, inputPath, err := inputs.FileInfo(ctx, s.Path, inputFilePath)
if err != nil {
return nil, "", err
Expand All @@ -67,9 +70,17 @@ func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.Tempo
if s.Version != "" {
vers = s.Version
}
if vers == "" {
vers = nv.GetVersion()
}
blob, err := helm.SynthesizeArtefactBlob(inputPath, ctx.FileSystem())
if err != nil {
return nil, "", err
}
return blob, chart.Metadata.Name + ":" + vers, err
name := chart.Name()
hint := fmt.Sprintf("%s/%s:%s", nv.GetName(), name, vers)
if name == "" {
hint = fmt.Sprintf("%s:%s", nv.GetName(), vers)
}
return blob, hint, err
}
5 changes: 3 additions & 2 deletions cmds/ocm/commands/ocmcmds/common/inputs/types/spiff/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/cpi"
"github.com/open-component-model/ocm/cmds/ocm/commands/ocmcmds/common/inputs/types/file"
"github.com/open-component-model/ocm/pkg/common"
"github.com/open-component-model/ocm/pkg/common/accessio"
"github.com/open-component-model/ocm/pkg/contexts/clictx"
"github.com/open-component-model/ocm/pkg/errors"
Expand Down Expand Up @@ -75,8 +76,8 @@ func (s *Spec) Validate(fldPath *field.Path, ctx clictx.Context, inputFilePath s
return allErrs
}

func (s *Spec) GetBlob(ctx clictx.Context, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
return (&file.ProcessSpec{s.MediaFileSpec, s.process}).GetBlob(ctx, inputFilePath)
func (s *Spec) GetBlob(ctx clictx.Context, nv common.NameVersion, inputFilePath string) (accessio.TemporaryBlobAccess, string, error) {
return (&file.ProcessSpec{s.MediaFileSpec, s.process}).GetBlob(ctx, nv, inputFilePath)
}

func (s *Spec) process(ctx clictx.Context, inputFilePath string, data []byte) ([]byte, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ package spiff_test
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/cmds/ocm/commands/ocmcmds/common/inputs/types/spiff"
. "github.com/open-component-model/ocm/cmds/ocm/testhelper"
"github.com/open-component-model/ocm/pkg/common"
)

var _ = Describe("spiff processing", func() {
var env *TestEnv

nv := common.NewNameVersion("test", "v1")
BeforeEach(func() {
env = NewTestEnv(TestData())
})
Expand All @@ -36,7 +38,7 @@ var _ = Describe("spiff processing", func() {
It("processes template", func() {
spec, err := spiff.New("test1.yaml", "", false, nil)
Expect(err).To(Succeed())
blob, s, err := spec.GetBlob(env.Context, "/testdata/dummy")
blob, s, err := spec.GetBlob(env.Context, nv, "/testdata/dummy")
Expect(err).To(Succeed())
Expect(s).To(Equal(""))
data, err := blob.Get()
Expand All @@ -49,7 +51,7 @@ bob: 25
It("processes template with values", func() {
spec, err := spiff.New("test1.yaml", "", false, map[string]interface{}{"diff": 2})
Expect(err).To(Succeed())
blob, s, err := spec.GetBlob(env.Context, "/testdata/dummy")
blob, s, err := spec.GetBlob(env.Context, nv, "/testdata/dummy")
Expect(err).To(Succeed())
Expect(s).To(Equal(""))
data, err := blob.Get()
Expand All @@ -62,7 +64,7 @@ bob: 26
It("processes template with values with local working directory", func() {
spec, err := spiff.New("test.yaml", "", false, map[string]interface{}{"diff": 2})
Expect(err).To(Succeed())
blob, s, err := spec.GetBlob(env.Context, "/testdata/subdir/dummy")
blob, s, err := spec.GetBlob(env.Context, nv, "/testdata/subdir/dummy")
Expect(err).To(Succeed())
Expect(s).To(Equal(""))
data, err := blob.Get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (o *Option) getResolver(ctx clictx.OCM, session ocm.Session) (ocm.Component
if err != nil {
return nil, err
}
resolvers = append(resolvers, ocm.NewSessionBasedResolver(session, r))
resolvers = append(resolvers, r)
}
return ocm.NewCompoundResolver(resolvers...), nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func New(sign bool) *Option {
type Option struct {
rootca []string

local bool
SignMode bool
signAlgorithm string
hashAlgorithm string
Expand Down Expand Up @@ -82,7 +83,9 @@ func (o *Option) AddFlags(fs *pflag.FlagSet) {
fs.StringVarP(&o.hashAlgorithm, "hash", "H", sha256.Algorithm, "hash algorithm")
fs.StringVarP(&o.Issuer, "issuer", "I", "", "issuer name")
fs.BoolVarP(&o.Update, "update", "", o.SignMode, "update digest in component versions")
fs.BoolVarP(&o.Recursively, "recursive", "R", o.SignMode, "recursively sign component versions")
fs.BoolVarP(&o.Recursively, "recursive", "R", false, "recursively sign component versions")
} else {
fs.BoolVarP(&o.local, "local", "L", false, "verification based on information found in component versions, only")
}
fs.BoolVarP(&o.Verify, "verify", "V", o.SignMode, "verify existing digests")
fs.StringArrayVarP(&o.rootca, "ca-cert", "", o.rootca, "Additional root certificates")
Expand Down Expand Up @@ -125,7 +128,10 @@ func (o *Option) Complete(ctx clictx.Context) error {
if o.Hasher == nil {
return errors.ErrUnknown(compdesc.KIND_HASH_ALGORITHM, o.hashAlgorithm)
}
} else {
o.Recursively = !o.local
}

err := o.handleKeys(ctx, "public key", o.publicKeys, o.Keys.RegisterPublicKey)
if err != nil {
return err
Expand Down
Loading