From cf82823c54c86b6cab93b177e315e8cd414e1f09 Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 16 Feb 2023 17:39:34 -0800 Subject: [PATCH 1/5] Add --log-prefix=none option --- .../run_logging/log_prefix.t | 56 +++++++++++++++++++ .../run_logging/monorepo/app-a/package.json | 6 ++ .../run_logging/monorepo/package.json | 6 ++ .../run_logging/monorepo/turbo.json | 5 ++ cli/integration_tests/run_logging/setup.sh | 7 +++ cli/internal/colorcache/colorcache.go | 6 +- cli/internal/run/real_run.go | 14 ++++- cli/internal/run/run.go | 2 + cli/internal/run/run_spec.go | 3 + cli/internal/turbostate/turbostate.go | 1 + crates/turborepo-lib/src/cli.rs | 3 + 11 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 cli/integration_tests/run_logging/log_prefix.t create mode 100644 cli/integration_tests/run_logging/monorepo/app-a/package.json create mode 100644 cli/integration_tests/run_logging/monorepo/package.json create mode 100644 cli/integration_tests/run_logging/monorepo/turbo.json create mode 100644 cli/integration_tests/run_logging/setup.sh diff --git a/cli/integration_tests/run_logging/log_prefix.t b/cli/integration_tests/run_logging/log_prefix.t new file mode 100644 index 0000000000000..a5e6924efd50e --- /dev/null +++ b/cli/integration_tests/run_logging/log_prefix.t @@ -0,0 +1,56 @@ +Setup + $ . ${TESTDIR}/../setup.sh + $ . ${TESTDIR}/setup.sh $(pwd) ./monorepo + + + $ ${TURBO} run build --log-prefix=none + \xe2\x80\xa2 Packages in scope: app-a (esc) + \xe2\x80\xa2 Running build in 1 packages (esc) + \xe2\x80\xa2 Remote caching disabled (esc) + cache miss, executing 74eb1b46ce8b29d3 + + > build (esc) + > echo 'build app-a' (esc) + + build app-a + + Tasks: 1 successful, 1 total + Cached: 0 cached, 1 total + Time:\s*[\.0-9]+m?s (re) + + $ cat app-a/.turbo/turbo-build.log + + > build (esc) + > echo 'build app-a' (esc) + + build app-a + + $ ${TURBO} run build --log-prefix=none + \xe2\x80\xa2 Packages in scope: app-a (esc) + \xe2\x80\xa2 Running build in 1 packages (esc) + \xe2\x80\xa2 Remote caching disabled (esc) + app-a:build: cache miss, executing 3df2c74b2bfbc724 + app-a:build: + app-a:build: > build + app-a:build: > echo 'build app-a' + app-a:build: + app-a:build: build app-a + + Tasks: 1 successful, 1 total + Cached: 0 cached, 1 total + Time:\s*[\.0-9]+m?s (re) + + $ ${TURBO} run build # without option + \xe2\x80\xa2 Packages in scope: app-a (esc) + \xe2\x80\xa2 Running build in 1 packages (esc) + \xe2\x80\xa2 Remote caching disabled (esc) + app-a:build: cache hit, replaying output 3df2c74b2bfbc724 + app-a:build: + app-a:build: > build + app-a:build: > echo 'build app-a' + app-a:build: + app-a:build: build app-a + + Tasks: 1 successful, 1 total + Cached: 1 cached, 1 total + Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) diff --git a/cli/integration_tests/run_logging/monorepo/app-a/package.json b/cli/integration_tests/run_logging/monorepo/app-a/package.json new file mode 100644 index 0000000000000..b685e7583b0c4 --- /dev/null +++ b/cli/integration_tests/run_logging/monorepo/app-a/package.json @@ -0,0 +1,6 @@ +{ + "name": "app-a", + "scripts": { + "build": "echo 'build app-a'" + } +} diff --git a/cli/integration_tests/run_logging/monorepo/package.json b/cli/integration_tests/run_logging/monorepo/package.json new file mode 100644 index 0000000000000..dba002fe7031d --- /dev/null +++ b/cli/integration_tests/run_logging/monorepo/package.json @@ -0,0 +1,6 @@ +{ + "name": "monorepo", + "workspaces": [ + "app-*" + ] +} diff --git a/cli/integration_tests/run_logging/monorepo/turbo.json b/cli/integration_tests/run_logging/monorepo/turbo.json new file mode 100644 index 0000000000000..f27ee6c9b5ebf --- /dev/null +++ b/cli/integration_tests/run_logging/monorepo/turbo.json @@ -0,0 +1,5 @@ +{ + "pipeline": { + "build": {} + } +} diff --git a/cli/integration_tests/run_logging/setup.sh b/cli/integration_tests/run_logging/setup.sh new file mode 100644 index 0000000000000..d771eae6cbad2 --- /dev/null +++ b/cli/integration_tests/run_logging/setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) +TARGET_DIR=$1 +TEST_DIR=$2 +cp -a ${SCRIPT_DIR}/$TEST_DIR/. ${TARGET_DIR}/ +${SCRIPT_DIR}/../setup_git.sh ${TARGET_DIR} diff --git a/cli/internal/colorcache/colorcache.go b/cli/internal/colorcache/colorcache.go index b3d42c16c58be..08a15e83f6f7b 100644 --- a/cli/internal/colorcache/colorcache.go +++ b/cli/internal/colorcache/colorcache.go @@ -48,5 +48,9 @@ func (c *ColorCache) colorForKey(key string) colorFn { // color based on the cacheKey func (c *ColorCache) PrefixWithColor(cacheKey string, prefix string) string { colorFn := c.colorForKey(cacheKey) - return colorFn("%s: ", prefix) + if prefix != "" { + return colorFn("%s: ", prefix) + } + + return "" } diff --git a/cli/internal/run/real_run.go b/cli/internal/run/real_run.go index b8088971de606..fa3ddd44ff76b 100644 --- a/cli/internal/run/real_run.go +++ b/cli/internal/run/real_run.go @@ -151,9 +151,6 @@ func (ec *execContext) logError(log hclog.Logger, prefix string, err error) { func (ec *execContext) exec(ctx gocontext.Context, packageTask *nodes.PackageTask, deps dag.Set) error { cmdTime := time.Now() - prefix := packageTask.OutputPrefix(ec.isSinglePackage) - prettyPrefix := ec.colorCache.PrefixWithColor(packageTask.PackageName, prefix) - progressLogger := ec.logger.Named("") progressLogger.Debug("start") @@ -177,6 +174,17 @@ func (ec *execContext) exec(ctx gocontext.Context, packageTask *nodes.PackageTas progressLogger.Debug("done", "status", "skipped", "duration", time.Since(cmdTime)) return nil } + + var prefix string + var prettyPrefix string + if ec.rs.Opts.runOpts.logPrefix == "none" { + prefix = "" + } else { + prefix = packageTask.OutputPrefix(ec.isSinglePackage) + } + + prettyPrefix = ec.colorCache.PrefixWithColor(packageTask.PackageName, prefix) + // Cache --------------------------------------------- taskCache := ec.runCache.TaskCache(packageTask, hash) // Create a logger for replaying diff --git a/cli/internal/run/run.go b/cli/internal/run/run.go index 7f275b7c6c185..b9b94b08bf6b6 100644 --- a/cli/internal/run/run.go +++ b/cli/internal/run/run.go @@ -68,6 +68,7 @@ func ExecuteRun(ctx gocontext.Context, helper *cmdutil.Helper, signalWatcher *si func optsFromArgs(args *turbostate.ParsedArgsFromRust) (*Opts, error) { runPayload := args.Command.Run + opts := getDefaultOptions() // aliases := make(map[string]string) scope.OptsFromArgs(&opts.scopeOpts, args) @@ -76,6 +77,7 @@ func optsFromArgs(args *turbostate.ParsedArgsFromRust) (*Opts, error) { opts.cacheOpts.SkipFilesystem = runPayload.RemoteOnly opts.cacheOpts.OverrideDir = runPayload.CacheDir opts.cacheOpts.Workers = runPayload.CacheWorkers + opts.runOpts.logPrefix = runPayload.LogPrefix // Runcache flags opts.runcacheOpts.SkipReads = runPayload.Force diff --git a/cli/internal/run/run_spec.go b/cli/internal/run/run_spec.go index b837f9af8258e..3cac817fb3d52 100644 --- a/cli/internal/run/run_spec.go +++ b/cli/internal/run/run_spec.go @@ -74,4 +74,7 @@ type runOpts struct { graphFile string noDaemon bool singlePackage bool + + // logPrefix controls whether we should print a prefix in task logs + logPrefix string } diff --git a/cli/internal/turbostate/turbostate.go b/cli/internal/turbostate/turbostate.go index 0fb86d15c1c31..1f7a6568e0ebd 100644 --- a/cli/internal/turbostate/turbostate.go +++ b/cli/internal/turbostate/turbostate.go @@ -60,6 +60,7 @@ type RunPayload struct { SinglePackage bool `json:"single_package"` Tasks []string `json:"tasks"` PkgInferenceRoot string `json:"pkg_inference_root"` + LogPrefix string `json:"log_prefix"` } // Command consists of the data necessary to run a command. diff --git a/crates/turborepo-lib/src/cli.rs b/crates/turborepo-lib/src/cli.rs index 0473e2c3ebc25..53eaecafc8778 100644 --- a/crates/turborepo-lib/src/cli.rs +++ b/crates/turborepo-lib/src/cli.rs @@ -352,6 +352,9 @@ pub struct RunArgs { /// to identify which packages have changed. #[clap(long)] pub since: Option, + /// Can be: "none" or missing. Internally, the default is not named yet. + #[clap(long)] + pub log_prefix: Option, // NOTE: The following two are hidden because clap displays them in the help text incorrectly: // > Usage: turbo [OPTIONS] [TASKS]... [-- ...] [COMMAND] #[clap(hide = true)] From d403d76b20e12983531dd79a9350e763a09707ea Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 16 Feb 2023 17:44:00 -0800 Subject: [PATCH 2/5] fix tests --- .../run_logging/log_prefix.t | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/cli/integration_tests/run_logging/log_prefix.t b/cli/integration_tests/run_logging/log_prefix.t index a5e6924efd50e..682c6281fa768 100644 --- a/cli/integration_tests/run_logging/log_prefix.t +++ b/cli/integration_tests/run_logging/log_prefix.t @@ -2,7 +2,7 @@ Setup $ . ${TESTDIR}/../setup.sh $ . ${TESTDIR}/setup.sh $(pwd) ./monorepo - +# Run for the first time with --log-prefix=none $ ${TURBO} run build --log-prefix=none \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) @@ -17,7 +17,8 @@ Setup Tasks: 1 successful, 1 total Cached: 0 cached, 1 total Time:\s*[\.0-9]+m?s (re) - + +# Check that the cached logs don't have prefixes $ cat app-a/.turbo/turbo-build.log > build (esc) @@ -25,21 +26,23 @@ Setup build app-a +# Should get a cache hit and no prefixes $ ${TURBO} run build --log-prefix=none \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - app-a:build: cache miss, executing 3df2c74b2bfbc724 - app-a:build: - app-a:build: > build - app-a:build: > echo 'build app-a' - app-a:build: - app-a:build: build app-a + cache miss, executing 3df2c74b2bfbc724 + + > build + > echo 'build app-a' + + build app-a Tasks: 1 successful, 1 total Cached: 0 cached, 1 total Time:\s*[\.0-9]+m?s (re) +# Should get a cache hit, but should print prefixes this time $ ${TURBO} run build # without option \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) From 4946261bb59985831e53bdf243bad127897fedd1 Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 16 Feb 2023 22:25:40 -0800 Subject: [PATCH 3/5] fixup test --- .../run_logging/log_prefix.t | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/cli/integration_tests/run_logging/log_prefix.t b/cli/integration_tests/run_logging/log_prefix.t index 682c6281fa768..654be07518804 100644 --- a/cli/integration_tests/run_logging/log_prefix.t +++ b/cli/integration_tests/run_logging/log_prefix.t @@ -8,22 +8,22 @@ Setup \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) cache miss, executing 74eb1b46ce8b29d3 - - > build (esc) - > echo 'build app-a' (esc) + + \> build (re) + \> echo 'build app-a' (re) build app-a Tasks: 1 successful, 1 total Cached: 0 cached, 1 total Time:\s*[\.0-9]+m?s (re) - + # Check that the cached logs don't have prefixes $ cat app-a/.turbo/turbo-build.log - - > build (esc) - > echo 'build app-a' (esc) - + + \> build (re) + \> echo 'build app-a' (re) + build app-a # Should get a cache hit and no prefixes @@ -33,15 +33,15 @@ Setup \xe2\x80\xa2 Remote caching disabled (esc) cache miss, executing 3df2c74b2bfbc724 - > build - > echo 'build app-a' + \> build (re) + \> echo 'build app-a' (re) build app-a - - Tasks: 1 successful, 1 total + + Tasks: 1 successful, 1 total Cached: 0 cached, 1 total - Time:\s*[\.0-9]+m?s (re) - + Time:\s*[\.0-9]+m?s (re) + # Should get a cache hit, but should print prefixes this time $ ${TURBO} run build # without option \xe2\x80\xa2 Packages in scope: app-a (esc) @@ -53,7 +53,8 @@ Setup app-a:build: > echo 'build app-a' app-a:build: app-a:build: build app-a - - Tasks: 1 successful, 1 total + + Tasks: 1 successful, 1 total Cached: 1 cached, 1 total - Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) + Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) + \ No newline at end of file From 7639bf96b040ebee0fcc22f1a0945ca758b5c2d8 Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Mon, 20 Feb 2023 23:34:58 -0800 Subject: [PATCH 4/5] Update help message and tests that assert against it --- cli/integration_tests/bad_flag.t | 2 +- cli/integration_tests/no_args.t | 1 + cli/integration_tests/turbo_help.t | 2 ++ crates/turborepo-lib/src/cli.rs | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/integration_tests/bad_flag.t b/cli/integration_tests/bad_flag.t index 827ca26859e19..23b21a9cab91d 100644 --- a/cli/integration_tests/bad_flag.t +++ b/cli/integration_tests/bad_flag.t @@ -19,7 +19,7 @@ Bad flag with an implied run command should display run flags note: to pass '--bad-flag' as a value, use '-- --bad-flag' - Usage: turbo <--cache-dir |--cache-workers |--concurrency |--continue|--dry-run []|--single-package|--filter |--force|--global-deps |--graph []|--ignore |--include-dependencies|--no-cache|--no-daemon|--no-deps|--output-logs |--only|--parallel|--pkg-inference-root |--profile |--remote-only|--scope |--since |TASKS|PASS_THROUGH_ARGS> + Usage: turbo <--cache-dir |--cache-workers |--concurrency |--continue|--dry-run []|--single-package|--filter |--force|--global-deps |--graph []|--ignore |--include-dependencies|--no-cache|--no-daemon|--no-deps|--output-logs |--only|--parallel|--pkg-inference-root |--profile |--remote-only|--scope |--since |--log-prefix |TASKS|PASS_THROUGH_ARGS> For more information, try '--help'. diff --git a/cli/integration_tests/no_args.t b/cli/integration_tests/no_args.t index 354eb328f12e6..d504be4e04f28 100644 --- a/cli/integration_tests/no_args.t +++ b/cli/integration_tests/no_args.t @@ -57,6 +57,7 @@ Make sure exit code is 2 when no args are passed --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed + --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together [1] $ ${TURBO} run Turbo error: at least one task must be specified diff --git a/cli/integration_tests/turbo_help.t b/cli/integration_tests/turbo_help.t index e639c7dce2472..0ff8085bace7e 100644 --- a/cli/integration_tests/turbo_help.t +++ b/cli/integration_tests/turbo_help.t @@ -57,6 +57,7 @@ Test help flag --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed + --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together @@ -118,6 +119,7 @@ Test help flag --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed + --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together Test help flag for link command $ ${TURBO} link -h diff --git a/crates/turborepo-lib/src/cli.rs b/crates/turborepo-lib/src/cli.rs index 53eaecafc8778..26635ed80b503 100644 --- a/crates/turborepo-lib/src/cli.rs +++ b/crates/turborepo-lib/src/cli.rs @@ -352,7 +352,9 @@ pub struct RunArgs { /// to identify which packages have changed. #[clap(long)] pub since: Option, - /// Can be: "none" or missing. Internally, the default is not named yet. + /// Use "none" to remove prefixes from task logs. Note that using this + /// option means that tasks running in parallel may stream their logs + /// mixed together. #[clap(long)] pub log_prefix: Option, // NOTE: The following two are hidden because clap displays them in the help text incorrectly: From 242833d293a63ff5caf93cfedd28f53a4cb702dd Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Tue, 21 Feb 2023 12:26:05 -0800 Subject: [PATCH 5/5] Disallow other/missing values and improve help text --- cli/integration_tests/no_args.t | 2 +- .../run_logging/log_prefix.t | 26 ++++++++++++++++--- cli/integration_tests/turbo_help.t | 4 +-- crates/turborepo-lib/src/cli.rs | 16 ++++++++---- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/cli/integration_tests/no_args.t b/cli/integration_tests/no_args.t index d504be4e04f28..8337dc43ec4f9 100644 --- a/cli/integration_tests/no_args.t +++ b/cli/integration_tests/no_args.t @@ -57,7 +57,7 @@ Make sure exit code is 2 when no args are passed --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed - --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together + --log-prefix Use "none" to remove prefixes from task logs. Note that tasks running in parallel interleave their logs and prefix is the only way to identify which task produced a log [possible values: none] [1] $ ${TURBO} run Turbo error: at least one task must be specified diff --git a/cli/integration_tests/run_logging/log_prefix.t b/cli/integration_tests/run_logging/log_prefix.t index 654be07518804..fd405ccb90c81 100644 --- a/cli/integration_tests/run_logging/log_prefix.t +++ b/cli/integration_tests/run_logging/log_prefix.t @@ -26,7 +26,7 @@ Setup build app-a -# Should get a cache hit and no prefixes +# Running again should get a cache hit and no prefixes $ ${TURBO} run build --log-prefix=none \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) @@ -42,8 +42,8 @@ Setup Cached: 0 cached, 1 total Time:\s*[\.0-9]+m?s (re) -# Should get a cache hit, but should print prefixes this time - $ ${TURBO} run build # without option +# Running again withuot `--log-prefix` should get a cache hit, but should print prefixes this time + $ ${TURBO} run build \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) @@ -57,4 +57,22 @@ Setup Tasks: 1 successful, 1 total Cached: 1 cached, 1 total Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) - \ No newline at end of file + + +# Running with bogus option + $ ${TURBO} run build --log-prefix=blah + ERROR invalid value 'blah' for '--log-prefix ' + [possible values: none] + + For more information, try '--help'. + + [1] + +# Running with missing value for option + $ ${TURBO} run build --log-prefix + ERROR a value is required for '--log-prefix ' but none was supplied + [possible values: none] + + For more information, try '--help'. + + [1] diff --git a/cli/integration_tests/turbo_help.t b/cli/integration_tests/turbo_help.t index 0ff8085bace7e..6228efdb615ae 100644 --- a/cli/integration_tests/turbo_help.t +++ b/cli/integration_tests/turbo_help.t @@ -57,7 +57,7 @@ Test help flag --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed - --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together + --log-prefix Use "none" to remove prefixes from task logs. Note that tasks running in parallel interleave their logs and prefix is the only way to identify which task produced a log [possible values: none] @@ -119,7 +119,7 @@ Test help flag --remote-only Ignore the local filesystem cache for all tasks. Only allow reading and caching artifacts using the remote cache --scope Specify package(s) to act as entry points for task execution. Supports globs --since Limit/Set scope to changed packages since a mergebase. This uses the git diff ${target_branch}... mechanism to identify which packages have changed - --log-prefix Use "none" to remove prefixes from task logs. Note that using this option means that tasks running in parallel may stream their logs mixed together + --log-prefix Use "none" to remove prefixes from task logs. Note that tasks running in parallel interleave their logs and prefix is the only way to identify which task produced a log [possible values: none] Test help flag for link command $ ${TURBO} link -h diff --git a/crates/turborepo-lib/src/cli.rs b/crates/turborepo-lib/src/cli.rs index 26635ed80b503..f0060b8c23d47 100644 --- a/crates/turborepo-lib/src/cli.rs +++ b/crates/turborepo-lib/src/cli.rs @@ -352,11 +352,11 @@ pub struct RunArgs { /// to identify which packages have changed. #[clap(long)] pub since: Option, - /// Use "none" to remove prefixes from task logs. Note that using this - /// option means that tasks running in parallel may stream their logs - /// mixed together. - #[clap(long)] - pub log_prefix: Option, + /// Use "none" to remove prefixes from task logs. Note that tasks running + /// in parallel interleave their logs and prefix is the only way + /// to identify which task produced a log. + #[clap(long, value_enum)] + pub log_prefix: Option, // NOTE: The following two are hidden because clap displays them in the help text incorrectly: // > Usage: turbo [OPTIONS] [TASKS]... [-- ...] [COMMAND] #[clap(hide = true)] @@ -365,6 +365,12 @@ pub struct RunArgs { pub pass_through_args: Vec, } +#[derive(clap::ValueEnum, Clone, Copy, Debug, PartialEq, Serialize)] +pub enum LogPrefix { + #[serde(rename = "none")] + None, +} + /// Runs the CLI by parsing arguments with clap, then either calling Rust code /// directly or returning a payload for the Go code to use. ///