Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: rename the 'master' branch to 'main' #6064

Merged
merged 3 commits into from
Dec 20, 2024
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
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
codecov:
# Use the yaml from a specific branch.
strict_yaml_branch: master
strict_yaml_branch: main
# Don't wait for all other statuses to pass.
require_ci_to_pass: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ template, not the rendered `.yml` file. To rebuild the workflow files from templ
`.branch-variables.yml` file in the repo root.

Most of the workflows are triggered by cron or comment events, so they belong only on the default
branch which is `master`. These workflows are removed by templates on other branches. If the first
branch which is `main`. These workflows are removed by templates on other branches. If the first
line is `{% if distro_release == "rawhide" %}` then the workflow is of such kind.

When editing a template, the following roughly describes what to expect:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container-autoupdate-eln.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
secrets: inherit
with:
container-tag: eln
branch: master
branch: main
base-container: 'quay.io/fedoraci/fedora:eln-x86_64'
{% endif %}
2 changes: 1 addition & 1 deletion .github/workflows/container-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: ['master', 'rhel-10']
branch: ['main', 'rhel-10']
# Don't run scheduled workflows on forks.
if: github.event_name != 'schedule' || github.repository == 'rhinstaller/anaconda'
uses: ./.github/workflows/container-rebuild-action.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container-autoupdate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: ['master'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
branch: ['main'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
# Don't run scheduled workflows on forks.
if: github.event_name != 'schedule' || github.repository == 'rhinstaller/anaconda'
uses: ./.github/workflows/container-rebuild-action.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/container-rebuild-action.yml.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if distro_release == "rawhide" %}
name: Rebuild container images
# Rebuilds both ci and rpm container images for a given "target". Currently known targets:
# - master
# - main
# - eln
# - fedora-NN
#
Expand Down Expand Up @@ -88,11 +88,11 @@ jobs:
- name: Login to container registry
run: podman login -u ${{ secrets.QUAY_USERNAME }} -p ${{ secrets.QUAY_PASSWORD }} quay.io

# we can hardcode the path to the image here because this will be executed only for master image
- name: Add latest tag for master container
if: ${{ inputs.container-tag == 'master' }}
# we can hardcode the path to the image here because this will be executed only for main image
- name: Add latest tag for main container
if: ${{ inputs.container-tag == 'main' }}
run: |
podman tag quay.io/rhinstaller/anaconda-${{ matrix.container-type }}:master quay.io/rhinstaller/anaconda-${{ matrix.container-type }}:latest
podman tag quay.io/rhinstaller/anaconda-${{ matrix.container-type }}:main quay.io/rhinstaller/anaconda-${{ matrix.container-type }}:latest
CI_TAG=latest make -f Makefile.am anaconda-${{ matrix.container-type }}-push

- name: Push container to registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/differential-shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Differential ShellCheck
on:
push:
pull_request:
branches: [ master, rhel-*, fedora-* ]
branches: [ main, rhel-*, fedora-* ]

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/l10n-po-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
branch: ['master', 'rhel-10']
branch: ['main', 'rhel-10']

steps:
- name: Set up dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/l10n-po-update.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
branch: ['master'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
branch: ['main'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]

steps:
- name: Set up dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-tests.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run tests on push
on:
push:
branches:
- master
- main
- fedora-[0-9]+

permissions:
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
{% endif %}
8 changes: 4 additions & 4 deletions .github/workflows/template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
infra-template-master-match-check:
runs-on: ubuntu-20.04
name: Compare templates files with master branch
if: github.event.pull_request.base.ref != 'master'
if: github.event.pull_request.base.ref != 'main'

steps:
- name: Clone Anaconda repository
Expand All @@ -82,7 +82,7 @@ jobs:
git log --oneline -1 origin/${{ github.event.pull_request.base.ref }}
git rebase origin/${{ github.event.pull_request.base.ref }}

- name: Check if all changed template files are matching master branch
- name: Check if all changed template files are matching main branch
run: |
changed_template_files_in_pr=$(git diff --diff-filter=M --name-only origin/${{ github.event.pull_request.base.ref }} "*.j2")
if [ -z "$changed_template_files_in_pr" ]; then
Expand All @@ -91,11 +91,11 @@ jobs:
exit 0
fi

changed_files=$(git diff --diff-filter=M --name-only origin/master "*.j2")
changed_files=$(git diff --diff-filter=M --name-only origin/main "*.j2")

if [ -n "$changed_files" ]; then
# print for debugging
echo "----- Template files differ with mater branch -----"
echo "----- Template files differ with main branch -----"
echo "$changed_files"
echo "-------------------------"

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/tests-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:
strategy:
fail-fast: false
matrix:
release: ['master', 'rhel-10']
release: ['main', 'rhel-10']
include:
- release: 'master'
target_branch: 'master'
ci_tag: 'master'
- release: 'main'
target_branch: 'main'
ci_tag: 'main'
## add to release: [...] also eln if re-enabled by uncommenting the below
#- release: 'eln'
# target_branch: 'master'
# target_branch: 'main'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
- release: 'rhel-10'
Expand Down Expand Up @@ -87,11 +87,11 @@ jobs:
strategy:
fail-fast: false
matrix:
release: ['master', 'rhel-10']
release: ['main', 'rhel-10']
include:
- release: 'master'
target_branch: 'master'
ci_tag: 'master'
- release: 'main'
target_branch: 'main'
ci_tag: 'main'
- release: 'rhel-10'
target_branch: 'rhel-10'
ci_tag: 'rhel-10'
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/tests-daily.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:
# * This is still a matrix because we might re-enable ELN one day and then we will need
# a matrix here.
#}
release: ['master'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
release: ['main'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
include:
- release: 'master'
target_branch: 'master'
ci_tag: 'master'
- release: 'main'
target_branch: 'main'
ci_tag: 'main'
## add to release: [...] also eln if re-enabled by uncommenting the below
#- release: 'eln'
# target_branch: 'master'
# target_branch: 'main'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
{% for branch in supported_branches %}
Expand Down Expand Up @@ -91,11 +91,11 @@ jobs:
fail-fast: false
matrix:
{# For matrix details, see comments for the unit tests above. #}
release: ['master'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
release: ['main'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
include:
- release: 'master'
target_branch: 'master'
ci_tag: 'master'
- release: 'main'
target_branch: 'main'
ci_tag: 'main'
{% for branch in supported_branches %}
- release: '{$ branch|first $}'
target_branch: '{$ branch|first $}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
path: test-logs/*

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
include:
{% if distro_name == "fedora" and distro_release == "rawhide" %}
- release: ''
target_branch: 'master'
ci_tag: 'master'
target_branch: 'main'
ci_tag: 'main'
## add to release: [...] also eln if re-enabled by uncommenting the below
#- release: eln
# target_branch: 'master'
# target_branch: 'main'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
{% elif distro_name == "fedora" and distro_release is number %}
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
path: test-logs/*

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -109,11 +109,11 @@ jobs:
release: ['']
include:
- release: ''
target_branch: 'master'
ci_tag: 'master'
target_branch: 'main'
ci_tag: 'main'
## add to release: [...] also eln if re-enabled by uncommenting the below
#- release: eln
# target_branch: 'master'
# target_branch: 'main'
# ci_tag: 'eln'
# build-args: '--build-arg=image=quay.io/fedoraci/fedora:eln-x86_64'
{% elif distro_name == "fedora" and distro_release is number %}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-webui.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- 'data/profile.d/**'
- 'po/l10n-config.mk'
branches:
- 'master'
- 'main'
jobs:
trigger:
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/try-release-daily.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: ['master'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]
branch: ['main'{% for branch in supported_branches %}, '{$ branch|first $}'{% endfor %}]

steps:
- name: Check out repo
Expand Down
2 changes: 1 addition & 1 deletion .packit.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
targets:
- fedora-rawhide
- fedora-eln
branch: master
branch: main
owner: "@rhinstaller"
project: Anaconda
preserve_project: True
Expand Down
24 changes: 12 additions & 12 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Which is my target git branch?
Depending on where you want to make your contribution please choose your correct branch based on the table below.

+--------------------------+--------------+
| Fedora Rawhide | master |
| Fedora Rawhide | main |
+--------------------------+--------------+
| Fedora XX | fedora-XX |
+--------------------------+--------------+
Expand Down Expand Up @@ -205,29 +205,29 @@ Anaconda Installer Branching Policy (the long version)

The basic premise is that there are the following branches:

- master
- main
- fedora-<next fedora number>

The ``master`` branch never waits for any release-related processes to take place and is used for Fedora Rawhide Anaconda builds.
The ``main`` branch never waits for any release-related processes to take place and is used for Fedora Rawhide Anaconda builds.

Concerning current RHEL branches, they are too divergent to integrate into this scheme. Thus, commits are merged onto, and builds are done on the RHEL branches.
In this case, multiple pull requests will very likely be needed:

- one for the ``rhel<number>-branch``
- one for the ``master`` branch, if the change is not RHEL only
- one for the ``main`` branch, if the change is not RHEL only
- one for the ``fedora-<number>`` branch, if change should apply to branched Fedora too

Releases
---------

The release process is as follows, for both Fedora Rawhide and branched Fedora versions:

- a release commit is made (which bumps version in spec file) & tagged on the ``fedora-XX`` or ``master`` branch
- a release commit is made (which bumps version in spec file) & tagged on the ``fedora-XX`` or ``main`` branch

Concerning the ``<next Fedora number>`` branches (which could also be called ``next stable release`` if we wanted to decouple our versioning from Fedora in the future):

- work which goes into the next Fedora goes to ``fedora-<next Fedora number>`` and must have another PR for ``master``, too
- stuff we *don't* want to go to the next Fedora (too cutting edge, etc.) goes only to ``master`` branch
- work which goes into the next Fedora goes to ``fedora-<next Fedora number>`` and must have another PR for ``main``, too
- stuff we *don't* want to go to the next Fedora (too cutting edge, etc.) goes only to ``main`` branch
- commits specific to a given Fedora release (temporary fixes, etc.) go only to the ``fedora-<next Fedora number>`` branch
- this way we can easily see what was developed in which Fedora timeframe and possibly due to given Fedora testing phase feedback (bugfixes, etc.)

Expand All @@ -236,19 +236,19 @@ Example for the F38 and F39 cycle

Once Fedora 38 is branched, we have these branches in the repository:

- ``master``
- ``main``
- ``fedora-38``

This would continue until f38 is released, after which we:

- keep the ``fedora-38`` branch as an inactive record of the f38 cycle
- work on the ``master`` branch only
- work on the ``main`` branch only

After a while, Fedora 39 is branched and we start the ``fedora-39`` branch off the ``master`` branch.
After a while, Fedora 39 is branched and we start the ``fedora-39`` branch off the ``main`` branch.

This will result in the following branches for the f39 cycle:

- ``master``
- ``main``
- ``fedora-39``

Guidelines for Commits
Expand Down Expand Up @@ -355,7 +355,7 @@ Then push the merge to the remote::

git push origin <target branch>

If the pull request has been opened for the ``fedora-38`` branch, then you also need to check if the same change should go to the ``master`` branch in another PR.
If the pull request has been opened for the ``fedora-38`` branch, then you also need to check if the same change should go to the ``main`` branch in another PR.

.. _pure-community-features:

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Anaconda is the OS installer used by Fedora, RHEL, CentOS and other Linux distri
:alt: Documentation Status
:target: https://anaconda-installer.readthedocs.io/en/latest/?badge=latest

.. image:: https://codecov.io/gh/rhinstaller/anaconda/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/rhinstaller/anaconda/branch/main/graph/badge.svg
:alt: Coverage status
:target: https://codecov.io/gh/rhinstaller/anaconda

.. image:: https://translate.fedoraproject.org/widgets/anaconda/-/master/svg-badge.svg
.. image:: https://translate.fedoraproject.org/widgets/anaconda/-/main/svg-badge.svg
:alt: Translation status
:target: https://translate.fedoraproject.org/engage/anaconda/?utm_source=widget

Expand Down
Loading
Loading