Skip to content

Infra: Enable Merge Queue with required CI gates - #3832

Merged
kevinjqliu merged 7 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/codex-required-ci-gates
Sep 3, 2026
Merged

Infra: Enable Merge Queue with required CI gates#3832
kevinjqliu merged 7 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/codex-required-ci-gates

Conversation

@kevinjqliu

@kevinjqliu kevinjqliu commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Rationale

PR #3815 enabled auto-merge. This PR completes that work by adding the required checks and configuration needed for GitHub Merge Queue.

Changes

  • Required checks: .asf.yaml defines the checks Merge Queue must wait for. Stable aggregate Python gates cover all jobs and always report a final result, following DataFusion's pattern (workflow, required context). Analyze Actions gates the CodeQL workflow; the separate CodeQL status is omitted because it is not reported for merge groups (GitHub CodeQL issue).
  • Always-reported checks: Workflow-level path filters are removed because a skipped required workflow leaves PRs and queue entries blocked. DataFusion performs path-based skipping inside an always-triggered workflow instead (lines 24-50).
  • Merge Queue policy: An ASF-managed raw ruleset requires one-at-a-time squash merges on the default branch (ASF rulesets). strict is omitted because Merge Queue provides up-to-date validation and ASF defaults it to false (ASF branch protection).
  • Queue CI: Required workflows handle merge_group; GitHub requires this event for queue checks to report (GitHub documentation). This matches DataFusion's configuration (lines 24-39).

Testing

Repository lint hooks, YAML validation, and workflow coverage assertions pass. No user-facing changes.

Copilot AI lite review requested due to automatic review settings August 22, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s CI/merge infrastructure so GitHub auto-merge cannot merge a PR until merge-critical workflows have actually produced the expected check contexts.

Changes:

  • Removes pull_request.paths filters from key workflows so they always run on PRs (preventing “required check pending because workflow was skipped”).
  • Adds an explicit required_status_checks.contexts allowlist for main in .asf.yaml to require specific CI check contexts before merging.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/python-integration.yml Removes PR path filters so integration suites always run on PRs.
.github/workflows/python-ci.yml Removes PR path filters so unit/lint/Windows/smoke checks always run on PRs.
.github/workflows/check-md-link.yml Removes PR path filters so markdown link checking runs on all PRs.
.asf.yaml Explicitly enumerates required CI check contexts for branch protection / auto-merge gating.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .asf.yaml

@rambleraptor rambleraptor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will increase our runner usage for non-code changes. Most of our PRs are code related, so this is hopefully a wash.

@kevinjqliu
kevinjqliu marked this pull request as draft September 1, 2026 01:06
Comment thread .asf.yaml
Comment on lines -39 to -40
# strict means "Require branches to be up to date before merging".
strict: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed so merge queue is the source of truth

Comment on lines -27 to -39
paths:
- '**' # Include all files and directories in the repository by default.
- '!.github/workflows/**' # Exclude all workflow files
- '.github/workflows/python-ci.yml' # except the current file.
- '!.github/ISSUE_TEMPLATE/**' # Exclude files and directories that don't impact tests or code like templates, metadata, and documentation.
- '!.gitignore'
- '!.asf.yml'
- '!mkdocs/**'
- '!.gitattributes'
- '!README.md'
- '!CONTRIBUTING.md'
- '!LICENSE'
- '!NOTICE'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i think this is a ok trade off to enable merge queue.

merge queue requires checks to always run

Comment thread AGENTS.md
Comment on lines +65 to +71
### Required CI and Merge Queue

- Keep the `required_status_checks.contexts` list in `.asf.yaml` synchronized whenever a required job/check is added, renamed, or removed. Each entry is a job/check context name, not a workflow filename.
- Verify that every required context reports for both `pull_request` and `merge_group`. Its producer workflow must run on both events.
- When a workflow uses an aggregate required job, such as `python-ci-required`, keep `if: always()` and its `needs` list in sync with every job whose result should block merging.
- Do not use `pull_request` path filters in workflows that produce required contexts. A skipped workflow does not report its required context, which blocks pull requests and causes Merge Queue entries to time out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added some rules here so agents can understand the links between files

@kevinjqliu kevinjqliu changed the title Infra: Require CI checks before auto-merge Infra: Enable Merge Queue with required CI gates Sep 2, 2026
@kevinjqliu
kevinjqliu marked this pull request as ready for review September 2, 2026 18:19
@kevinjqliu
kevinjqliu requested review from Fokko and geruh September 2, 2026 18:19

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is new to me, but I guess we can give it a spin

@kevinjqliu
kevinjqliu merged commit 4e6033d into apache:main Sep 3, 2026
21 checks passed
@kevinjqliu
kevinjqliu deleted the kevinjqliu/codex-required-ci-gates branch September 3, 2026 15:20
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.

4 participants