Skip to content
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

DO NOT MERGE: Draft work on improving help messaging #561

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

fairlydurable
Copy link
Contributor

EDU-2415: Docs team assist for temporal CLI help text

josh-berry and others added 3 commits May 6, 2024 17:52
Also:
* Adds language for `temporal`, `temporal activity`, `temporal activity
  complete` and `temporal activity fail`.

NOTES

* I'm a little confused by the inconsistency of punctuation.
* How wordy do you want the command-line usage to be? There's already an
  overwhelming amount of "wall of text".

I was thinking more:

```
* `--env` (string) - Active environment name. Default: default. Env: TEMPORAL_ENV.
* `--env-file` (string) - Path to environment settings file (defaults to `$HOME/.config/temporalio/temporal.yaml`).
* `--log-level` (string-enum) - Log level. Default is "info" for most commands and "warn" for `server start-dev`.
  Options: debug, info, warn, error, never. Default: info.
* `--log-format` (string) - Log format. Options are "text" and "json". Default is "text".
* `--output`, `-o` (string-enum) - Non-logging data output format. Options: text, json, jsonl,
  none. Default: text.
* `--time-format` (string-enum) - Time format. Options: relative, iso, raw. Default: relative.
* `--color` (string-enum) - Output coloring. Options: always, never, auto. Default: auto.
* `--no-json-shorthand-payloads` (bool) - Show all payloads as raw, even if they are JSON. Default: false.
```

over

```
* `--env` (string) - Read additional options from the `ENV` environment. (See "temporal env --help" for more about environments.) Default: default. Env: TEMPORAL_ENV.
* `--env-file` (string) - Read/store per-environment configuration in `PATH` (defaults to "$HOME/.config/temporalio/temporal.yaml").
* `--log-level` (string-enum) - Log level. Default is "info" for most commands and "warn" for the development server.
  Options: debug, info, warn, error, never. Default: info.
* `--log-format` (string) - Emit log messages in "text" or "json" format. Default is "text".
* `--output`, `-o` (string-enum) - Emit output in the `FMT` format. Does not affect logs; use --log-format instead. Options: text, json, jsonl,
  none. Default: text.
* `--time-format` (string-enum) - Emit timestamps in the `FMT` format. Options: relative, iso, raw. Default: relative.
* `--color` (string-enum) - Colorize output. Does not affect logs. Options: always, never, auto. Default: auto.
* `--no-json-shorthand-payloads` (bool) - Show all payloads as raw payloads even if they are JSON.
```

ISSUES

1. There's no way to bundle the `temporal` options, which are
   imported elsewhere. They have to be there and they are
   distracting, and contribute to overwhelmed users.

2. Even though I set a description for complete and fail, they are not shown

   cli% ./temporal activity complete
   Error: required flag(s) "activity-id", "result", "workflow-id" not set
   Usage:
     temporal activity complete [flags]

   Ditto for temporal activity fail.
Proof of concept material is pretty much there before I move forward.
@fairlydurable fairlydurable marked this pull request as draft May 14, 2024 21:10
Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I left a bunch of comments but I think it's all pretty minor.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all the stuff in the giant preamble comment at the beginning. Will continue with my review but wanted to give you this to start with.

temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it as far as temporal operator, will continue next week.

temporalcli/commandsmd/commands.md Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it thru operator and started on schedule.

temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Show resolved Hide resolved
Copy link
Collaborator

@josh-berry josh-berry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here's the rest, up to where I found your "stopped" marker.

temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
temporalcli/commandsmd/commands.md Show resolved Hide resolved
temporalcli/commandsmd/commands.md Outdated Show resolved Hide resolved
@fairlydurable fairlydurable added this to the 1.0.0 milestone Jun 5, 2024
@fairlydurable fairlydurable force-pushed the EDU-2415 branch 4 times, most recently from 598b09d to e1684ba Compare June 6, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants