Files
airflow/.asf.yaml
T
Jarek Potiuk a3567e948e Show fork CI progress sooner and gate rebased pilot pull requests (#76148)
Feedback from the first day of the contributor pilot:

Pilot participants expected their open pull requests to move to fork CI
once they rebased them after joining, but only pull requests created
after the join instant were gated.

A push soon after opening a pull request cancels the first project CI
run, and its cancelled checks stayed next to the green fork results,
giving the pull request a confusing red/green status.

Fork CI reports to the pull request only when the scheduled monitor
runs, so for a while a contributor saw nothing telling them their CI
runs in the fork. The gate cannot post a status itself (it runs with a
read-only token on the contributor's event), so a required "CI run
started" check now shows as expected and waiting from the moment of the
push, and the monitor fills it in with a link to the run. Doing that in
the scheduled monitor, rather than in a job of every CI run, keeps it
off the shared runner queue, and its writes come out of the monitor's
existing per-run budget so the repository's shared rate limit is not
spent any faster.

One full-matrix fork run needs more job statuses than that budget
allows in a single monitor run, so the Slack note about deferred job
statuses fired on ordinary pilot runs. It now waits until deferring
persists, which is what it is meant to signal.

Generated-by: Claude Opus 5
2026-10-31 17:14:09 +01:00

218 lines
8.4 KiB
YAML

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# `.asf.yaml` is a branch-specific YAML configuration file for Git repositories to control features
# such as notifications, GitHub settings, etc.
# See its documentation for details: https://github.com/apache/infrastructure-asfyaml
---
#
# Additional non-standard features
#
meta:
environments:
- github_rulesets
github:
description: "Apache Airflow - A platform to programmatically author, schedule, and monitor workflows"
homepage: https://airflow.apache.org/
# Social media preview image is not supported by GitHub API/asf.yaml, need to be uploaded
# manually in GitHub repository --> Settings --> click "Edit" in "Social preview"
# See also:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview
# social_media_preview: docs/apache-airflow/img/logos/github_repository_social_image.png
labels:
# Note that GitHub only supports <=20 labels/topics per repo! Pipeline will fail if you add more.
- airflow
- apache
- apache-airflow
- automation
- dag
- data-engineering
- data-integration
- data-orchestrator
- data-pipelines
- data-science
- elt
- etl
- machine-learning
- mlops
- orchestration
- python
- scheduler
- workflow
- workflow-engine
- workflow-orchestration
features:
# Enable issues management
issues: true
# Enable projects for project management boards
projects: true
# Enable wiki for documentation
wiki: false
# Enable discussions
discussions: true
enabled_merge_buttons:
squash: true
merge: false
rebase: false
pull_requests:
# Auto-merge waits for the required "CI passed" check enforced by the "Require CI on main" and
# "Require CI on release branches" rulesets. Without a required check it would merge as soon as
# the PR is approved, before CI finishes. The setting is repository-wide, so every branch that
# PRs target needs one of those rulesets.
allow_auto_merge: true
# enable updating head branches of pull requests
allow_update_branch: true
# auto-delete head branches after being merged
del_branch_on_merge: true
# cap how many PRs a user without write access may have open at once
# (committers and other users with write access are not affected)
creation_cap:
enabled: true
max_open_pull_requests: 5
# Legacy branch protection is being migrated to Rulesets below.
#
# `main` keeps the proven configuration here until the new ruleset is validated on other
# branches. We cannot test the new ruleset on `main` itself: ruleset settings are only applied
# from the default branch, so a broken config there would block fixing this file.
#
# Once the new ruleset is validated, `main` should be moved under the ruleset
# and removed from the legacy `protected_branches` section.
# This section should be kept empty to properly delete the legacy branch protection rules that
# are currently in place:
#
# protected_branches: ~
protected_branches:
main:
required_pull_request_reviews:
required_approving_review_count: 1
required_linear_history: true
required_conversation_resolution: true
required_signatures: false
# The two CI rulesets use the raw Rulesets API payload, because the convenience syntax can only name
# teams as bypass actors and GitHub refuses secret teams such as `airflow-committers`. Instead the
# Write repository role (actor_id 4) bypasses them: on this repository only committers hold it,
# granted by ASF Infra from the `airflow` LDAP group, so it needs no update when committers change.
# Committers can still merge a PR whose CI is red for an unrelated reason, by bypassing the rule.
#
# The required checks are not pinned to the GitHub Actions app: asfyaml passes raw values to the
# API as strings except for a fixed set of keys, and a string `integration_id` is rejected.
rulesets:
- name: "Require CI on main"
target: branch
enforcement: active
conditions:
ref_name:
include:
- "refs/heads/main"
exclude: []
bypass_actors:
- actor_id: 4
actor_type: RepositoryRole
bypass_mode: always
rules:
- type: deletion
- type: non_fast_forward
- type: required_status_checks
parameters:
strict_required_status_checks_policy: false
required_status_checks:
- context: "CI passed"
# Reported by the fork CI monitor once the head commit has a CI run, in the
# contributor's fork for a gated pull request or in apache/airflow otherwise; until
# then GitHub lists it on the pull request as expected and waiting.
- context: "CI run started"
# The branches `ci-amd.yml` runs pull request CI for, apart from `main`. A release branch gets
# the "CI passed" job only when it is backported there; until then its PRs need a committer to
# bypass the rule. "CI run started" comes from the fork CI monitor on `main`, for every base.
- name: "Require CI on release branches"
target: branch
enforcement: active
conditions:
ref_name:
include:
- "refs/heads/v*-test"
- "refs/heads/v*-stable"
- "refs/heads/providers-*/v*"
- "refs/heads/chart/v*-test"
- "refs/heads/chart/v*-stable"
- "refs/heads/airflow-ctl/v*-test"
- "refs/heads/airflow-ctl/v*-stable"
exclude: []
bypass_actors:
- actor_id: 4
actor_type: RepositoryRole
bypass_mode: always
rules:
- type: deletion
- type: non_fast_forward
- type: required_status_checks
parameters:
strict_required_status_checks_policy: false
required_status_checks:
- context: "CI passed"
# Reported by the fork CI monitor once the head commit has a CI run, in the
# contributor's fork for a gated pull request or in apache/airflow otherwise; until
# then GitHub lists it on the pull request as expected and waiting.
- context: "CI run started"
- name: "Branch protection"
type: branch
branches:
includes:
# `main` stays under `protected_branches` above until this ruleset is validated on the
# branches below. We cannot test the new ruleset on `main` itself: ruleset settings are
# only applied from the default branch, so a broken config there would block fixing
# this file.
#
# Uncomment once the configuration is proven on the other branches.
# - "~DEFAULT_BRANCH"
- "v*-stable"
- "providers-fab/v*"
- "airflow-ctl/v*-stable"
- "chart/v*-stable"
required_pull_request_reviews:
required_approving_review_count: 1
required_linear_history: true
required_conversation_resolution: true
required_signatures: false
collaborators:
# Max 10 collaborators allowed
# https://github.com/apache/infrastructure-asfyaml/blob/main/README.md#assigning-the-github-triage-role-to-external-collaborators
# Procedure for adding new member is listed in
# https://github.com/apache/airflow/blob/main/ISSUE_TRIAGE_PROCESS.rst#L97
- aritra24
- omkar-foss
- nathadfield
- sunank200
- cmarteepants
- karenbraganz
- gyli
- jroachgolf84
- Dev-iL
- kacpermuda
notifications:
commits: commits@airflow.apache.org
issues: commits@airflow.apache.org
pullrequests: commits@airflow.apache.org
discussions: commits@airflow.apache.org