Skip to content

Prepare for Merge Queue #17183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .asf.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i wasn't able to check those via asf boxer (got a permission error on creating a new project). I checked other ASF projects so should be fine - but just in case I will take a look on the checks once this PR is merged

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,38 @@ github:
main:
required_pull_request_reviews:
required_approving_review_count: 1
required_status_checks:
strict: true # Require branches to be up to date before merging
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not require up to date branches before we have enabled the merge queue? Otherwise that will slow down merging of PRs as we'll have a bottleneck / race for each PR that wants to merge

Once there is an automated queue it makes sense because the queue handles the race

contexts:
- "Check License Header"
Copy link
Contributor

Choose a reason for hiding this comment

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

I worry about this list

  1. It may get out of date if people add a new check
  2. I worry this might break the repo entirely (if we for example, change the name of one of these files)
  3. What happens to workflows that don't run all these checks (like documentation, for example)

I am particularly worried about the note in https://github.com/apache/infrastructure-asfyaml/blob/main/README.md#branch-protection

A typo in these settings for the default branch will prevent you from modifying the .asf.yaml file itself.

Screenshot 2025-08-14 at 7 07 35 AM

I think it is better to potentially have main fail some CI checks that we can fix rather than effectively locking ourselves out of committing anything

- "cargo doc"
- "build and run with wasm-pack"
- "linux build test"
- "cargo test (macos-aarch64)"
- "Verify Vendored Code"
- "Check cargo fmt"
- "Verify MSRV (Min Supported Rust Version)"
- "cargo check datafusion-common features"
- "cargo check datafusion-substrait features"
- "cargo check datafusion-proto features"
- "cargo check datafusion features"
- "cargo check datafusion-functions features"
- "cargo test (amd64)"
- "cargo examples (amd64)"
- "cargo test doc (amd64)"
- "verify benchmark results (amd64)"
- "Run sqllogictest with Postgres runner"
- "Run sqllogictest in Substrait round-trip mode"
- "cargo test pyarrow (amd64)"
- "clippy"
- "check Cargo.toml formatting"
- "Use prettier to check formatting of documents"
- "check-files"
- "cargo test datafusion-cli (amd64)"
- "check configs.md and ***_functions.md is up-to-date"
- "Process"
# needs to be updated as part of the release process
# Github doesn't support wildcard branch protection rules, only exact branch names
# .asf.yaml doesn't support wildcard branch protection rules, only exact branch names
# https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file#branch-protection
# Keeping set of protected branches for future releases
# Meanwhile creating a prerelease script that will update the branch protection names
Expand Down Expand Up @@ -122,6 +152,7 @@ github:
pull_requests:
# enable updating head branches of pull requests
allow_update_branch: true
allow_auto_merge: true

# publishes the content of the `asf-site` branch to
# https://datafusion.apache.org/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

name: Dev
on: [push, pull_request]
on: [push, pull_request, merge_group]

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/large_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ concurrency:

on:
pull_request:
merge_group:

jobs:
check-files:
Expand All @@ -38,7 +39,16 @@ jobs:
MAX_FILE_SIZE_BYTES: 1048576
shell: bash
run: |
git rev-list --objects ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} \
if [ "${{ github.event_name }}" = "merge_group" ]; then
# For merge queue, compare against the base branch
base_sha="${{ github.event.merge_group.base_sha }}"
head_sha="${{ github.event.merge_group.head_sha }}"
else
# For pull requests
base_sha="${{ github.event.pull_request.base.sha }}"
head_sha="${{ github.event.pull_request.head.sha }}"
fi
git rev-list --objects ${base_sha}..${head_sha} \
> pull-request-objects.txt
exit_code=0
while read -r id path; do
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ on:
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/pull_request_template.md"
merge_group:
# manual trigger
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
Expand Down