This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-9524-2d92b0d69d1c8f38b72ae2e8d8f22ec29e845b1d in repository https://gitbox.apache.org/repos/asf/texera.git
commit a4d46b789f1ee1f71149ab737f1780c776c88d07 Author: Kary Zheng <[email protected]> AuthorDate: Mon Nov 23 22:23:31 2026 +0000 feat(ci): run Workflow-to-Python verification only when relevant files change (#9524) ### What changes were proposed in this PR? The Workflow-to-Python verification runs in the workflow-compiling-service leg of platform-integration. Until now it ran whenever that job ran. This PR gives it its own precheck stack, `workflow-to-python`, and gates its five steps on it. | PR touches | Before | After | |---|---|---| | Another platform service only, e.g. file-service | Verification runs | Service boots, verification skipped | | amber's Python runtime or its requirements (`pyamber`) | Not run | Runs | | Operators, core types, build files (`common`) | Runs | Runs | | workflow-compiling-service or amber's protobuf (new `workflow-to-python` label) | Runs | Runs | | Push to main | Runs | Runs (every stack still runs) | A `pyamber` PR now also starts platform-integration, so the other four services boot too. Keeping verification in its current job keeps this diff small. ### Any related issues, documentation, discussions? Closes #9523 ### How was this PR tested? All five changed files parse as YAML. This PR carries the `ci` label, so its own run turns every stack on, including verification. That run checks the new input and conditions are wired correctly. It does not exercise the skip path. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --- .github/labeler.yml | 14 ++++++++++++++ .github/workflows/backport-checks.yml | 1 + .github/workflows/build.yml | 18 ++++++++++++------ .github/workflows/precheck.yml | 24 +++++++++++++++++++++--- .github/workflows/required-checks.yml | 1 + 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1b6ec12230..dc28322c2b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -59,6 +59,20 @@ platform: - 'result-service/**' - 'workflow-compiling-service/**' +workflow-to-python: + # Fires the Workflow-to-Python verification for the paths no other label + # covers for it: the translator and the verification framework, the + # protobuf that amber's Python runtime imports, and the script and protoc + # version that generate its Python bindings. Operators and core types + # reach it through `common`, and amber's Python code and its requirements + # through `pyamber`. + - changed-files: + - any-glob-to-any-file: + - 'workflow-compiling-service/**' + - 'amber/src/main/protobuf/**' + - 'bin/python-proto-gen.sh' + - 'bin/protoc-version.txt' + agent-service: - changed-files: - any-glob-to-any-file: diff --git a/.github/workflows/backport-checks.yml b/.github/workflows/backport-checks.yml index 5d3405fa12..d4dabfc4b2 100644 --- a/.github/workflows/backport-checks.yml +++ b/.github/workflows/backport-checks.yml @@ -134,6 +134,7 @@ jobs: run_amber_integration: ${{ needs.precheck.outputs.run_amber_integration == 'true' }} run_platform: ${{ needs.precheck.outputs.run_platform == 'true' }} run_platform_integration: ${{ needs.precheck.outputs.run_platform_integration == 'true' }} + run_workflow_to_python: ${{ needs.precheck.outputs.run_workflow_to_python == 'true' }} run_pyamber: ${{ needs.precheck.outputs.run_pyamber == 'true' }} run_agent_service: ${{ needs.precheck.outputs.run_agent_service == 'true' }} run_infra: ${{ needs.precheck.outputs.run_infra == 'true' }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0a56218d1..4421630ffb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,10 @@ on: required: false type: boolean default: true + run_workflow_to_python: + required: false + type: boolean + default: true run_pyamber: required: false type: boolean @@ -988,9 +992,11 @@ jobs: # --- workflow-compiling-service only: provision Python so the verify # spec (OperatorBehaviorSpec) can fork real interpreters. These four # steps mirror the retired standalone workflow-compiling-service-integration - # job; they are no-ops for every other service in the matrix. + # job; they are no-ops for every other service in the matrix. They and the + # verify step below also skip when precheck leaves run_workflow_to_python + # off, so a PR that cannot change either result only boots the service. - name: Setup Python for Scala-Python verification tests - if: ${{ matrix.service == 'workflow-compiling-service' }} + if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} uses: actions/setup-python@v7 with: python-version: "3.12" @@ -1000,7 +1006,7 @@ jobs: # to PYTHONPATH). Install amber's runtime deps, same as amber-integration. # dev-requirements.txt provides the betterproto plugin used by # bin/python-proto-gen.sh in the proto-generation step below. - if: ${{ matrix.service == 'workflow-compiling-service' }} + if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} run: | python -m pip install uv if [ -f amber/requirements.txt ]; then uv pip install --system --index-strategy unsafe-best-match -r amber/requirements.txt; fi @@ -1011,7 +1017,7 @@ jobs: # generated betterproto bindings in amber/src/main/python/proto (gitignored, # not checked in). Pin protoc to bin/protoc-version.txt via the upstream # release zip. Linux-only: this job runs on ubuntu-latest. - if: ${{ matrix.service == 'workflow-compiling-service' }} + if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} run: | PROTOC_VERSION=$(cat bin/protoc-version.txt) curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" @@ -1022,7 +1028,7 @@ jobs: # Regenerate amber/src/main/python/proto so the forked py_op_driver can # import pyamber; without this Path A fails with ImportError on proto # symbols (e.g. ChannelIdentity). - if: ${{ matrix.service == 'workflow-compiling-service' }} + if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} run: bash bin/python-proto-gen.sh - name: Create Databases run: | @@ -1120,7 +1126,7 @@ jobs: # operator that cannot run, recorded against an issue in the runner itself. # UDF_PYTHON_PATH points the harness at the provisioned interpreter (bare # name resolves via PATH); it auto-locates amber/src/main/python. - if: ${{ matrix.service == 'workflow-compiling-service' }} + if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} env: WCS_TEST_FILTER: integration-only UDF_PYTHON_PATH: python diff --git a/.github/workflows/precheck.yml b/.github/workflows/precheck.yml index 32244e49dc..cfc6b6656a 100644 --- a/.github/workflows/precheck.yml +++ b/.github/workflows/precheck.yml @@ -40,6 +40,8 @@ on: value: ${{ jobs.decide.outputs.run_platform }} run_platform_integration: value: ${{ jobs.decide.outputs.run_platform_integration }} + run_workflow_to_python: + value: ${{ jobs.decide.outputs.run_workflow_to_python }} run_pyamber: value: ${{ jobs.decide.outputs.run_pyamber }} run_agent_service: @@ -68,6 +70,7 @@ jobs: run_amber_integration: ${{ steps.decide.outputs.run_amber_integration }} run_platform: ${{ steps.decide.outputs.run_platform }} run_platform_integration: ${{ steps.decide.outputs.run_platform_integration }} + run_workflow_to_python: ${{ steps.decide.outputs.run_workflow_to_python }} run_pyamber: ${{ steps.decide.outputs.run_pyamber }} run_agent_service: ${{ steps.decide.outputs.run_agent_service }} run_infra: ${{ steps.decide.outputs.run_infra }} @@ -256,19 +259,30 @@ jobs: // `amber-integration` label catches *IntegrationSpec.scala // edits so a test-only change does not trigger the full // Scala-only amber stack. + // + // `workflow-to-python` is the Workflow-to-Python verification, + // which runs inside the workflow-compiling-service leg of + // platform-integration, so every label that fires it also fires + // platform-integration. It compares an operator run on the + // platform with its exported Python script, so it fires on a + // change that can move either result: operators and core types + // (`common`), amber's Python runtime and its Python dependencies + // (`pyamber`), and the translator, the verification framework and + // the protobuf the runtime imports (`workflow-to-python`). const LABEL_STACKS = { frontend: ["frontend"], - pyamber: ["amber-integration", "pyamber"], + pyamber: ["amber-integration", "pyamber", "platform-integration", "workflow-to-python"], engine: ["amber", "amber-integration"], "amber-integration": ["amber-integration"], platform: ["platform", "platform-integration"], "platform-integration": ["platform-integration"], + "workflow-to-python": ["platform-integration", "workflow-to-python"], "agent-service": ["agent-service"], "pyright-language-service": ["pyright-language-service"], - common: ["amber", "amber-integration", "platform", "platform-integration"], + common: ["amber", "amber-integration", "platform", "platform-integration", "workflow-to-python"], "ddl-change": ["amber", "amber-integration", "platform", "platform-integration"], infra: ["infra"], - ci: ["frontend", "amber", "amber-integration", "platform", "platform-integration", "pyamber", "agent-service", "infra", "pyright-language-service"], + ci: ["frontend", "amber", "amber-integration", "platform", "platform-integration", "workflow-to-python", "pyamber", "agent-service", "infra", "pyright-language-service"], }; let runFrontend = true; @@ -276,6 +290,7 @@ jobs: let runAmberIntegration = true; let runPlatform = true; let runPlatformIntegration = true; + let runWorkflowToPython = true; let runPyamber = true; let runAgentService = true; let runInfra = true; @@ -293,6 +308,7 @@ jobs: runAmberIntegration = stacks.has("amber-integration"); runPlatform = stacks.has("platform"); runPlatformIntegration = stacks.has("platform-integration"); + runWorkflowToPython = stacks.has("workflow-to-python"); runPyamber = stacks.has("pyamber"); runAgentService = stacks.has("agent-service"); runInfra = stacks.has("infra"); @@ -308,6 +324,7 @@ jobs: runAmberIntegration = false; runPlatform = false; runPlatformIntegration = false; + runWorkflowToPython = false; runPyamber = false; runAgentService = false; runInfra = false; @@ -319,6 +336,7 @@ jobs: core.setOutput("run_amber_integration", runAmberIntegration ? "true" : "false"); core.setOutput("run_platform", runPlatform ? "true" : "false"); core.setOutput("run_platform_integration", runPlatformIntegration ? "true" : "false"); + core.setOutput("run_workflow_to_python", runWorkflowToPython ? "true" : "false"); core.setOutput("run_pyamber", runPyamber ? "true" : "false"); core.setOutput("run_agent_service", runAgentService ? "true" : "false"); core.setOutput("run_infra", runInfra ? "true" : "false"); diff --git a/.github/workflows/required-checks.yml b/.github/workflows/required-checks.yml index c7aa15253b..a2804df444 100644 --- a/.github/workflows/required-checks.yml +++ b/.github/workflows/required-checks.yml @@ -61,6 +61,7 @@ jobs: run_amber_integration: ${{ needs.precheck.outputs.run_amber_integration == 'true' }} run_platform: ${{ needs.precheck.outputs.run_platform == 'true' }} run_platform_integration: ${{ needs.precheck.outputs.run_platform_integration == 'true' }} + run_workflow_to_python: ${{ needs.precheck.outputs.run_workflow_to_python == 'true' }} run_pyamber: ${{ needs.precheck.outputs.run_pyamber == 'true' }} run_agent_service: ${{ needs.precheck.outputs.run_agent_service == 'true' }} run_infra: ${{ needs.precheck.outputs.run_infra == 'true' }}
