Skip to content
Merged
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
35 changes: 33 additions & 2 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,44 @@ github:
protected_branches:
main:
required_status_checks:
# strict means "Require branches to be up to date before merging".
strict: true
Comment on lines -39 to -40

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

contexts:
# Repository policy and security checks.
- Analyze Actions
- Run zizmor 🌈
- asf-allowlist-check
- rat

# Documentation checks.
- docs
- markdown-link-check

# Python workflow gates.
- python-ci-required
- python-integration-required

required_pull_request_reviews:
required_approving_review_count: 1

required_linear_history: true
rulesets:
- name: Merge Queue
target: branch
enforcement: active
conditions:
ref_name:
include:
- "~DEFAULT_BRANCH"
exclude: []
rules:
- type: merge_queue
parameters:
check_response_timeout_minutes: 90
grouping_strategy: ALLGREEN
max_entries_to_build: 1
max_entries_to_merge: 1
merge_method: SQUASH
min_entries_to_merge: 1
min_entries_to_merge_wait_minutes: 0
pull_requests:
# allow pull requests to merge automatically once all requirements are met
allow_auto_merge: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/asf-allowlist-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ name: "ASF Allowlist Check"

on:
pull_request:
merge_group:
push:
branches:
- main
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-md-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ on:
branches:
- 'main'
pull_request:
paths:
- '.github/workflows/check-md-link.yml'
- 'mkdocs/**'
merge_group:
workflow_dispatch:

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
merge_group:
schedule:
- cron: '16 4 * * 1'

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#

name: "Run License Check"
on: pull_request
on:
pull_request:
merge_group:

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/python-ci-docs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand All @@ -24,6 +24,7 @@
branches:
- 'main'
pull_request:
merge_group:

permissions:
contents: read
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand All @@ -24,19 +24,7 @@
branches:
- 'main'
pull_request:
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'
Comment on lines -27 to -39

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

merge_group:

permissions:
contents: read
Expand Down Expand Up @@ -127,3 +115,17 @@
run: uv sync --directory . --only-group dev --no-install-project
- name: Mirror wheel CIBW_TEST_COMMAND
run: uv run --directory . pytest tests/avro/test_decoder.py

python-ci-required:
if: ${{ always() }}
needs: [lint-and-unit-test, windows-unit-test, cibw-dev-env-smoke-test]
runs-on: ubuntu-latest
steps:
- name: Verify Python CI jobs succeeded
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
run: |
read -ra results <<< "$RESULTS"
for result in "${results[@]}"; do
test "$result" = "success"
done
22 changes: 15 additions & 7 deletions .github/workflows/python-integration.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand All @@ -24,13 +24,7 @@
branches:
- 'main'
pull_request:
paths: # Only run integration tests when Python (or the code they exercise) changes.
- '**/*.py'
- 'pyproject.toml'
- 'uv.lock'
- 'Makefile'
- 'dev/**' # docker-compose files and fixtures used by the integration suites.
- '.github/workflows/python-integration.yml' # this file itself.
merge_group:

permissions:
contents: read
Expand Down Expand Up @@ -183,3 +177,17 @@
merge-multiple: true
- name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it!
run: COVERAGE_FAIL_UNDER=75 make coverage-report

python-integration-required:
if: ${{ always() }}
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs, integration-coverage-report]
runs-on: ubuntu-latest
steps:
- name: Verify Python integration jobs succeeded
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
run: |
read -ra results <<< "$RESULTS"
for result in "${results[@]}"; do
test "$result" = "success"
done
1 change: 1 addition & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
branches: ["main"]
pull_request:
branches: ["**"]
merge_group:

permissions: {}

Expand Down
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ lives under `pyiceberg/`, organized by concern rather than by engine:
- Use existing test fixtures when possible.
- We have a strong bias towards integration testing over mocks. Mocks should be avoided whenever possible and should only be used if similar, existing tests are using mocks.

### 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.

Comment on lines +65 to +71

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

## Commands

- **Install / set up dev env:** `make install` (installs `uv`, syncs all extras, builds Cython, installs pre-commit hooks)
Expand Down
Loading