From 1855839861a89ed31e1a266a780781ebca0158d3 Mon Sep 17 00:00:00 2001 From: maru Date: Mon, 22 Sep 2025 23:28:25 +0000 Subject: [PATCH 1/2] [ci] Remove run_env from run-monitored-tmpnet-cmd With the transition to using go-task, all CI jobs are responsible for internalizing env vars and arguments to simplify local reproduction of CI failures. This removes the need for the run-monitored-tmpnet-cmd to support providing env vars via run_env. --- .github/actions/run-monitored-tmpnet-cmd/action.yml | 5 +---- tests/fixture/tmpnet/README.md | 11 ++++------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/actions/run-monitored-tmpnet-cmd/action.yml b/.github/actions/run-monitored-tmpnet-cmd/action.yml index f0c3c062e727..744a09ff2c7f 100644 --- a/.github/actions/run-monitored-tmpnet-cmd/action.yml +++ b/.github/actions/run-monitored-tmpnet-cmd/action.yml @@ -5,9 +5,6 @@ inputs: run: description: "the bash script to run e.g. ./scripts/my-script.sh" required: true - run_env: - description: 'a string containing env vars for the command e.g. "MY_VAR1=foo MY_VAR2=bar"' - default: '' runtime: description: 'the tmpnet runtime being used' default: 'process' @@ -82,7 +79,7 @@ runs: - name: Run command shell: bash # --impure ensures the env vars are accessible to the command - run: ${{ inputs.run_env }} $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }} + run: $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }} env: # Always collect metrics locally even when nodes are running in kube to enable collection from the test workload TMPNET_START_METRICS_COLLECTOR: ${{ inputs.prometheus_username != '' }} diff --git a/tests/fixture/tmpnet/README.md b/tests/fixture/tmpnet/README.md index 49b5f8da6a52..7998c261a898 100644 --- a/tests/fixture/tmpnet/README.md +++ b/tests/fixture/tmpnet/README.md @@ -469,15 +469,12 @@ Example usage: # A qualified path is required for use outside of avalanchego # e.g. `ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@[sha or tag]` - uses: ./.github/actions/run-monitored-tmpnet-cmd # + uses: ./.github/actions/run-monitored-tmpnet-cmd with: - # This needs to be the path to a bash script - run: ./scripts/tests.e2e.sh - - # Env vars for the script need to be provided via run_env as a space-separated string - # e.g. `MY_VAR1=foo MY_VAR2=bar` - run_env: E2E_SERIAL=1 + # This should be a task invocation, not a script. The task should internalize arguments and env + # vars to ensure that the job can be reproduced locally with minimal expertise. + run: ./scripts/run_task.sh test-e2e-ci # Sets the prefix of the artifact containing the tmpnet network dir for this job. # Only required if a workflow uses this action more than once so that each artifact From ae607e3aafef72c17b59871963f5b448732cfbe5 Mon Sep 17 00:00:00 2001 From: maru Date: Mon, 22 Sep 2025 23:33:04 +0000 Subject: [PATCH 2/2] fixup: Update run parameter description --- .github/actions/run-monitored-tmpnet-cmd/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-monitored-tmpnet-cmd/action.yml b/.github/actions/run-monitored-tmpnet-cmd/action.yml index 744a09ff2c7f..c32207d2014c 100644 --- a/.github/actions/run-monitored-tmpnet-cmd/action.yml +++ b/.github/actions/run-monitored-tmpnet-cmd/action.yml @@ -3,7 +3,7 @@ description: 'Run the provided command in an environment configured to monitor t inputs: run: - description: "the bash script to run e.g. ./scripts/my-script.sh" + description: "the task invocation e.g. ./scripts/run_task.sh my-task" required: true runtime: description: 'the tmpnet runtime being used'