Skip to content

Commit

Permalink
Rename the main branch of the Airflow repo to be main (#16149)
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk authored Jun 1, 2021
1 parent 8505d2f commit 1e64702
Show file tree
Hide file tree
Showing 111 changed files with 379 additions and 538 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ github:
rebase: false

protected_branches:
master:
main:
required_pull_request_reviews:
required_approving_review_count: 1
v1-10-stable:
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ http://chris.beams.io/posts/git-commit/
---
**^ Add meaningful description above**

Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
10 changes: 5 additions & 5 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,20 @@ labelerFlags:
firstPRWelcomeComment: >
Congratulations on your first Pull Request and welcome to the Apache Airflow community!
If you have any issues or are unsure about any anything please check our
Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits](
https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory).
Adding a new operator? Check this short
[guide](https://github.com/apache/airflow/blob/master/docs/apache-airflow/howto/custom-operator.rst)
[guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst)
Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing
locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from
Expand All @@ -222,7 +222,7 @@ firstPRWelcomeComment: >
communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style](
https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#coding-style-and-best-practices).
https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
Apache Airflow is a community-driven project and together we are making it better 🚀.
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on: # yamllint disable-line rule:truthy
- cron: '28 0 * * *'
pull_request_target:
push:
branches: ['main', 'master', 'v1-10-test', 'v1-10-stable', 'v2-0-test']
branches: ['main', 'v1-10-test', 'v1-10-stable', 'v2-0-test']
env:
MOUNT_SELECTED_LOCAL_SOURCES: "false"
FORCE_ANSWER_TO_QUESTIONS: "yes"
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
strategy:
matrix:
# We need to attempt to build all possible versions here because pull_request_target
# event is run from master for both master and v1-10-tests
# event is run for both main and v1-10-tests
python-version: ${{ fromJson(needs.build-info.outputs.allPythonVersions) }}
fail-fast: true
if: needs.build-info.outputs.image-build == 'true'
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
# We cannot "source" the script here because that would be a security problem (we cannot run
# any code that comes from the sources coming from the PR. Therefore we extract the
# DEFAULT_BRANCH and DEFAULT_CONSTRAINTS_BRANCH via custom grep/awk/sed commands
# Also 2.7 and 3.5 versions are not allowed to proceed on master
# Also 2.7 and 3.5 versions are not allowed to proceed on main
id: defaults
run: |
DEFAULT_BRANCH=$(grep "export DEFAULT_BRANCH" scripts/ci/libraries/_initialization.sh | \
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
strategy:
matrix:
# We need to attempt to build all possible versions here because pull_request_target
# event is run from master for both master and v1-10-tests
# event is run for both main and v1-10-tests
python-version: ${{ fromJson(needs.build-info.outputs.allPythonVersions) }}
fail-fast: true
if: needs.build-info.outputs.image-build == 'true'
Expand All @@ -245,7 +245,7 @@ jobs:
# We cannot "source" the script here because that would be a security problem (we cannot run
# any code that comes from the sources coming from the PR. Therefore we extract the
# DEFAULT_BRANCH and DEFAULT_CONSTRAINTS_BRANCH via custom grep/awk/sed commands
# Also 2.7 and 3.5 versions are not allowed to proceed on master
# Also 2.7 and 3.5 versions are not allowed to proceed on main
id: defaults
run: |
DEFAULT_BRANCH=$(grep "export DEFAULT_BRANCH" scripts/ci/libraries/_initialization.sh | \
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: '28 0 * * *'
push:
branches: ['master', 'v[0-9]+-[0-9]+-test']
branches: ['main', 'v[0-9]+-[0-9]+-test']
pull_request:
branches: ['master', 'v[0-9]+-[0-9]+-test', 'v[0-9]+-[0-9]+-stable']
branches: ['main', 'v[0-9]+-[0-9]+-test', 'v[0-9]+-[0-9]+-stable']

env:
MOUNT_SELECTED_LOCAL_SOURCES: "false"
Expand Down Expand Up @@ -496,15 +496,15 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
- name: Configure AWS credentials
uses: ./.github/actions/configure-aws-credentials
if: >
github.ref == 'refs/heads/master' && github.repository == 'apache/airflow' &&
github.ref == 'refs/heads/main' && github.repository == 'apache/airflow' &&
github.event_name == 'push'
with:
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: "Upload documentation to AWS S3"
if: >
github.ref == 'refs/heads/master' && github.repository == 'apache/airflow' &&
github.ref == 'refs/heads/main' && github.repository == 'apache/airflow' &&
github.event_name == 'push'
run: aws s3 sync --delete ./files/documentation s3://apache-airflow-docs

Expand All @@ -519,13 +519,13 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
VERSION_SUFFIX_FOR_PYPI: ".dev0"
GITHUB_REGISTRY: ${{ needs.ci-images.outputs.githubRegistry }}
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'master'
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'main'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
persist-credentials: false
if: needs.build-info.outputs.default-branch == 'master'
if: needs.build-info.outputs.default-branch == 'main'
- name: "Setup python"
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -566,13 +566,13 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
VERSION_SUFFIX_FOR_PYPI: ".dev0"
GITHUB_REGISTRY: ${{ needs.ci-images.outputs.githubRegistry }}
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'master'
if: needs.build-info.outputs.image-build == 'true' && needs.build-info.outputs.default-branch == 'main'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
persist-credentials: false
if: needs.build-info.outputs.default-branch == 'master'
if: needs.build-info.outputs.default-branch == 'main'
- name: "Setup python"
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -897,8 +897,8 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}
- name: "Set issue id for master"
if: github.ref == 'refs/heads/master'
- name: "Set issue id for main"
if: github.ref == 'refs/heads/main'
run: |
echo "ISSUE_ID=10118" >> $GITHUB_ENV
- name: "Set issue id for v1-10-stable"
Expand Down Expand Up @@ -1109,7 +1109,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
- docs
# TODO: Generalize me (find a better way to select matching branches)
if: >
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test') &&
github.event_name != 'schedule'
strategy:
Expand All @@ -1134,7 +1134,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
- name: Set push-python-image
id: push-python-image
run: |
if [[ "${REF}" == 'refs/head/master' || "${REF}" == 'refs/head/main' ]]; then
if [[ "${REF}" == 'refs/head/main' || "${REF}" == 'refs/head/main' ]]; then
echo "::set-output name=wanted::true"
else
echo "::set-output name=wanted::false"
Expand Down Expand Up @@ -1171,7 +1171,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
- docs
# TODO: Generalize me (find a better way to select matching branches)
if: >
(github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test') &&
github.event_name != 'schedule'
strategy:
Expand Down Expand Up @@ -1221,7 +1221,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
# Only run it for direct pushes
# TODO: Generalize me (find a better way to select matching branches)
if: >
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v1-10-test' ||
github.ref == 'refs/heads/v2-0-test' || github.ref == 'refs/heads/v2-1-test'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
Expand Down Expand Up @@ -1308,7 +1308,7 @@ ${{ hashFiles('.pre-commit-config.yaml') }}"
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true
branch: master
branch: main

tests-ui:
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: "CodeQL"

on: # yamllint disable-line rule:truthy
push:
branches: [master, main]
branches: [main]
schedule:
- cron: '0 2 * * *'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/label_when_reviewed_workflow_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.source-run-info.outputs.targetCommitSha }}
fetch-depth: 2
persist-credentials: false
# checkout the master version again, to use the right script in master workflow
# checkout the main branch again, to use the right script in main workflow
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
comment: >
The PR most likely needs to run full matrix of tests because it modifies parts of the core
of Airflow. However, committers might decide to merge it quickly and take the risk.
If they don't merge it quickly - please rebase it to the latest master at your convenience,
If they don't merge it quickly - please rebase it to the latest main at your convenience,
or amend the last commit of the PR, and push it with --force-with-lease.
- name: "Initiate GitHub Check forcing rerun of SH ${{ github.event.pull_request.head.sha }}"
uses: ./.github/actions/checks-action
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
The PR is likely OK to be merged with just subset of tests for default Python and Database
versions without running the full matrix of tests, because it does not modify the core of
Airflow. If the committers decide that the full tests matrix is needed, they will add the label
'full tests needed'. Then you should rebase to the latest master or amend the last commit
'full tests needed'. Then you should rebase to the latest main or amend the last commit
of the PR, and push it with --force-with-lease.
- name: "Label when approved by committers for PRs that do not require tests at all"
uses: ./.github/actions/label-when-approved-action
Expand All @@ -153,7 +153,7 @@ jobs:
comment: >
The PR is likely ready to be merged. No tests are needed as no important environment files,
nor python files were modified by it. However, committers might decide that full test matrix is
needed and add the 'full tests needed' label. Then you should rebase it to the latest master
needed and add the 'full tests needed' label. Then you should rebase it to the latest main
or amend the last commit of the PR, and push it with --force-with-lease.
- name: Update Selective Build check
uses: ./.github/actions/checks-action
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/repo_sync.yml

This file was deleted.

Loading

0 comments on commit 1e64702

Please sign in to comment.