sandynz commented on PR #38277:
URL: https://github.com/apache/shardingsphere/pull/38277#issuecomment-3978797037
# Major Change 1
Adds Stage 2 to the `e2e-sql` workflow so that all E2E scenario combinations
not covered by Stage 1 (smoke) are executed when Stage 1 passes, achieving full
test coverage without blocking fast feedback.
## Workflow changes (`e2e-sql.yml`)
- **Rename** `e2e-sql` → `e2e-sql-smoke`: marks it explicitly as the Stage 1
smoke run
- **`detect-and-generate-matrix`**: emits a new `filter-json` output so
downstream jobs can reproduce the filter context
- **`detect-remaining-matrix`** (new): runs after `e2e-sql-smoke` succeeds;
calls `generate-remaining-matrix.sh` and exposes `matrix` +
`has-remaining-jobs` outputs
- **`e2e-sql-stage2`** (new): uses
`fromJSON(needs.detect-remaining-matrix.outputs.matrix)`; skipped entirely when
`has-remaining-jobs != 'true'`
## New script (`generate-remaining-matrix.sh`)
Computes the Stage 2 delta matrix:
```bash
# Force full-matrix path in generate-e2e-sql-matrix.sh
FULL_FILTER_JSON=$(echo "$FILTER_JSON" | jq -c '.core_infra = "true" |
.test_framework = "false" | .pom_changes = "false"')
GITHUB_OUTPUT="$TEMP_OUTPUT" bash generate-e2e-sql-matrix.sh
"$FULL_FILTER_JSON"
# Subtract Stage 1 completed jobs (matched on
adapter+mode+database+scenario+additional-options)
REMAINING_JOBS=$(jq -cn \
--argjson full "$FULL_MATRIX" --argjson completed "$COMPLETED_JOBS" \
'[$full.include[] as $job | select([$completed[] | select(
.adapter == $job.adapter and .mode == $job.mode and
.database == $job.database and .scenario == $job.scenario and
.["additional-options"] == $job["additional-options"]
)] | length == 0) | $job]')
```
**Invariant**: Stage 1 jobs + Stage 2 jobs = full 119-job matrix. If Stage 1
already ran the full matrix (e.g., `core_infra` change), Stage 2 emits
`has-remaining-jobs=false` and is skipped.
--
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]