-
Notifications
You must be signed in to change notification settings - Fork 47
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
[CLI] Bootstrapping restatectl admin command line #1625
Conversation
Looping in @jackkleeman for cloud commands |
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.
cloud changes 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. +1 for merging :-) restatectl
will certainly become very handy in the future.
/// Sets the global context to the given value. In general, this should be called once on CLI | ||
/// initialization. |
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 this be enforced by not using an ArcSwap
in the GLOBAL_CLI_CONTEXT
and instead directly storing the CliContext
? Or do we need the ArcSwap
for testing scenarios where one wants to update the CliContext
?
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.
That's the intention, although we don't actually have tests that exercise that now.
Note: This PR contains mechanical changes, but to help reviewers, here are the most important changes: - Introduces new stubbed `restatectl` CLI that will be host debugging commands. The tool is meant to be used by operators with direct access to Restate clusters. - Introduce `restate-cli-util` hosting shared utilities and a decent portion of UI rendering tools from `restate` cli. This is to allow sharing the logic across CLIs. - Introduce `CliContext`. A global that gets configured by `CommonOpts` clap structure. This makes it easy to change output styling, logging, datetime formats across CLI utilities without threading through an environment object. - `CliContext` in conjunction with `CommonOpts` allow for sharing common top-level command line options between our CLIs (e.g. `--yes`, `--table-style`, etc.)
[CLI] Bootstrapping restatectl admin command line
Note: This PR contains mechanical changes, but to help reviewers, here are the most important changes:
restatectl
CLI that will be host debugging commands. The tool is meant to be used by operators with direct access to Restate clusters.restate-cli-util
hosting shared utilities and a decent portion of UI rendering tools fromrestate
cli. This is to allow sharing the logic across CLIs.CliContext
. A global that gets configured byCommonOpts
clap structure. This makes it easy to change output styling, logging, datetime formats across CLI utilities without threading through an environment object.CliContext
in conjunction withCommonOpts
allow for sharing common top-level command line options between our CLIs (e.g.--yes
,--table-style
, etc.)