Skip to content

Commit

Permalink
change to just be for generate-hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJang27 committed Mar 26, 2024
1 parent 4209958 commit aa7deba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compute_impacted_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions src/scripts/compute_impacted_targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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"
}

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/test_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit aa7deba

Please sign in to comment.