Skip to content

Commit 1e64702

Browse files
authored
Rename the main branch of the Airflow repo to be main (#16149)
1 parent 8505d2f commit 1e64702

File tree

111 files changed

+379
-538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+379
-538
lines changed

.asf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ github:
4141
rebase: false
4242

4343
protected_branches:
44-
master:
44+
main:
4545
required_pull_request_reviews:
4646
required_approving_review_count: 1
4747
v1-10-stable:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ http://chris.beams.io/posts/git-commit/
1717
---
1818
**^ Add meaningful description above**
1919

20-
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
20+
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
2121
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
2222
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
23-
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
23+
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).

.github/boring-cyborg.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,20 +199,20 @@ labelerFlags:
199199
firstPRWelcomeComment: >
200200
Congratulations on your first Pull Request and welcome to the Apache Airflow community!
201201
If you have any issues or are unsure about any anything please check our
202-
Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
202+
Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
203203
204204
Here are some useful points:
205205
206206
- Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits](
207-
https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
207+
https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
208208
will help you with that.
209209
210210
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory).
211211
Adding a new operator? Check this short
212-
[guide](https://github.com/apache/airflow/blob/master/docs/apache-airflow/howto/custom-operator.rst)
212+
[guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst)
213213
Consider adding an example DAG that shows how users should use it.
214214
215-
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing
215+
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing
216216
locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
217217
218218
- Be patient and persistent. It might take some time to get a review or get the final approval from
@@ -222,7 +222,7 @@ firstPRWelcomeComment: >
222222
communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
223223
224224
- Be sure to read the [Airflow Coding style](
225-
https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#coding-style-and-best-practices).
225+
https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
226226
227227
Apache Airflow is a community-driven project and together we are making it better 🚀.
228228

.github/workflows/build-images.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on: # yamllint disable-line rule:truthy
2222
- cron: '28 0 * * *'
2323
pull_request_target:
2424
push:
25-
branches: ['main', 'master', 'v1-10-test', 'v1-10-stable', 'v2-0-test']
25+
branches: ['main', 'v1-10-test', 'v1-10-stable', 'v2-0-test']
2626
env:
2727
MOUNT_SELECTED_LOCAL_SOURCES: "false"
2828
FORCE_ANSWER_TO_QUESTIONS: "yes"
@@ -130,7 +130,7 @@ jobs:
130130
strategy:
131131
matrix:
132132
# We need to attempt to build all possible versions here because pull_request_target
133-
# event is run from master for both master and v1-10-tests
133+
# event is run for both main and v1-10-tests
134134
python-version: ${{ fromJson(needs.build-info.outputs.allPythonVersions) }}
135135
fail-fast: true
136136
if: needs.build-info.outputs.image-build == 'true'
@@ -158,7 +158,7 @@ jobs:
158158
# We cannot "source" the script here because that would be a security problem (we cannot run
159159
# any code that comes from the sources coming from the PR. Therefore we extract the
160160
# DEFAULT_BRANCH and DEFAULT_CONSTRAINTS_BRANCH via custom grep/awk/sed commands
161-
# Also 2.7 and 3.5 versions are not allowed to proceed on master
161+
# Also 2.7 and 3.5 versions are not allowed to proceed on main
162162
id: defaults
163163
run: |
164164
DEFAULT_BRANCH=$(grep "export DEFAULT_BRANCH" scripts/ci/libraries/_initialization.sh | \
@@ -218,7 +218,7 @@ jobs:
218218
strategy:
219219
matrix:
220220
# We need to attempt to build all possible versions here because pull_request_target
221-
# event is run from master for both master and v1-10-tests
221+
# event is run for both main and v1-10-tests
222222
python-version: ${{ fromJson(needs.build-info.outputs.allPythonVersions) }}
223223
fail-fast: true
224224
if: needs.build-info.outputs.image-build == 'true'
@@ -245,7 +245,7 @@ jobs:
245245
# We cannot "source" the script here because that would be a security problem (we cannot run
246246
# any code that comes from the sources coming from the PR. Therefore we extract the
247247
# DEFAULT_BRANCH and DEFAULT_CONSTRAINTS_BRANCH via custom grep/awk/sed commands
248-
# Also 2.7 and 3.5 versions are not allowed to proceed on master
248+
# Also 2.7 and 3.5 versions are not allowed to proceed on main
249249
id: defaults
250250
run: |
251251
DEFAULT_BRANCH=$(grep "export DEFAULT_BRANCH" scripts/ci/libraries/_initialization.sh | \

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ on: # yamllint disable-line rule:truthy
2121
schedule:
2222
- cron: '28 0 * * *'
2323
push:
24-
branches: ['master', 'v[0-9]+-[0-9]+-test']
24+
branches: ['main', 'v[0-9]+-[0-9]+-test']
2525
pull_request:
26-
branches: ['master', 'v[0-9]+-[0-9]+-test', 'v[0-9]+-[0-9]+-stable']
26+
branches: ['main', 'v[0-9]+-[0-9]+-test', 'v[0-9]+-[0-9]+-stable']
2727

2828
env:
2929
MOUNT_SELECTED_LOCAL_SOURCES: "false"
@@ -496,15 +496,15 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
496496
- name: Configure AWS credentials
497497
uses: ./.github/actions/configure-aws-credentials
498498
if: >
499-
github.ref == 'refs/heads/master' && github.repository == 'apache/airflow' &&
499+
github.ref == 'refs/heads/main' && github.repository == 'apache/airflow' &&
500500
github.event_name == 'push'
501501
with:
502502
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
503503
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
504504
aws-region: eu-central-1
505505
- name: "Upload documentation to AWS S3"
506506
if: >
507-
github.ref == 'refs/heads/master' && github.repository == 'apache/airflow' &&
507+
github.ref == 'refs/heads/main' && github.repository == 'apache/airflow' &&
508508
github.event_name == 'push'
509509
run: aws s3 sync --delete ./files/documentation s3://apache-airflow-docs
510510

@@ -519,13 +519,13 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
519519
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
520520
VERSION_SUFFIX_FOR_PYPI: ".dev0"
521521
GITHUB_REGISTRY: ${{ needs.ci-images.outputs.githubRegistry }}
522-
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'master'
522+
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'main'
523523
steps:
524524
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
525525
uses: actions/checkout@v2
526526
with:
527527
persist-credentials: false
528-
if: needs.build-info.outputs.default-branch == 'master'
528+
if: needs.build-info.outputs.default-branch == 'main'
529529
- name: "Setup python"
530530
uses: actions/setup-python@v2
531531
with:
@@ -566,13 +566,13 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
566566
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
567567
VERSION_SUFFIX_FOR_PYPI: ".dev0"
568568
GITHUB_REGISTRY: ${{ needs.ci-images.outputs.githubRegistry }}
569-
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'master'
569+
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'main'
570570
steps:
571571
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
572572
uses: actions/checkout@v2
573573
with:
574574
persist-credentials: false
575-
if: needs.build-info.outputs.default-branch == 'master'
575+
if: needs.build-info.outputs.default-branch == 'main'
576576
- name: "Setup python"
577577
uses: actions/setup-python@v2
578578
with:
@@ -897,8 +897,8 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
897897
uses: actions/setup-python@v2
898898
with:
899899
python-version: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}
900-
- name: "Set issue id for master"
901-
if: github.ref == 'refs/heads/master'
900+
- name: "Set issue id for main"
901+
if: github.ref == 'refs/heads/main'
902902
run: |
903903
echo "ISSUE_ID=10118" >> $GITHUB_ENV
904904
- name: "Set issue id for v1-10-stable"
@@ -1109,7 +1109,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
11091109
- docs
11101110
# TODO: Generalize me (find a better way to select matching branches)
11111111
if: >
1112-
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
1112+
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
11131113
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test') &&
11141114
github.event_name != 'schedule'
11151115
strategy:
@@ -1134,7 +1134,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
11341134
- name: Set push-python-image
11351135
id: push-python-image
11361136
run: |
1137-
if [[ "${REF}" == 'refs/head/master' || "${REF}" == 'refs/head/main' ]]; then
1137+
if [[ "${REF}" == 'refs/head/main' || "${REF}" == 'refs/head/main' ]]; then
11381138
echo "::set-output name=wanted::true"
11391139
else
11401140
echo "::set-output name=wanted::false"
@@ -1171,7 +1171,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
11711171
- docs
11721172
# TODO: Generalize me (find a better way to select matching branches)
11731173
if: >
1174-
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
1174+
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
11751175
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test') &&
11761176
github.event_name != 'schedule'
11771177
strategy:
@@ -1221,7 +1221,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
12211221
# Only run it for direct pushes
12221222
# TODO: Generalize me (find a better way to select matching branches)
12231223
if: >
1224-
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
1224+
github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
12251225
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test'
12261226
steps:
12271227
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
@@ -1308,7 +1308,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
13081308
github_token: ${{ secrets.GITHUB_TOKEN }}
13091309
tags: true
13101310
force: true
1311-
branch: master
1311+
branch: main
13121312

13131313
tests-ui:
13141314
timeout-minutes: 10

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name: "CodeQL"
2020

2121
on: # yamllint disable-line rule:truthy
2222
push:
23-
branches: [master, main]
23+
branches: [main]
2424
schedule:
2525
- cron: '0 2 * * *'
2626

.github/workflows/label_when_reviewed_workflow_run.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
ref: ${{ steps.source-run-info.outputs.targetCommitSha }}
7373
fetch-depth: 2
7474
persist-credentials: false
75-
# checkout the master version again, to use the right script in master workflow
75+
# checkout the main branch again, to use the right script in main workflow
7676
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
7777
uses: actions/checkout@v2
7878
with:
@@ -107,7 +107,7 @@ jobs:
107107
comment: >
108108
The PR most likely needs to run full matrix of tests because it modifies parts of the core
109109
of Airflow. However, committers might decide to merge it quickly and take the risk.
110-
If they don't merge it quickly - please rebase it to the latest master at your convenience,
110+
If they don't merge it quickly - please rebase it to the latest main at your convenience,
111111
or amend the last commit of the PR, and push it with --force-with-lease.
112112
- name: "Initiate GitHub Check forcing rerun of SH ${{ github.event.pull_request.head.sha }}"
113113
uses: ./.github/actions/checks-action
@@ -139,7 +139,7 @@ jobs:
139139
The PR is likely OK to be merged with just subset of tests for default Python and Database
140140
versions without running the full matrix of tests, because it does not modify the core of
141141
Airflow. If the committers decide that the full tests matrix is needed, they will add the label
142-
'full tests needed'. Then you should rebase to the latest master or amend the last commit
142+
'full tests needed'. Then you should rebase to the latest main or amend the last commit
143143
of the PR, and push it with --force-with-lease.
144144
- name: "Label when approved by committers for PRs that do not require tests at all"
145145
uses: ./.github/actions/label-when-approved-action
@@ -153,7 +153,7 @@ jobs:
153153
comment: >
154154
The PR is likely ready to be merged. No tests are needed as no important environment files,
155155
nor python files were modified by it. However, committers might decide that full test matrix is
156-
needed and add the 'full tests needed' label. Then you should rebase it to the latest master
156+
needed and add the 'full tests needed' label. Then you should rebase it to the latest main
157157
or amend the last commit of the PR, and push it with --force-with-lease.
158158
- name: Update Selective Build check
159159
uses: ./.github/actions/checks-action

.github/workflows/repo_sync.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)