You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "sandynz (via GitHub)" <gi...@apache.org> on 2026/02/28 13:08:56 UTC
[PR] feat: add Stage 2 full dynamic matrix for e2e-sql CI workflow [shardingsphere]
sandynz opened a new pull request, #38277:
URL: https://github.com/apache/shardingsphere/pull/38277
Fixes #38270.
Changes proposed in this pull request:
- feat: add Stage 2 full dynamic matrix for e2e-sql CI workflow
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
- [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add Stage 2 full dynamic matrix for e2e-sql CI workflow [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add Stage 2 full dynamic matrix for e2e-sql CI workflow [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on PR #38277:
URL: https://github.com/apache/shardingsphere/pull/38277#issuecomment-3978800770
# Major Change 2 - E2E-SQL CI: two-matrix approach so smoke always runs fixed 6 scenarios. To fix Major Change 1
When `test_framework=true` (or `core_infra`/`pom_changes`), the full-matrix fallback caused `e2e-sql-smoke` to fan out to ~119 jobs instead of a small stable set. The fix splits matrix generation into a fixed smoke stage and a dynamic full stage, ensuring stage 1 is always small regardless of what triggered CI.
## `generate-e2e-sql-matrix.sh`
- Now outputs two matrices: `smoke-matrix` (always the 6 fixed scenarios: `empty_rules`, `db`, `tbl`, `encrypt`, `readwrite_splitting`, `passthrough`) and `full-matrix` (existing dynamic logic unchanged)
- `matrix` kept as alias for `full-matrix` for backward compatibility
- `has-jobs` reflects full-matrix; `need-proxy-image` is `true` if **either** matrix contains a proxy job
- Extra passthrough connector-version job (`-Dmysql-connector-java.version=8.3.0`) excluded from smoke-matrix, present in full-matrix only
- Smoke matrix applies the same adapter/mode/database dimension-selection rules and the same 5 excludes as the full matrix
- Adds `::notice::` logging: counts for both matrices, full-fallback flag, selected dimensions
## `generate-remaining-matrix.sh`
- Signature changed from `(filter-json, previous-matrix)` to `(full-matrix, smoke-matrix)` — receives pre-computed JSON directly, no longer re-invokes the generator
- `remaining = full.include − smoke.include` keyed on `adapter + mode + database + scenario + additional-options`
## `e2e-sql.yml`
- `detect-and-generate-matrix` exposes two new outputs: `smoke-matrix`, `full-matrix`
- `e2e-sql-smoke` uses `smoke-matrix` → always ≤30 jobs regardless of fallback trigger
- `detect-remaining-matrix` passes `full-matrix` + `smoke-matrix` env vars to the updated script; stage 2 runs the delta only after smoke passes
**Example outcome for `test_framework=true`:** smoke=30 jobs (6 scenarios × all dimensions − excludes), full=119 jobs, stage-2 remaining=89 jobs.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add Stage 2 full dynamic matrix for e2e-sql CI workflow [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz merged PR #38277:
URL: https://github.com/apache/shardingsphere/pull/38277
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org