Skip to content

Commit 8b4376e

Browse files
author
Overhang.IO
committed
Merge remote-tracking branch 'origin/release'
2 parents 4097240 + 165d97e commit 8b4376e

22 files changed

+141
-89
lines changed

.github/workflows/sync.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Sync with private repo
22

33
on:
44
push:
5-
branches: [ master, main, nightly ]
5+
branches:
6+
- release
7+
- main
68

79
jobs:
810
sync:

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Run tests
22

33
on:
44
push:
5-
branches: [ master, main, nightly ]
5+
branches:
6+
- release
7+
- main
68
pull_request:
7-
branches: [ master, main, nightly ]
9+
branches:
10+
- release
11+
- main
812

913
jobs:
1014
tests:

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ We welcome contributions to Tutor! To learn how you can contribute, please check
9393
License
9494
-------
9595

96-
This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor/blob/master/LICENSE.txt>`_.
96+
This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor/blob/release/LICENSE.txt>`_.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- 💥[Improvement] Rename Tutor's two branches (by @kdmccormick):
2+
* Rename **master** to **release**, as this branch runs the latest official Open edX release.
3+
* Rename **nightly** to **main**, as this branch runs the Open edX master (a.k.a. main) branches, which are the basis fort the next Open edX release.
4+
* For Tutor Nightly users who do not set a TUTOR_ROOT, both the project root (`~/.local/share/tutor-nightly` on Linux) and the plugins root (`~/.local/share/tutor-nightly-plugins` on Linux) will be automatically renamed. (by @regisb)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [Feature] Add the `TUTOR_BRANCH_IS_MAIN` variable to the template context, which is set to True for users running Tutor Main (by @kdmccormick).
2+
- [Bugfix] Use `TUTOR_BRANCH_IS_MAIN` rather than the edx-platform branch name in order to determine which patches to apply. This way, when developers are testing an edx-platform branch that is not master but which may be *based on* master, they will receive master patches rather than release patches, assuming they are running Tutor Main in the first place (by @kdmccormick).

docs/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Open edX customisation
132132

133133
This defines the git repository from which you install Open edX platform code. If you run an Open edX fork with custom patches, set this to your own git repository. You may also override this configuration parameter at build time, by providing a ``--build-arg`` option.
134134

135-
- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/redwood.3"``, or ``master`` in :ref:`nightly <nightly>`)
135+
- ``OPENEDX_COMMON_VERSION`` (default: ``"open-release/redwood.3"``, or ``master`` in :ref:`Tutor Main <main>`)
136136

137137
This defines the default version that will be pulled from all Open edX git repositories.
138138

@@ -392,7 +392,7 @@ Tutor builds images with the latest translations using the ``atlas pull`` `comma
392392
By default the translations are pulled from the `openedx-translations repository <https://github.com/openedx/openedx-translations>`_
393393
from the ``ATLAS_REVISION`` branch. You can use custom translations on your fork of the openedx-translations repository by setting the following configuration parameters:
394394

