-
Notifications
You must be signed in to change notification settings - Fork 27
[DPE-3885] Enhance the error message if charm was deployed without --trust
flag
#440
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
Conversation
We should add integration test that the charm will block and unblock correctly. |
Added a small set of integration tests for the feature. Due to RBAC not being enabled by default in our reusable workflows, I had to use sub-processes to interact with microk8s directly, as well as re-establish model connection after microk8s restart. Running the test multiple times locally and in CI without fails, it looks stable. About the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great! Thanks @lucasgameiroborges!
I left only one comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you!
…-trust` flag (canonical#440) * improve error message for trust flag * fix message text * fix docstring * fix explanation * add integration test for new trust behavior * test different app name for deploy * fix bug * enable rbac from inside test * fix typo * use sudo with microk8s enable * remove check true * fix linting * test subprocess call * remove fast-forward * test connectivity and enable rbac * fix integration test + update endpoints * revert poetry lock change * reposition endpoint update in event * reposition cleanup resource call
Issue
#431
Solution
Considering this is an error that can be solved by human action directly on the live charm, I chose the following approach: If the
403 Unauthorized
error is catched, the charm entersBlocked
status with specific message and a helpful explanation about the problem is written in the logs:juju status:
juju logs: