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

charmcraft doesn't support actions #35

Closed
lourot opened this issue Jun 16, 2020 · 1 comment · Fixed by #36
Closed

charmcraft doesn't support actions #35

lourot opened this issue Jun 16, 2020 · 1 comment · Fixed by #36

Comments

@lourot
Copy link

lourot commented Jun 16, 2020

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

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.

@lourot
Copy link
Author

lourot commented Jun 16, 2020

Solved by #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant