From 425019728ac09a6b311c0dab582db216d3e92d72 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 27 Jul 2023 11:33:16 +0200 Subject: [PATCH 1/2] Make virtual thread CI declaration a bit more consistent with the rest --- .github/workflows/ci-actions-incremental.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index f6df078b36e60..a2dbb294c1f41 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -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 }} @@ -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') From 5aeef321be873d5e2dd2a2dbf734c826896ffb45 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 27 Jul 2023 11:33:36 +0200 Subject: [PATCH 2/2] Use grep and not ggrep in filter-virtual-threads-tests-json.sh See https://github.com/quarkusio/quarkus/actions/runs/5672786922/job/15373773822 --- .github/filter-virtual-threads-tests-json.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/filter-virtual-threads-tests-json.sh b/.github/filter-virtual-threads-tests-json.sh index 28c2efee14f6c..55e011a286d59 100755 --- a/.github/filter-virtual-threads-tests-json.sh +++ b/.github/filter-virtual-threads-tests-json.sh @@ -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 @@ -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"')