diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-20 15:53:22 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-20 15:53:22 +0200 |
| commit | 28a61b12d302e9e0d37d52bf1aa5d19069f3411b (patch) | |
| tree | 07cd367f4933364781ea69c350025b1b6b703174 /scripts/test_scripts | |
| parent | zen-test: add CLI integration harness + TestArtifactProvider + CI host stats ... (diff) | |
| download | archived-zen-28a61b12d302e9e0d37d52bf1aa5d19069f3411b.tar.xz archived-zen-28a61b12d302e9e0d37d52bf1aa5d19069f3411b.zip | |
zen history command (#987)
- Feature: Per-user invocation history for `zen` and `zenserver`; each startup appends a record to a JSONL file capped at the most recent 100 entries. Location: `%LOCALAPPDATA%\Epic\Zen\History\invocations.jsonl` on Windows, `~/.zen/History/invocations.jsonl` on POSIX
- `zen history` opens an interactive picker; selecting a zen row re-runs it inline and forwards the exit code, selecting a zenserver row spawns it detached
- `zen history --list` (`-l`) prints the table to stdout instead of showing the picker
- `zen history --filter zen|zenserver` restricts the listing to one executable
- `zen history --print` prints the reconstructed command line of the selected row instead of launching it
- `--enable-execution-history` global option on both binaries (default `true`) to opt out per invocation
- The history file is attached to Sentry crash reports (alongside the existing zenserver log)
Diffstat (limited to 'scripts/test_scripts')
6 files changed, 6 insertions, 4 deletions
diff --git a/scripts/test_scripts/builds-download-upload-test.py b/scripts/test_scripts/builds-download-upload-test.py index 8ff5245c1..dd9aae07e 100644 --- a/scripts/test_scripts/builds-download-upload-test.py +++ b/scripts/test_scripts/builds-download-upload-test.py @@ -82,7 +82,7 @@ SERVER_ARGS: tuple[str, ...] = ( def zen_cmd(*args: str | Path, extra_zen_args: list[str] | None = None) -> list[str | Path]: """Build a zen CLI command list, inserting extra_zen_args before subcommands.""" - return [ZEN_EXE, *(extra_zen_args or []), *args] + return [ZEN_EXE, "--enable-execution-history=false", *(extra_zen_args or []), *args] def run(cmd: list[str | Path]) -> None: diff --git a/scripts/test_scripts/builds-download-upload-update-build-ids.py b/scripts/test_scripts/builds-download-upload-update-build-ids.py index 2a63aa44d..6332d6990 100644 --- a/scripts/test_scripts/builds-download-upload-update-build-ids.py +++ b/scripts/test_scripts/builds-download-upload-update-build-ids.py @@ -51,7 +51,7 @@ def list_builds_for_bucket(zen: str, host: str, namespace: str, bucket: str) -> result_path = Path(tmp.name) cmd = [ - zen, "builds", "list", + zen, "--enable-execution-history=false", "builds", "list", "--namespace", namespace, "--bucket", bucket, "--host", host, diff --git a/scripts/test_scripts/hub_load_test.py b/scripts/test_scripts/hub_load_test.py index 7bff1eb37..33f05d90f 100644 --- a/scripts/test_scripts/hub_load_test.py +++ b/scripts/test_scripts/hub_load_test.py @@ -183,6 +183,7 @@ def _start_hub( cmd = [ str(zenserver_exe), "hub", + "--enable-execution-history=false", f"--data-dir={data_dir}", f"--port={port}", "--hub-instance-http-threads=8", diff --git a/scripts/test_scripts/hub_provision_perf_test.py b/scripts/test_scripts/hub_provision_perf_test.py index 5b264ad62..76fb8508d 100644 --- a/scripts/test_scripts/hub_provision_perf_test.py +++ b/scripts/test_scripts/hub_provision_perf_test.py @@ -205,6 +205,7 @@ def _start_hub( cmd = [ str(zenserver_exe), "hub", + "--enable-execution-history=false", f"--data-dir={data_dir}", f"--port={port}", "--hub-instance-http-threads=8", diff --git a/scripts/test_scripts/oplog-import-export-test.py b/scripts/test_scripts/oplog-import-export-test.py index f913a7351..93f732135 100644 --- a/scripts/test_scripts/oplog-import-export-test.py +++ b/scripts/test_scripts/oplog-import-export-test.py @@ -82,7 +82,7 @@ SERVER_ARGS: tuple[str, ...] = ( def zen_cmd(*args: str | Path, extra_zen_args: list[str] | None = None) -> list[str | Path]: """Build a zen CLI command list, inserting extra_zen_args before subcommands.""" - return [ZEN_EXE, *(extra_zen_args or []), *args] + return [ZEN_EXE, "--enable-execution-history=false", *(extra_zen_args or []), *args] def run(cmd: list[str | Path]) -> None: diff --git a/scripts/test_scripts/oplog-update-build-ids.py b/scripts/test_scripts/oplog-update-build-ids.py index 67e128c8e..2675d07c0 100644 --- a/scripts/test_scripts/oplog-update-build-ids.py +++ b/scripts/test_scripts/oplog-update-build-ids.py @@ -52,7 +52,7 @@ def list_builds_for_bucket(zen: str, host: str, namespace: str, bucket: str) -> result_path = Path(tmp.name) cmd = [ - zen, "builds", "list", + zen, "--enable-execution-history=false", "builds", "list", "--namespace", namespace, "--bucket", bucket, "--host", host, |