Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use grep and not ggrep in filter-virtual-threads-tests-json.sh #35056

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/filter-virtual-threads-tests-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXPR='((?:(?<=^)|(?<=,)|(?<=, ))('
while read -r impacted
do
EXPR+="${impacted}|"
done < <(echo -n "$1" | ggrep -Po '(?<=integration-tests/virtual-threads/).+')
done < <(echo -n "$1" | grep -Po '(?<=integration-tests/virtual-threads/).+')
EXPR+=')(,|$))+'

# Step 2: apply the filter expression via grep to each "test-modules" list and replace each original list with the filtered one
Expand All @@ -35,7 +35,7 @@ do
# Notes:
# - trailing "|" (after EXPR) avoids grep return code > 0 if nothing matches (which is a valid case)
# - "paste" joins all matches to get a single line
FILTERED=$(echo -n "${modules}" | ggrep -Po "${EXPR}|" | paste -sd " " -)
FILTERED=$(echo -n "${modules}" | grep -Po "${EXPR}|" | paste -sd " " -)
JSON=$(echo -n "${JSON}" | sed "s|${modules}|${FILTERED}|")
done < <(echo -n "${JSON}" | jq -r '.include[] | ."test-modules"')

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
outputs:
native_matrix: ${{ steps.calc-native-matrix.outputs.matrix }}
jvm_matrix: ${{ steps.calc-jvm-matrix.outputs.matrix }}
virtual_threads_matrix: ${{ steps.calc-virtual_threads-matrix.outputs.matrix }}
virtual_threads_matrix: ${{ steps.calc-virtual-threads-matrix.outputs.matrix }}
run_jvm: ${{ steps.calc-run-flags.outputs.run_jvm }}
run_devtools: ${{ steps.calc-run-flags.outputs.run_devtools }}
run_gradle: ${{ steps.calc-run-flags.outputs.run_gradle }}
Expand All @@ -228,7 +228,7 @@ jobs:
echo "${json}"
echo "matrix=${json}" >> $GITHUB_OUTPUT
- name: Calculate matrix from virtual-threads-tests.json
id: calc-virtual_threads-matrix
id: calc-virtual-threads-matrix
run: |
echo "GIB_IMPACTED_MODULES: ${GIB_IMPACTED_MODULES}"
json=$(.github/filter-virtual-threads-tests-json.sh "${GIB_IMPACTED_MODULES}" | tr -d '\n')
Expand Down