Hop server enhancement #4569#4574
Conversation
6237f6c to
6a3ce3c
Compare
- add command line options for (host, port, shutdownport, proxyhost, proxyport,ssl) - support for override properties on the command line - add shutdown listener to web server - add shutdown servlet - add RemoteHopServer class to interact with a Hop server and clean HopServerMeta - remove setup hop server syntax by hostname and port - add HopServerTerminate extension point after shutdown - all HopServerXXX extension points now provide a HopServer object, rather than a HopServer/WebServer mix - Set abbreviateSynopsis and usageHelpAutoWidth to command line
|
we need better option grouping, port appears as sub-option of password, host appears as sub-option of help etc: |
|
tested:
|
|
For option grouping, this is the behavior of Picoli if we do not define a unique letter for an option. |
|
is this still stuck in draft for an actual reason? @nadment |
|
No for me PR is ok. It's a lot of changes to test. I haven't found a better solution to group Picoli options |
|
Alright, then I'll start testing and reviewing this. There are some other minor changes (deprecations) that I will probably include in here. |
|
let's try and pick this one up after the release again :) |
|
I think it's printed this way because Picocli tries to align short format options and long format ones. In this case it's probably not finding a short hand option for |
|
@nadment, what are we going to do with this one? Will you resolve conflicts so we can merge it? |
|
Okay, I'll take care of that old pull request soon. |
|
re-applied with #7479 |
Reapplies #4574 (Nicolas Adment) on top of current main, which had diverged ~1720 commits (incl. the Apache HttpClient 4->5 migration). - Split HopServerMeta into a slim metadata class + a new RemoteHopServer client that holds all remote-interaction methods. RemoteHopServer is rebuilt from main's current (HttpClient 5) method bodies, not the PR's Nov-2024 versions, so no server fixes are lost. - All callers use the new RemoteHopServer request* API (RemotePipelineEngine, RemoteWorkflowEngine, RemoteExecutionInfoLocation, GetServerStatus, HopGuiWorkflowRunDelegate, HopServerMetaEditor, HopServer). - Graceful shutdown: new ShutdownServlet (GET /shutdown, authenticated) + HopServer.shutdown() + HopServerTerminate extension point + a JVM shutdown hook so SIGTERM/CTRL-C stop the server gracefully. WebServer gets idempotent start()/stop() and drops the old WebServerShutdownHook / IWebServerShutdownHandler / MonitorThread. HopServerStartup/Shutdown/Terminate now all receive a HopServer object. - WebServer.CONST_PORT renamed to DEFAULT_PORT. - Removed the vestigial shutdownPort end to end (HopServerMeta metadata field, WebServer/HopServer/HopServerConfig plumbing, the hostname:port:shutdownport CLI positional, sample hop-server.xml, docker env/EXPOSE, docs). It was never wired to a listener; graceful shutdown is covered by SIGTERM and /shutdown. - Removed the dead --kill example + callStopHopServerRestService machinery. Reconciled with main's evolution: kept main's picocli CLI (it already has --help/--version and still supports the hostname:port syntax); ShutdownServlet is on the main connector for Jetty ee11 (no separate shutdown-port connector); dropped the dead propertiesMasterName fields main removed in #5060; docs updated (Stopping Hop Server section + shutdown-port references). Co-authored-by: Nicolas Adment <39568358+nadment@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Please add a meaningful description for your change here
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean install apache-rat:checkto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.git rebase -i.addresses #123), if applicable.To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.