Skip to content

[MINOR][INFRA][4.x] Fix branch input default in build_and_test.yml#55797

Closed
zhengruifeng wants to merge 1 commit into
apache:branch-4.xfrom
zhengruifeng:fix-branch-default-4.x
Closed

[MINOR][INFRA][4.x] Fix branch input default in build_and_test.yml#55797
zhengruifeng wants to merge 1 commit into
apache:branch-4.xfrom
zhengruifeng:fix-branch-default-4.x

Conversation

@zhengruifeng
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Update the default value of the branch workflow input in .github/workflows/build_and_test.yml from master to branch-4.x, and drop the stale # Change 'master' to 'branch-4.0' in branch-4.0 branch after cutting it. comment.

Why are the changes needed?

When branch-4.x was cut from master, the comment in build_and_test.yml flagged that the default should be updated, but it wasn't. As a result, the Build workflow on pushes to branch-4.x invokes the reusable build_and_test.yml without an explicit branch input, which falls back to the default master. The precondition job then runs actions/checkout with ref: master against apache/spark, so the CI tests master rather than branch-4.x.

The same misconfiguration was observed on branch-4.2 (example CI run) and is fixed there in a sibling PR. The same fix was already applied on branch-4.0 and branch-4.1.

Does this PR introduce any user-facing change?

No. CI-only.

How was this patch tested?

GitHub Actions on this PR. The default takes effect on subsequent pushes to branch-4.x.

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

Generated-by: Claude Code

The `branch` workflow input in `.github/workflows/build_and_test.yml` was
left at `master` when `branch-4.x` was cut, so pushes to `branch-4.x`
checked out and tested `master` instead of `branch-4.x`. Update the
default to `branch-4.x`, matching what was already done on `branch-4.0`
and `branch-4.1`.

Generated-by: Claude Code
@zhengruifeng zhengruifeng marked this pull request as ready for review May 11, 2026 09:45
zhengruifeng added a commit that referenced this pull request May 11, 2026
### What changes were proposed in this pull request?

Update the default value of the `branch` workflow input in `.github/workflows/build_and_test.yml` from `master` to `branch-4.x`, and drop the stale `# Change 'master' to 'branch-4.0' in branch-4.0 branch after cutting it.` comment.

### Why are the changes needed?

When `branch-4.x` was cut from master, the comment in `build_and_test.yml` flagged that the default should be updated, but it wasn't. As a result, the `Build` workflow on pushes to `branch-4.x` invokes the reusable `build_and_test.yml` without an explicit `branch` input, which falls back to the default `master`. The `precondition` job then runs `actions/checkout` with `ref: master` against `apache/spark`, so the CI tests `master` rather than `branch-4.x`.

The same misconfiguration was observed on `branch-4.2` ([example CI run](https://github.com/apache/spark/actions/runs/25591666487/job/75130390722)) and is fixed there in a sibling PR. The same fix was already applied on `branch-4.0` and `branch-4.1`.

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

No. CI-only.

### How was this patch tested?

GitHub Actions on this PR. The default takes effect on subsequent pushes to `branch-4.x`.

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

Generated-by: Claude Code

Closes #55797 from zhengruifeng/fix-branch-default-4.x.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com>
@zhengruifeng
Copy link
Copy Markdown
Contributor Author

merged to 4.x to enable the post-merge ci

@zhengruifeng zhengruifeng deleted the fix-branch-default-4.x branch May 11, 2026 11:30
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