Skip to content

feat(cli): organize flags #6269

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

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
Update golden files
  • Loading branch information
ammario committed Feb 17, 2023
commit 80972d0a9094a01f12673f86ecfde65f816f9484
9 changes: 5 additions & 4 deletions cli/testdata/coder_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ Workspace Commands:
stop Stop a workspace
update Update a workspace

Flags:
Auth Flags:
--token string Specify an authentication token. For security reasons setting
CODER_SESSION_TOKEN is preferred.
Consumes $CODER_SESSION_TOKEN
Other Flags:
--global-config coder Path to the global coder config directory.
Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2")
--header stringArray HTTP headers added to all requests. Provide as "Key=Value".
Expand All @@ -57,9 +61,6 @@ Flags:
Consumes $CODER_NO_FEATURE_WARNING
--no-version-warning Suppress warning when client and server versions do not match.
Consumes $CODER_NO_VERSION_WARNING
--token string Specify an authentication token. For security reasons setting
CODER_SESSION_TOKEN is preferred.
Consumes $CODER_SESSION_TOKEN
--url string URL to a deployment.
Consumes $CODER_URL
-v, --verbose Enable verbose output.
Expand Down
8 changes: 5 additions & 3 deletions cli/testdata/coder_agent_--help.golden
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Usage:
coder agent [flags]

Flags:
Auth Flags:
--auth string Specify the authentication type to use for the agent.
Consumes $CODER_AGENT_AUTH (default "token")
-h, --help help for agent
Operability Flags:
--log-dir string Specify the location for the agent log files.
Consumes $CODER_AGENT_LOG_DIR (default "/tmp")
--no-reap Do not start a process reaper.
--pprof-address string The address to serve pprof.
Consumes $CODER_AGENT_PPROF_ADDRESS (default "127.0.0.1:6060")
Other Flags:
-h, --help help for agent
--no-reap Do not start a process reaper.

Global Flags:
--global-config coder Path to the global coder config directory.
Expand Down
46 changes: 24 additions & 22 deletions cli/testdata/coder_scaletest_create-workspaces_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ It is recommended that all rate limits are disabled on the server before running
Usage:
coder scaletest create-workspaces [flags]

Flags:
Networking Flags:
--connect-mode string Mode to use for connecting to the workspace. Can
be 'derp' or 'direct'.
Consumes $CODER_LOADTEST_CONNECT_MODE (default "derp")
--trace Whether application tracing data is collected. It
exports to a backend configured by environment
variables. See:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md.
Consumes $CODER_LOADTEST_TRACE
--trace-coder Whether opentelemetry traces are sent to Coder.
We recommend keeping this disabled unless we
advise you to enable it.
Consumes $CODER_LOADTEST_TRACE_CODER
Operability Flags:
--trace-honeycomb-api-key string Enables trace exporting to Honeycomb.io using the
provided API key.
Consumes $CODER_LOADTEST_TRACE_HONEYCOMB_API_KEY
--trace-propagate Enables trace propagation to the Coder backend,
which will be used to correlate server-side spans
with client-side spans. Only enable this if the
server is configured with the exact same tracing
configuration as the client.
Consumes $CODER_LOADTEST_TRACE_PROPAGATE
Other Flags:
--cleanup-concurrency int Number of concurrent cleanup jobs to run. 0 means
unlimited.
Consumes $CODER_LOADTEST_CLEANUP_CONCURRENCY
Expand All @@ -27,9 +50,6 @@ Flags:
--connect-interval duration How long to wait between making requests to the
--connect-url once the connection is established.
Consumes $CODER_LOADTEST_CONNECT_INTERVAL (default 1s)
--connect-mode string Mode to use for connecting to the workspace. Can
be 'derp' or 'direct'.
Consumes $CODER_LOADTEST_CONNECT_MODE (default "derp")
--connect-timeout duration Timeout for each request to the --connect-url.
Consumes $CODER_LOADTEST_CONNECT_TIMEOUT (default 5s)
--connect-url string URL to connect to inside the the workspace over
Expand Down Expand Up @@ -94,24 +114,6 @@ Flags:
--timeout duration Timeout for the entire test run. 0 means
unlimited.
Consumes $CODER_LOADTEST_TIMEOUT (default 30m0s)
--trace Whether application tracing data is collected. It
exports to a backend configured by environment
variables. See:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md.
Consumes $CODER_LOADTEST_TRACE
--trace-coder Whether opentelemetry traces are sent to Coder.
We recommend keeping this disabled unless we
advise you to enable it.
Consumes $CODER_LOADTEST_TRACE_CODER
--trace-honeycomb-api-key string Enables trace exporting to Honeycomb.io using the
provided API key.
Consumes $CODER_LOADTEST_TRACE_HONEYCOMB_API_KEY
--trace-propagate Enables trace propagation to the Coder backend,
which will be used to correlate server-side spans
with client-side spans. Only enable this if the
server is configured with the exact same tracing
configuration as the client.
Consumes $CODER_LOADTEST_TRACE_PROPAGATE

Global Flags:
--global-config coder Path to the global coder config directory.
Expand Down
Loading