Without charmcraft it works but with charmcraft it fails with
2020-06-16 09:57:36 ERROR juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-ops-with-action-0/charm/hooks/install", line 38, in <module>
main(CharmOpsWithAction)
File "lib/ops/main.py", line 313, in main
charm = charm_class(framework)
File "/var/lib/juju/agents/unit-ops-with-action-0/charm/hooks/install", line 30, in __init__
self.framework.observe(self.on.hello_action, self.on_hello_action)
AttributeError: 'CharmEvents' object has no attribute 'hello_action'
2020-06-16 09:57:36 ERROR juju.worker.uniter.operation runhook.go:132 hook "install" failed: exit status 1
This is apparently because charmcraft doesn't copy actions.yaml into the charm.
See this simple hello-world charm with an action: https://github.com/AurelienLourot/charm-ops-with-action
Without charmcraft it works but with charmcraft it fails with
This is apparently because charmcraft doesn't copy
actions.yaml
into the charm.