this charm now has a branch called make_publishable
… and I was following the instructions again after a charmpark init
and some fiddling with the removal of TODOs
but now the error about namespace and the instructions don’t seem to talk about how to set a namespace
$ charmcraft upload artifactory-ce-cpp.charm
Store failure! Name artifactory-ce-cpp not found in the charm namespace [code: resource-not-found] (full execution logs in ~/snap/charmcraft/common/charmcraft-log-kz_8eflj)
guessing I need to add a namespace in the metadata.yaml
via namespace:charm-name
My quick googling seems to pop up only instructions talking about k8s charms, which these are not
$ cat ~/snap/charmcraft/common/charmcraft-log-kz_8eflj
2021-07-08 12:05:48,688 charmcraft.guard DEBUG Starting charmcraft version 1.0.0
2021-07-08 12:05:48,688 charmcraft.main DEBUG Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'project_dir': None} filtered=['upload', 'artifactory-ce-cpp.charm']
2021-07-08 12:05:48,688 charmcraft.commands DEBUG Couldn't find config file ~/artifactory-ce-cpp-charm/charmcraft.yaml
2021-07-08 12:05:48,688 charmcraft.main DEBUG General parsed sysargs: command='upload' args=['artifactory-ce-cpp.charm']
2021-07-08 12:05:48,689 charmcraft.main DEBUG Command parsed sysargs: Namespace(filepath=PosixPath('artifactory-ce-cpp.charm'), release=None)
2021-07-08 12:05:48,706 charmcraft.commands.store DEBUG Starting to push artifactory-ce-cpp.charm
2021-07-08 12:05:49,304 charmcraft.commands.store DEBUG Uploading bytes ended, id <some_id>
2021-07-08 12:05:49,304 charmcraft.commands.store DEBUG Hitting the store: POST https://api.charmhub.io/v1/charm/artifactory-ce-cpp/revisions {'upload-id': '<some_id>'}
2021-07-08 12:05:49,304 charmcraft.commands.store DEBUG Loading credentials from file: '~/snap/charmcraft/common/config/charmcraft.credentials'
2021-07-08 12:05:51,715 charmcraft ERROR Store failure! Name artifactory-ce-cpp not found in the charm namespace [code: resource-not-found] (full execution logs in ~/snap/charmcraft/common/charmcraft-log-kz_8eflj)
EDIT:
AH, I can see now I must get a charmcraft.yaml
configuration file setup… and I have found the instructions for that here
I think I’m back on track then
One or two suggestions … and I wonder where do I ask or suggest this… but
1)
according to docs
From Charmcraft v0.8.0 onwards, this configuration file mandatory for packing bundles, but is optional optional for the rest of the commands.
when packing I got no warning at a lack of config… would be great to get that warning earlier in the chain of events
- charmcraft version not checkable in cli?
I did a quick charmcraft --version
and the command was not there… nor does it show the version installed on charmcraft --help
?
maybe I am just daft and it is somewhere else? I installed via snap so maybe I can check what version I have that way?
Edit2: I’ve gotten the version now… i’m on v1.0.0
$ snap info charmcraft
name: charmcraft
summary: The charming tool
publisher: Canonical✓
store-url: https://snapcraft.io/charmcraft
license: Apache-2.0
description: |
Charmcraft enables charm creators to build, publish, and manage charmed operators for Kubernetes,
metal and virtual machines.
commands:
- charmcraft
snap-id: gcqfpVCOUvmDuYT0Dh5PjdeGypSEzNdV
tracking: latest/stable
refresh-date: yesterday at 10:42 CEST
channels:
latest/stable: 1.0.0 2021-04-30 (403) 10MB -
latest/candidate: 1.1.0 2021-07-05 (495) 30MB classic
latest/beta: 1.1.0 2021-07-05 (495) 30MB classic
latest/edge: 1.1.0+25.g4631091 2021-07-07 (503) 51MB classic
installed: 1.0.0 (403) 10MB -