-
Notifications
You must be signed in to change notification settings - Fork 463
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
[ADR] JAMES-3400 James CLI based on webadmin endpoints #251
Conversation
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 just keep the changes concerning the ADR here, using git rebase ?
Also stash them all in a single commit!
Thanks in advance ;-)
d233a5d
to
51d9271
Compare
Please can you add the ticket number as a prefix?
You can do that with rebase + reword |
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.
Overall nice job :)
a08b9d5
to
63b99e4
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.
This is a good thing to finally switch admin to http.
However we should drop legacy things like jar+lib packaging, making people running java -jar ...
, etc
Also, I would add:
- write a man page (asciidoc can generate it for you)
- provide the right tool to enable shell completion
But I would already be happy if none of my comments were adopted.
|
||
## Decision | ||
|
||
We decided to write a new CLI client, running on top of the JVM, communicating with James via the webadmin protocol, using http. |
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.
Do you intend to make it buildable with GraalVM native image in order to make the adoption easier and have decent start performance?
It's a matter of avoiding not-supported stuff but for a CLI it should be doable.
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.
Agree with distributing this CLI as a GraalVM native image 👍
Looks easily achievable https://www.graalvm.org/reference-manual/native-image/NativeImageMavenPlugin/
|
||
We decided to write a new CLI client, running on top of the JVM, communicating with James via the webadmin protocol, using http. | ||
|
||
* What libraries will we use? |
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.
I think it's not wise to list libraries here as it's an implementation detail and it would require a new ADT to modify them is people find that the choices validated here don't work as expected.
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.
Later ADRs can superseed this and overide the original choice?
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's just too many details, as far as I know we never wrote an ADR about our libraries choices.
|
||
* How will we limit breaking changes this new CLI will cause? | ||
|
||
* Work on a wrapper to adapt the old CLI API. |
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.
good idea 👍
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.
credits to @rouazana :-)
|
||
* Where will we locate this cli code? | ||
|
||
* server/protocols/webadmin-cli |
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.
This doesn't make sense to me: it's not part of the server, it's a standalone app.
What about app/cli
?
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.
IMO that's a promotion that could come later
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.
could you argue about putting it inside server/protocols? I can't find any rational for that.
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 is related to webadmin, having it close to webadmin feels natural to me.
Putting something that is not (yet) the official cli in an official cli place might be confusing. I would defer that choice.
* We decided to adopt a more modern, modular CLI syntax: | ||
|
||
``` | ||
$ java -jar james_cli.jar [OPTION] ENTITY ACTION {ARGUMENT} |
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.
oh no, please drop this java -jar ...
thing
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.
What do you propose instead?
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.
Ok, graalVM allows to avoid that
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.
Quan can you replace java -jar james_cli.jar
by james-cli
?
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.
done it
Picocli generates beautiful documentation for your application (HTML, PDF and Unix man pages) Will be easy, let's add the mention! |
* We decided to adopt a more modern, modular CLI syntax: | ||
|
||
``` | ||
$ java -jar james_cli.jar [OPTION] ENTITY ACTION {ARGUMENT} |
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.
Quan can you replace java -jar james_cli.jar
by james-cli
?
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.
Almost there!
Let's update the README as well so that I can merge it all at once ;-)
Merged Quan, can you close this? |
ADR for James CLI based on webadmin endpoints.