cnabio / cnab-go

A Go implementation of CNAB Core 1.0
MIT License
69 stars 37 forks source link

fix(kubernetes): handle long installation names #159

Closed jlegrone closed 4 years ago

jlegrone commented 4 years ago

Long installation or action names currently cause the Kubernetes driver to fail because of character limits imposed by the platform (63 chars for label values and 253 chars for resource names).

This PR ensures that only valid DNS-1123 resource names less than the maximum length are generated, and uses annotations instead of labels for storing metadata about which jobs are associated with which operations.

technosophos commented 4 years ago

The current pipeline build failure is:

go get github.com/AlekSi/gocov-xml
go get -u github.com/axw/gocov/gocov
go get github.com/jstemmer/go-junit-report
go build ./...
# github.com/docker/cli/cli/config
../../docker/cli/cli/config/config.go:109:18: undefined: os.UserHomeDir
# k8s.io/client-go/transport
../../../k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:72:11: cannot convert klog.V(8) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:74:11: cannot convert klog.V(7) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:76:11: cannot convert klog.V(6) (type klog.Verbose) to type bool
# github.com/pivotal/image-relocation/pkg/image
../../pivotal/image-relocation/pkg/image/name.go:128:55: cannot use digest.dig (type "github.com/opencontainers/go-digest".Digest) as type "github.com/docker/distribution/vendor/github.com/opencontainers/go-digest".Digest in argument to reference.WithDigest
# github.com/google/go-containerregistry/pkg/logs
../../google/go-containerregistry/pkg/logs/logs.go:38:10: l.Writer undefined (type *log.Logger has no field or method Writer)
# github.com/google/go-containerregistry/vendor/github.com/docker/cli/cli/config
../../google/go-containerregistry/vendor/github.com/docker/cli/cli/config/config.go:109:18: undefined: os.UserHomeDir
Makefile:13: recipe for target 'build' failed
make: *** [build] Error 2
##[error]Bash exited with code '2'.

Is this a dependency resolution failure in CI that we are not seeing locally?

jlegrone commented 4 years ago

Is this a dependency resolution failure in CI that we are not seeing locally?

Yes; make bootstrap and make integration-test pass for me locally.