Skip to content

[4.1][SPARK-57267][INFRA] Prepare branch-4.1 build workflows for decoupling#56330

Open
gaogaotiantian wants to merge 4 commits into
apache:branch-4.1from
gaogaotiantian:decouple-branch41-ci
Open

[4.1][SPARK-57267][INFRA] Prepare branch-4.1 build workflows for decoupling#56330
gaogaotiantian wants to merge 4 commits into
apache:branch-4.1from
gaogaotiantian:decouple-branch41-ci

Conversation

@gaogaotiantian
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR makes the remaining branch-4.1 scheduled build workflow files self-contained, following the same approach as SPARK-57115 (which did this for build_java17.yml):

  • Rewrites build_java21.yml, build_non_ansi.yml, build_maven.yml, build_maven_java21.yml, build_python_3.14.yml, and build_python_pypy3.10.yml so they are triggered by workflow_dispatch only (the dormant schedule: triggers are removed; scheduled runs on a non-default branch never fire anyway), drop the inherited branch: master (so they build branch-4.1), and use generic, non-branch-tagged names.
  • Adds build_python_3.11.yml, the equivalent of build_branch41_python.yml.

The per-build configurations are relocated from the active build_branch41_*.yml files on master so the coverage matches what branch-4.1 schedules today.

Notes:

  • build_and_test.yml defaults branch to branch-4.1, so those callers omit branch. maven_test.yml defaults branch to master and checks out inputs.branch, so build_maven.yml / build_maven_java21.yml keep an explicit branch: branch-4.1.
  • A pre-existing invalid trailing comma in the non-ANSI envs JSON was fixed during relocation.

Why are the changes needed?

This is the branch-4.1 side of decoupling our scheduled CIs (cf. the branch-4.x effort). Scheduled workflows only fire from the default branch, so branch-4.1 CI should consist of self-contained, dispatchable workflow files on branch-4.1 that a single scheduler on master can trigger. This PR prepares those targets; a follow-up on master will add the scheduler and remove the build_branch41_*.yml files.

Does this PR introduce any user-facing change?

No. CI only.

How was this patch tested?

These workflows can be triggered manually via workflow_dispatch once merged.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.8)

…ontained

### What changes were proposed in this pull request?

This PR makes the remaining `branch-4.1` scheduled build workflow files
self-contained, following the same approach as SPARK-57115 (which did this for
`build_java17.yml`):

- Rewrites `build_java21.yml`, `build_non_ansi.yml`, `build_maven.yml`,
  `build_maven_java21.yml`, `build_python_3.14.yml`, and
  `build_python_pypy3.10.yml` so they are triggered by `workflow_dispatch` only
  (the dormant `schedule:` triggers are removed; scheduled runs on a non-default
  branch never fire anyway), drop the inherited `branch: master` (so they build
  `branch-4.1`), and use generic, non-branch-tagged names.
- Adds `build_python_3.11.yml`, the equivalent of `build_branch41_python.yml`.

The per-build configurations are relocated from the active
`build_branch41_*.yml` files on `master` so the coverage matches what
`branch-4.1` schedules today.

Notes:
- `build_and_test.yml` defaults `branch` to `branch-4.1`, so those callers omit
  `branch`. `maven_test.yml` defaults `branch` to `master` and checks out
  `inputs.branch`, so `build_maven.yml` / `build_maven_java21.yml` keep an
  explicit `branch: branch-4.1`.
- A pre-existing invalid trailing comma in the non-ANSI `envs` JSON was fixed
  during relocation.

### Why are the changes needed?

This is the `branch-4.1` side of decoupling our scheduled CIs (cf. the
`branch-4.x` effort). Scheduled workflows only fire from the default branch, so
`branch-4.1` CI should consist of self-contained, dispatchable workflow files on
`branch-4.1` that a single scheduler on `master` can trigger. This PR prepares
those targets; a follow-up on `master` will add the scheduler and remove the
`build_branch41_*.yml` files.

### Does this PR introduce _any_ user-facing change?

No. CI only.

### How was this patch tested?

These workflows can be triggered manually via `workflow_dispatch` once merged.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.8)

Co-authored-by: Isaac
Bump the `branch` input default in `maven_test.yml` from `master` to
`branch-4.1`, matching `build_and_test.yml` (which was already bumped when the
branch was cut). The maven default was missed, so maven callers that omit
`branch` were checking out `apache/spark@master`.

With the default fixed, `build_maven.yml` and `build_maven_java21.yml` no longer
need an explicit `branch: branch-4.1` (now identical to their `branch-4.x`
counterparts). This also corrects `build_maven_java21_macos26.yml` and
`build_maven_java21_arm.yml`, which omit `branch` and were likewise defaulting
to master. The `build_branch40_maven*.yml` files pass `branch: branch-4.0`
explicitly and are unaffected.

Co-authored-by: Isaac
…branch-4.1

Same fix as `maven_test.yml`: bump the `branch` input default in
`python_hosted_runner_test.yml` from `master` to `branch-4.1`. Its callers
`build_python_3.11_macos26.yml` and `build_python_3.11_arm.yml` omit `branch`,
so they were checking out `apache/spark@master` (the input is used as the
checkout `ref`).

`release.yml` keeps `default: master` for its `workflow_dispatch` input, where
the operator selects the branch to release.

Co-authored-by: Isaac
Copy link
Copy Markdown
Contributor

@zhengruifeng zhengruifeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for driving this effort!
It will significantly simplify the CI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants