juju / charmstore

The charm store server.
http://gopkg.in/juju/charmstore.v5
GNU Affero General Public License v3.0
15 stars 37 forks source link

Can't uploaded serviceless charms to jaas.ai #896

Closed knkski closed 4 years ago

knkski commented 4 years ago

I am trying to upload a charm with a metadata.yaml that contains this snippet:

deployment:
  type: stateless
  service: omit

The upload is failing due to rejecting the service: omit part:

$ charm --debug push ~/charms/builds/pipelines-scheduledworkflow cs:~kubeflow-charmers/pipelines-scheduledworkflow --resource oci-image=gcr.io/ml-pipeline/scheduledworkflow:0.1.23
13:29:10 DEBUG juju.charm charmdir.go:389 charm is not in revision control directory
13:29:10 DEBUG httpbakery logger.go:28 client do GET https://api.jujucharms.com/charmstore/v5/delegatable-macaroon {
13:29:11 INFO  httpbakery logger.go:33 HTTP response OK (status 200 OK)
13:29:11 DEBUG httpbakery logger.go:28 } -> error <nil>
13:29:11 DEBUG httpbakery logger.go:28 client do POST https://api.jujucharms.com/charmstore/v5/~kubeflow-charmers/pipelines-scheduledworkflow/archive?hash=6028294b7c275c428de9b94cdc2cda9d94dd96cc622e21940d40c3c6fb7270141f714962a688d1c34038fdd2ce33315d {
13:29:12 INFO  httpbakery logger.go:33 HTTP response OK (status 500 Internal Server Error)
13:29:12 DEBUG httpbakery logger.go:28 } -> error <nil>
ERROR cannot post archive: cannot read charm archive: metadata: deployment.service: unexpected value "omit"
13:29:12 DEBUG cmd supercommand.go:475 error stack: 
cannot read charm archive: metadata: deployment.service: unexpected value "omit"
gopkg.in/juju/charmrepo.v4/csclient/csclient.go:864: cannot post archive
github.com/juju/charmstore-client/cmd/charm/charmcmd/push.go:174:

I'm not sure why it's getting rejected, since I've successfully pushed other charms up with that snippet in them before:

https://api.jujucharms.com/charmstore/v5/~kubeflow-charmers/argo-controller-57/archive/metadata.yaml

cmars commented 4 years ago

@mhilton This looks like it might be a regression. Did we recently update the charmstore? Perhaps that build is missing the Deployment field from charm.Meta?

camille-rodriguez commented 4 years ago

Is there any update on this? It is blocking us to get working kubeflow charms, thank you!

knkski commented 4 years ago

Working for me now, thanks for fixing it, @mhilton!