395-
- ``ATLAS_REVISION`` (default: ``"main"`` on nightly and ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
395+
- ``ATLAS_REVISION`` (default: ``"main"`` for Tutor Main, or ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
396396
- ``ATLAS_REPOSITORY`` (default: ``"openedx/openedx-translations"``). There's a feature request to `support GitLab and other providers <https://github.com/openedx/openedx-atlas/issues/20>`_.
397397
- ``ATLAS_OPTIONS`` (default: ``""``) Pass additional arguments to ``atlas pull``. Refer to the `atlas documentations <https://github.com/openedx/openedx-atlas>`_ for more information.
398398

docs/dev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For detailed explanations on how to work on edx-platform and its dependencies, s
1212
First-time setup
1313
----------------
1414

15-
Firstly, either :ref:`install Tutor <install>` (for development against the named releases of Open edX) or :ref:`install Tutor Nightly <nightly>` (for development against Open edX's master branches).
15+
Firstly, either :ref:`install Tutor <install>` (for development against the named releases of Open edX) or :ref:`install Tutor Main <main>` (for development against Open edX's master branches).
1616

1717
Then, optionally, tell Tutor to use a local fork of edx-platform::
1818

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Tutor: the Docker-based Open edX distribution designed for peace of mind
4040
Source code <https://github.com/overhangio/tutor>
4141
Community forums <https://discuss.openedx.org/tag/tutor>
4242
Pypi releases <https://pypi.org/project/tutor>
43-
Changelog <https://github.com/overhangio/tutor/blob/master/CHANGELOG.md>
43+
Changelog <https://github.com/overhangio/tutor/blob/release/CHANGELOG.md>
4444

4545
Source code
4646
-----------
@@ -58,7 +58,7 @@ The complete source code for Tutor is available on Github: https://github.com/ov
5858
License
5959
-------
6060

61-
This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor/blob/master/LICENSE.txt>`_.
61+
This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor/blob/release/LICENSE.txt>`_.
6262

6363
The AGPL license covers the Tutor code, including the Dockerfiles, but not the content of the Docker images which can be downloaded from https://hub.docker.com. Software other than Tutor provided with the docker images retain their original license.
6464

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Upgrading to a new Open edX release
113113

114114
Major Open edX releases are published twice a year, in June and December, by the Open edX `Build/Test/Release working group <https://discuss.openedx.org/c/working-groups/build-test-release/30>`__. When a new Open edX release comes out, Tutor gets a major version bump (see :ref:`versioning`). Such an upgrade typically includes multiple breaking changes. Any upgrade is final because downgrading is not supported. Thus, when upgrading your platform from one major version to the next, it is strongly recommended to do the following:
115115

116-
1. Read the changes listed in the `CHANGELOG.md <https://github.com/overhangio/tutor/blob/master/CHANGELOG.md>`__ file. Breaking changes are identified by a "💥".
116+
1. Read the changes listed in the `CHANGELOG.md <https://github.com/overhangio/tutor/blob/release/CHANGELOG.md>`__ file. Breaking changes are identified by a "💥".
117117
2. Perform a backup (see the :ref:`backup tutorial <backup_tutorial>`). On a local installation, this is typically done with::
118118

119119
tutor local stop

docs/troubleshooting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If that does not work, then check if there are any other Docker containers runni
9191

9292
docker ps -a
9393

94-
For example, if you have ever used :ref:`Tutor Nightly <nightly>`, check whether there are still ``tutor_nightly_`` containers running. Conversely, if trying to run Tutor Nightly now, check whether there are non-Nightly ``tutor_`` containers running. If so, switch to that other version of Tutor, run ``tutor (dev|local|k8s) stop``, and then switch back to the preferred version of Tutor.
94+
For example, if you have ever used :ref:`Tutor Main <main>`, check whether there are still ``tutor_main_`` containers running. Conversely, if trying to run Tutor Main now, check whether there are non-Main ``tutor_`` containers running. If so, switch to that other version of Tutor, run ``tutor (dev|local|k8s) stop``, and then switch back to the preferred version of Tutor.
9595

9696
Alternatively, if there are any other non-Tutor containers using port 3306, then stop and remove them::
9797

docs/tutor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ When making a new Tutor release, increment the:
9898
- MAJOR version when making a backward-incompatible change (prefixed by "💥" in the changelog, as explained below).
9999
- MINOR version when making a backward-compatible change.
100100

101-
An optional BRANCH suffix may be appended to the release name to indicate that extra changes were added on top of the latest release. For instance, "x.y.z-nightly" corresponds to release x.y.z on top of which extra changes were added to make it compatible with the Open edX master branches (see the :ref:`tutorial on running Tutor Nightly <nightly>`).
101+
An optional BRANCH suffix may be appended to the release name to indicate that extra changes were added on top of the latest release. For instance, "x.y.z-main" corresponds to release x.y.z on top of which extra changes were added to make it compatible with the Open edX master branches (see the :ref:`tutorial on running Tutor Main <main>`).
102102

103103
`Officially-supported plugins <https://edly.io/tutor/plugins-and-themes/>`__ follow the same versioning pattern. As a third-party plugin developer, you are encouraged to use the same pattern to make it immediately clear to your end-users which Open edX versions are supported.
104104

docs/tutorials/edx-platform.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Check out the right version of the upstream repository. If you are working on th
2525
# I.e: aspen, birch, cypress, etc.
2626
git checkout open-release/zebulon.master
2727

28-
On the other hand, if you are working on the Tutor :ref:`"nightly" <nightly>` branch then you should checkout the master branch::
28+
On the other hand, if you are using :ref:`Tutor Main <main>`, then you should checkout the master branch::
2929

3030
git checkout master
3131

docs/tutorials/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Open edX customization
1212
edx-platform
1313
edx-platform-settings
1414
google-smtp
15-
nightly
15+
main
1616

1717
System administration
1818
---------------------

docs/tutorials/main.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. _main:
2+
3+
Running Open edX on the master branch ("Tutor Main")
4+
====================================================
5+
6+
Tutor was designed to make it easy for everyone to run the latest release of Open edX. But sometimes, you want to run the latest, bleeding-edge version of Open edX. This is what we call "running master", as opposed to running the release branch. Running the master branch in production is strongly **not** recommended unless you are an Open edX expert and you really know what you are doing. But Open edX developers frequently need to run the master branch locally to implement and test new features. Thus, Tutor makes it easy to run Open edX on the master branch: this is called "Tutor Main".
7+
8+
Installing Tutor Main
9+
---------------------
10+
11+
Running Tutor Main requires more than setting a few configuration variables: because there are so many Open edX settings, version numbers, etc. which may change between the latest release and the current master branch, Tutor Main is actually maintained as a separate branch of the Tutor repository. To install Tutor Main, you should install Tutor from the "main" branch of the source repository. To do so, run::
12+
13+
git clone --branch=main https://github.com/overhangio/tutor.git
14+
pip install -e "./tutor[full]"
15+
16+
As usual, it is strongly recommended to run the command above in a `Python virtual environment <https://docs.python.org/3/tutorial/venv.html>`__.
17+
18+
In addition to installing Tutor Main itself, this will install automatically the main versions of all official Tutor plugins (which are enumerated in `plugins.txt <https://github.com/overhangio/tutor/tree/main/requirements/plugins.txt>`_). Alternatively, if you wish to hack on an official plugin or install a custom plugin, you can clone that plugin's repository and install it. For instance::
19+
20+
git clone --branch=main https://github.com/myorganization/tutor-contrib-myplugin.git
21+
pip install -e ./tutor-contrib-myplugin
22+
23+
Once Tutor Main is installed, you can run the usual ``tutor`` commands::
24+
25+
tutor dev launch
26+
tutor dev run lms bash
27+
# ... and so on
28+
29+
Upgrading to the latest version of Open edX
30+
-------------------------------------------
31+
32+
To pull the latest upstream changes, you should first upgrade Tutor Main::
33+
34+
cd ./tutor
35+
git pull
36+
37+
Then, you will have to generate a more recent version of the main Docker images. Images for running Tutor Main are published daily to docker.io (see `here <https://hub.docker.com/r/overhangio/openedx/tags?page=1&ordering=last_updated&name=main>`__). You can fetch the latest images with::
38+
39+
tutor images pull all
40+
41+
Alternatively, you may want to build the images yourself. As usual, this is done with::
42+
43+
tutor images build all
44+
45+
However, these images include the application master branch at the point in time when the image was built. The Docker layer caching mechanism might cause the ``git clone`` step from the build to be skipped. In such cases, you will have to bypass the caching mechanism with::
46+
47+
tutor images build --no-cache all
48+
49+
Running Tutor Main alongside the latest release
50+
--------------------------------------------------
51+
52+
When running Tutor Main, you usually do not want to override your existing Tutor installation. That's why a Tutor Main installation has the following differences from a regular release installation:
53+
54+
- The default Tutor project root is different in Tutor Main. By default it is set to ``~/.local/share/tutor-main`` on Linux (instead of ``~/.local/share/tutor``). To modify this location check the :ref:`corresponding documentation <tutor_root>`.
55+
- The plugins root is set to ``~/.local/share/tutor-main-plugins`` on Linux (instead of ``~/.local/share/tutor-plugins``). This location may be modified by setting the ``TUTOR_PLUGINS_ROOT`` environment variable.
56+
- The default docker-compose project name is set to ``tutor_main_local`` (instead of ``tutor_local``). This value may be modified by manually setting the ``LOCAL_PROJECT_NAME``.
57+
58+
Making changes to Tutor Main
59+
----------------------------
60+
61+
In general pull requests should be open on the "release" branch of Tutor: the "release" branch is automatically merged on the "main" branch at every commit, such that changes made to Tutor releases find their way to Tutor Main as soon as they are merged. However, sometimes you want to make changes to Tutor Main exclusively, and not to the Tutor releases. This might be the case for instance when upgrading the running version of a third-party service (for instance: Elasticsearch, MySQL), or when the release branch requires specific changes. In that case, you should follow the instructions from the :ref:`contributing` section of the docs, with the following differences:
62+
63+
- Open your pull request on top of the "main" branch instead of "release".
64+
- Add a description of your changes by creating a changelog entry with `make changelog-entry`, as in the release branch.

docs/tutorials/nightly.rst

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,8 @@
1-
.. _nightly:
2-
3-
Running Open edX on the master branch ("nightly")
4-
=================================================
5-
6-
Tutor was designed to make it easy for everyone to run the latest release of Open edX. But sometimes, you want to run the latest, bleeding-edge version of Open edX. This is what we call "running master", as opposed to running the release branch. Running the master branch in production is strongly **not** recommended unless you are an Open edX expert and you really know what you are doing. But Open edX developers frequently need to run the master branch locally to implement and test new features. Thus, Tutor makes it easy to run Open edX on the master branch: this is called "Tutor Nightly".
7-
8-
Installing Tutor Nightly
9-
------------------------
10-
11-
Running Tutor Nightly requires more than setting a few configuration variables: because there are so many Open edX settings, version numbers, etc. which may change between the latest release and the current master branch, Tutor Nightly is actually maintained as a separate branch of the Tutor repository. To install Tutor Nightly, you should install Tutor from the "nightly" branch of the source repository. To do so, run::
12-
13-
git clone --branch=nightly https://github.com/overhangio/tutor.git
14-
pip install -e "./tutor[full]"
15-
16-
As usual, it is strongly recommended to run the command above in a `Python virtual environment <https://docs.python.org/3/tutorial/venv.html>`__.
17-
18-
In addition to installing Tutor Nightly itself, this will install automatically the nightly versions of all official Tutor plugins (which are enumerated in `plugins.txt <https://github.com/overhangio/tutor/tree/nightly/requirements/plugins.txt>`_). Alternatively, if you wish to hack on an official plugin or install a custom plugin, you can clone that plugin's repository and install it. For instance::
19-
20-
git clone --branch=nightly https://github.com/myorganization/tutor-contrib-myplugin.git
21-
pip install -e ./tutor-contrib-myplugin
22-
23-
Once Tutor Nightly is installed, you can run the usual ``tutor`` commands::
24-
25-
tutor dev launch
26-
tutor dev run lms bash
27-
# ... and so on
28-
29-
Upgrading to the latest version of Open edX
30-
-------------------------------------------
1+
:orphan:
312

32-
To pull the latest upstream changes, you should first upgrade Tutor Nightly::
33-
34-
cd ./tutor
35-
git pull
36-
37-
Then, you will have to generate a more recent version of the nightly Docker images. Images for running Tutor Nightly are published daily to docker.io (see `here <https://hub.docker.com/r/overhangio/openedx/tags?page=1&ordering=last_updated&name=nightly>`__). You can fetch the latest images with::
38-
39-
tutor images pull all
40-
41-
Alternatively, you may want to build the images yourself. As usual, this is done with::
42-
43-
tutor images build all
44-
45-
However, these images include the application master branch at the point in time when the image was built. The Docker layer caching mechanism might cause the ``git clone`` step from the build to be skipped. In such cases, you will have to bypass the caching mechanism with::
46-
47-
tutor images build --no-cache all
48-
49-
Running Tutor Nightly alongside the latest release
50-
--------------------------------------------------
51-
52-
When running Tutor Nightly, you usually do not want to override your existing Tutor installation. That's why a Tutor Nightly installation has the following differences from a regular release installation:
53-
54-
- The default Tutor project root is different in Tutor Nightly. By default it is set to ``~/.local/share/tutor-nightly`` on Linux (instead of ``~/.local/share/tutor``). To modify this location check the :ref:`corresponding documentation <tutor_root>`.
55-
- The plugins root is set to ``~/.local/share/tutor-nightly-plugins`` on Linux (instead of ``~/.local/share/tutor-plugins``). This location may be modified by setting the ``TUTOR_PLUGINS_ROOT`` environment variable.
56-
- The default docker-compose project name is set to ``tutor_nightly_local`` (instead of ``tutor_local``). This value may be modified by manually setting the ``LOCAL_PROJECT_NAME``.
57-
58-
Making changes to Tutor Nightly
59-
-------------------------------
3+
.. _nightly:
604

61-
In general pull requests should be open on the "master" branch of Tutor: the "master" branch is automatically merged on the "nightly" branch at every commit, such that changes made to Tutor releases find their way to Tutor Nightly as soon as they are merged. However, sometimes you want to make changes to Tutor Nightly exclusively, and not to the Tutor releases. This might be the case for instance when upgrading the running version of a third-party service (for instance: Elasticsearch, MySQL), or when the master branch requires specific changes. In that case, you should follow the instructions from the :ref:`contributing` section of the docs, with the following differences:
5+
Obsolete: Tutor nightly
6+
=======================
627

63-
- Open your pull request on top of the "nightly" branch instead of "master".
64-
- Add a description of your changes by creating a changelog entry with `make changelog-entry`, as in the master branch.
8+
The "nightly" branch was renamed to "main". See :ref:`Tutor Main <main>`.

tutor/__about__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
# The version suffix will be appended to the actual version, separated by a
88
# dash. Use this suffix to differentiate between the actual released version and
9-
# the versions from other branches. For instance: set the suffix to "nightly" in
10-
# the nightly branch.
9+
# the versions from other branches. For instance: set the suffix to "main" in
10+
# the main branch.
1111
# The suffix is cleanly separated from the __version__ in this module to avoid
1212
# conflicts when merging branches.
1313
__version_suffix__ = "nightly"
@@ -19,7 +19,7 @@
1919
__app__ = os.environ.get("TUTOR_APP", "tutor")
2020

2121
# Package version, as installed by pip, does not include the version suffix.
22-
# Otherwise, nightly plugins will automatically install non-nightly Tutor
22+
# Otherwise, Tutor Main plugins will automatically install non-Main Tutor
2323
# version.
2424
__package_version__ = __version__
2525

0 commit comments

Comments
 (0)