diff --git a/.github/actions/bazel/action.yaml b/.github/actions/bazel/action.yaml index 938da2fb2e82..3234a19a97ca 100644 --- a/.github/actions/bazel/action.yaml +++ b/.github/actions/bazel/action.yaml @@ -73,46 +73,19 @@ runs: ${{ steps.metrics-tmpdir.outputs.dir }}/bazel-bep-*.pb.gpg ${{ steps.metrics-tmpdir.outputs.dir }}/profile-*.json - - # Remove unnecessary entries from the JSON execlogs and create a CSV out of them - - name: Clean up execlogs + - name: Convert execlogs to CSV shell: bash if: (success() || failure()) && inputs.execlogs-artifact-name != '' run: | - execlogs_json_in='${{ steps.metrics-tmpdir.outputs.dir }}/execlogs.json' - find '${{ steps.metrics-tmpdir.outputs.dir }}' -name 'execlog-*.json' \ - -exec cat {} \; > "$execlogs_json_in" - - execlogs_csv_out='${{ steps.metrics-tmpdir.outputs.dir }}/execlogs.csv' - if ! [ -s "$execlogs_json_in" ]; then - echo "no execlogs found" - touch "$execlogs_csv_out" # create empty CSV - exit 0 - fi - - # this filters out some entries from the input JSON execlogs. Without this, - # jq takes 3+ minutes to parse the execlogs. - # Effectively removes a full line of "commandArgs", and takes care of skipping - # multiple lines for some multiline array values we don't care about - prog=' - BEGIN { arr = 0; } - arr == 1 && / }],?/ { arr = 0; next } - arr == 1 { next } - / "commandArgs":.*/ { next } - / "environmentVariables": \[\{/ { arr = 1; next; } - / "inputs": \[\{/ { arr = 1; next; } - { print } - ' - - # Turns the JSON execlogs into a CSV with the following columns: - #