krishvishal commented on code in PR #3095:
URL: https://github.com/apache/iggy/pull/3095#discussion_r3071842810
##########
.github/actions/rust/pre-merge/action.yml:
##########
@@ -59,6 +59,42 @@ runs:
esac
shell: bash
+ # DAG-based test scoping: compute affected crates from cargo metadata +
git diff
+ # to avoid running the full test suite when only a subset of crates
changed.
+ # Safety: cargo check/clippy run on the full workspace separately,
catching all
+ # compilation errors. This only scopes test BUILD and EXECUTION.
+ - name: Fetch base branch for DAG analysis
+ if: startsWith(inputs.task, 'test-')
+ run: git fetch origin master --depth=1 2>/dev/null || true
+ shell: bash
+
+ - name: Compute affected crates (DAG-based)
+ if: startsWith(inputs.task, 'test-')
+ id: affected
+ run: |
+ NEXTEST_FILTER=""
+ PACKAGES=""
+
+ if python3 scripts/ci/affected-crates.py --base-ref origin/master
--format nextest-filter > /tmp/nextest-filter.txt 2>/tmp/affected-stderr.txt;
then
+ NEXTEST_FILTER=$(cat /tmp/nextest-filter.txt)
+ fi
+ if python3 scripts/ci/affected-crates.py --base-ref origin/master
--format packages > /tmp/packages.txt 2>/tmp/affected-stderr.txt; then
+ PACKAGES=$(cat /tmp/packages.txt)
+ fi
+
+ if [[ -n "$NEXTEST_FILTER" ]]; then
+ CRATE_COUNT=$(echo "$NEXTEST_FILTER" | grep -o 'package(' | wc -l)
+ echo "::notice::DAG analysis: ${CRATE_COUNT} affected crates (of 43
total)"
+ echo "scoped=true" >> $GITHUB_OUTPUT
Review Comment:
Done. Removed it.
##########
.github/actions/rust/pre-merge/action.yml:
##########
@@ -59,6 +59,42 @@ runs:
esac
shell: bash
+ # DAG-based test scoping: compute affected crates from cargo metadata +
git diff
+ # to avoid running the full test suite when only a subset of crates
changed.
+ # Safety: cargo check/clippy run on the full workspace separately,
catching all
+ # compilation errors. This only scopes test BUILD and EXECUTION.
+ - name: Fetch base branch for DAG analysis
+ if: startsWith(inputs.task, 'test-')
+ run: git fetch origin master --depth=1 2>/dev/null || true
+ shell: bash
+
+ - name: Compute affected crates (DAG-based)
+ if: startsWith(inputs.task, 'test-')
+ id: affected
+ run: |
+ NEXTEST_FILTER=""
+ PACKAGES=""
+
+ if python3 scripts/ci/affected-crates.py --base-ref origin/master
--format nextest-filter > /tmp/nextest-filter.txt 2>/tmp/affected-stderr.txt;
then
+ NEXTEST_FILTER=$(cat /tmp/nextest-filter.txt)
+ fi
+ if python3 scripts/ci/affected-crates.py --base-ref origin/master
--format packages > /tmp/packages.txt 2>/tmp/affected-stderr.txt; then
+ PACKAGES=$(cat /tmp/packages.txt)
+ fi
+
+ if [[ -n "$NEXTEST_FILTER" ]]; then
+ CRATE_COUNT=$(echo "$NEXTEST_FILTER" | grep -o 'package(' | wc -l)
+ echo "::notice::DAG analysis: ${CRATE_COUNT} affected crates (of 43
total)"
Review Comment:
Done. Removed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]