-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add an add-admin action #220
Conversation
1608d9d
to
473b177
Compare
2d9b043
to
4bc932f
Compare
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.
Haven't finished this review yet, there are some broad questions about whether this should be a CLI or it should be in the charm source code. Let's address that first and then I'll finish the review
Sorry, it probably wasn't obvious from the PR description. I'm patching a file from the source code of indico (here is the source). So I want to do it in a way that is simple, ideally robust to some unrelated changes in indico and better, that breaks when there are changes that would affect this change.
I decided to replace the whole file (seemed simpler, but maybe not). But doing that, I find it better to avoid touching the code that the indico team/community wrote around the block that I'm adding. Eventually, I plan to make a PR on indico's side |
So are we making any modifications from that source or is it just vending in that file? with no changes? |
I'm adding the block with the command "autocreate" indico-operator/files/src/indico/cli/user.py Line 195 in 4bc932f
|
Would it be possible to move that to the charm source code? |
The risk here is that upgrading indico version could lead to incompatibility. Which means we'll have to pay attention to port the change on that file everytime we update indico. |
I thought of adding a new module in its own file. But I still have to load it therefore change the |
After investigating and discussing with Niels, Indico supports plugins that can extend CLI |
3f5728a
to
a576aa4
Compare
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.
Any integration tests?
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.
Can you update the PR description to match the current action params?
Just to add another option to consider, it could be possible to pass input to the "indico user create --admin" command using So wouldn't be necessary to change anything in Indico. |
Yes, this was considered during the discussions that lead to a conclusion to this thread. |
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.
Looking good, still seems to be some issues with the lint command
Thanks for your resilience with all the feedback!
The issue here is that the lint tests are running on focal (python 3.8) and the pypi package for indico 3.2 is not compatible with it. |
Test coverage for d7db4c4
Static code analysis report
|
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.
LGTM
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.
LGTM
The integration tests failed... |
If the lint checks fail for Ubuntu 20.04, does the |
The goal is to add a add-admin action to the charm that uses a modified version of indico CLI tool.
I added a
click
command group (via plugin) to allow theindico autocreate admin <email> <password>
command.