You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/09/29 13:38:03 UTC

[PR] Use global runner output across GitHub workflows [shardingsphere]

terrymanu opened a new pull request, #40003:
URL: https://github.com/apache/shardingsphere/pull/40003

   (no comment)


-- 
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] Use global runner output across GitHub workflows [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #40003:
URL: https://github.com/apache/shardingsphere/pull/40003#issuecomment-5891444808

   ### Result
   
   **Review Result: Mergeable**
   
   The local changes passed code review. Of the 33 jobs that originally hard-coded `runs-on: ubuntu-latest`, 32 now read `needs.global-environment.outputs.GLOBAL_RUNS_ON`. The job that produces this output is the sole exception. No runner fallback was added. Nothing was committed or pushed, and no PR was created.
   
   ### Evidence
   
   | Workflow | Jobs changed to read the shared output |
   |---|---|
   | [ci-mcp.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/ci-mcp.yml) | `mcp-unit-tests` |
   | [ci.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/ci.yml) | `ci` |
   | [e2e-agent.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/e2e-agent.yml) | `build-e2e-image`, `agent-mysql` |
   | [e2e-mcp.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/e2e-mcp.yml) | `e2e-mcp-build-images`, `e2e-mcp-build-llm-image`, `e2e-mcp-functionality`, `e2e-mcp-conformance`, `e2e-mcp-llm` |
   | [e2e-operation.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/e2e-operation.yml) | `detect-changed-files`, `prepare-e2e-artifacts`, `e2e-operation` |
   | [e2e-sql.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/e2e-sql.yml) | `detect-and-generate-matrix`, `prepare-e2e-artifacts`, `e2e-sql-smoke`, `detect-remaining-matrix`, `e2e-sql-stage2` |
   | [nightly-build.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/nightly-build.yml) | `upload-to-nightlies`, `build-agent-image`, `generate-and-test-examples` |
   | [nightly-check.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/nightly-check.yml) | `check-dead-links`, `check-codeql`, `check-stale` |
   | [nightly-e2e-agent.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/nightly-e2e-agent.yml) | `build-e2e-image`, `agent-mysql` |
   | [nightly-sql-parser.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/nightly-sql-parser.yml) | `database-parse` |
   | [release-mcp.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/release-mcp.yml) | `release-mcp` |
   | [required-check.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/required-check.yml) | `check-checkstyle`, `check-spotless`, `check-license` |
   | [schedule-report.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/schedule-report.yml) | `check-and-report-jacoco`, `check-and-report-sonarcloud` |
   
   **Sole exception:** [`init-environment` in required-reusable.yml](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/required-reusable.yml:35) keeps `ubuntu-latest`. It must select a runner before it can check out the repository and read the variables file, so it cannot select its runner from its own output.
   
   **Dependencies before and after:** The 21 target jobs that already depended directly on `global-environment` retain those dependencies. Seven jobs that could previously start immediately now wait for `global-environment`: `mcp-unit-tests`, the two MCP image build jobs, `detect-changed-files`, `detect-and-generate-matrix`, `check-dead-links`, and `check-stale`. Four more jobs gained a direct dependency while retaining their existing ones: the three downstream MCP E2E jobs and `detect-remaining-matrix`. Each of `ci-mcp` and `e2e-mcp` gained one job that calls the shared initialization workflow. The two MCP image builds can still run in parallel after initialization.
   
   **PR security boundary:** The [shared initialization output expression](/Users/zhangliang/IdeaProjects/shardingsphere/.github/workflows/required-reusable.yml:74) fixes the output to `ubuntu-latest` when the repository is `apache/shardingsphere` and the event is `pull_request`. A PR that changes only `GLOBAL_RUNS_ON` in the variables file therefore cannot schedule upstream PR checks on a self-hosted runner. [GitHub’s documentation](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations#github-context) confirms that a called workflow uses the caller’s `github` context. The upstream variables file still sets `GLOBAL_RUNS_ON=ubuntu-latest`.
   
   **Verification:** All 18 workflow YAML files parsed successfully. Spotless passed for all 14 changed files, and `git diff --check` passed. A comparison with the original files confirmed that triggers, existing `if` conditions, matrices, steps, and existing dependencies were preserved. The initialization job is now the only remaining literal `runs-on: ubuntu-latest`. Checkstyle and RAT do not apply because no Java files were changed and no files were added. Remote GitHub Actions were not run.
   
   **Practical impact:** The seven jobs identified above now wait for initialization. No remote run was performed, so the added time has not been measured. If initialization cannot complete, it blocks those jobs; no fallback was added, as requested. The commercial edition can share these 32 runner declarations and the initialization pattern in the two MCP workflows. The commercial repository was not inspected, so 32 should not be treated as a measured count of differences that can be removed there.
   
   ### Coverage
   
   This was a review of a standalone local change against baseline `3c15cbc8b0bb9e660ae075a4fde428fc69110514`, covering 14 workflow files. The review covered runner selection, the PR configuration trust boundary, job dependencies, check and alert steps, and formatting. No code scope issues remain unresolved. This result covers the local code only; remote CI results were not reviewed. Two unrelated, previously untracked `__pycache__` directories were left untouched.


-- 
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] Use global runner output across GitHub workflows [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #40003:
URL: https://github.com/apache/shardingsphere/pull/40003


-- 
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