diff --git a/.github/workflows/compute_impacted_tests.yaml b/.github/workflows/compute_impacted_tests.yaml index 0a35ee2..bb4afbc 100644 --- a/.github/workflows/compute_impacted_tests.yaml +++ b/.github/workflows/compute_impacted_tests.yaml @@ -46,7 +46,7 @@ jobs: BAZEL_STARTUP_OPTIONS: --host_jvm_args=-Xmx12G,--block_for_lock,--client_debug BAZEL_PATH: bazel BAZEL_DIFF_CMD: ${{ steps.bazel-diff.outputs.bazel_diff_cmd }} - BAZEL_DIFF_ARGS: --bazelCommandOptions=--remote_cache= + BAZEL_COMMAND_OPTIONS: --remote_cache= TRUNK_API_ADDRESS: api.trunk-staging.io:8443 - name: Validate Impacted Targets Computation diff --git a/action.yaml b/action.yaml index 1b7773d..db89dcb 100644 --- a/action.yaml +++ b/action.yaml @@ -51,7 +51,7 @@ inputs: required: false default: test bazel-diff-command-options: - description: Additional args to append to the bazel diff command. + description: Additional args to append to the bazel diff bazelCommandOptions flag. required: false default: "" test-kind-filter: @@ -140,7 +140,7 @@ runs: WORKSPACE_PATH: ${{ steps.prerequisites.outputs.workspace_path }} BAZEL_PATH: ${{ inputs.bazel-path }} BAZEL_DIFF_CMD: ${{ steps.bazel-diff.outputs.bazel_diff_cmd }} - BAZEL_DIFF_ARGS: ${{ inputs.bazel-diff-args }} + BAZEL_COMMAND_OPTIONS: ${{ inputs.bazel-diff-command-options }} BAZEL_STARTUP_OPTIONS: ${{ inputs.bazel-startup-options }} - name: Upload Impacted Targets @@ -175,7 +175,7 @@ runs: WORKSPACE_PATH: ${{ steps.prerequisites.outputs.workspace_path }} BAZEL_PATH: ${{ inputs.bazel-path }} BAZEL_DIFF_CMD: ${{ steps.bazel-diff.outputs.bazel_diff_cmd }} - BAZEL_DIFF_ARGS: ${{ inputs.bazel-diff-command-options }} + BAZEL_COMMAND_OPTIONS: ${{ inputs.bazel-diff-command-options }} BAZEL_STARTUP_OPTIONS: ${{ inputs.bazel-startup-options }} - name: Test Impacted Targets diff --git a/src/scripts/compute_impacted_targets.sh b/src/scripts/compute_impacted_targets.sh index 794c646..4a98a51 100755 --- a/src/scripts/compute_impacted_targets.sh +++ b/src/scripts/compute_impacted_targets.sh @@ -46,12 +46,9 @@ _bazel() { _bazel_diff() { if [[ -n ${VERBOSE-} ]]; then - echo "calling bazel diff" # TODO: REMOVE - # trunk-ignore(shellcheck) - ${BAZEL_DIFF_CMD} "$@" --verbose ${BAZEL_DIFF_ARGS} + ${BAZEL_DIFF_CMD} "$@" --verbose else - # trunk-ignore(shellcheck) - ${BAZEL_DIFF_CMD} "$@" ${BAZEL_DIFF_ARGS} + ${BAZEL_DIFF_CMD} "$@" fi } @@ -81,7 +78,7 @@ generate_hashes() { --bazelPath "${BAZEL_PATH}" \ -so="${bazel_startup_options}" \ --workspacePath "${WORKSPACE_PATH}" \ - --bazelCommandOptions "--noshow_progress" \ + --bazelCommandOptions "--noshow_progress" "${BAZEL_COMMAND_OPTIONS}" \ "$1" } diff --git a/src/scripts/test_wrapper.sh b/src/scripts/test_wrapper.sh index 393b944..51663a7 100755 --- a/src/scripts/test_wrapper.sh +++ b/src/scripts/test_wrapper.sh @@ -18,7 +18,7 @@ TARGET_BRANCH=main BAZEL_PATH="${BAZEL_PATH:-.trunk/tools/bazel}" CACHE_DIR="${HOME}/.cache/trunk/bazel-diff" BAZEL_STARTUP_OPTIONS="" -BAZEL_DIFF_ARGS="" +BAZEL_COMMAND_OPTIONS="" mkdir -p "${CACHE_DIR}"