Skip to content

Commit

Permalink
feat!: Rename Tutor Nightly to Tutor Main
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Nov 27, 2024
1 parent 16176ce commit ec260f4
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 22 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Sync with private repo

on:
push:
branches: [ master, main, nightly ]
branches:
- release
- main
- master # REMOVE-AFTER-V19: Old branch name
- nightly # REMOVE-AFTER-V19: Old branch name

jobs:
sync:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Run tests

on:
push:
branches: [ master, main, nightly ]
- release
- main
- master # REMOVE-AFTER-V19: Old branch name
- nightly # REMOVE-AFTER-V19: Old branch name
pull_request:
branches: [ master, main, nightly ]
- release
- main
- master # REMOVE-AFTER-V19: Old branch name
- nightly # REMOVE-AFTER-V19: Old branch name

jobs:
tests:
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/20241107_144307_kyle_branch_rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- 💥[Improvement] Rename Tutor's two branches (by @kdmccormick):
* Rename **master** to **release**, as this branch runs the latest official Open edX release.
* 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 changes: 2 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Open edX customisation

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.

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

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

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

- ``ATLAS_REVISION`` (default: ``"main"`` on nightly and ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
- ``ATLAS_REVISION`` (default: ``"main"`` for Tutor Main, or ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
- ``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>`_.
- ``ATLAS_OPTIONS`` (default: ``""``) Pass additional arguments to ``atlas pull``. Refer to the `atlas documentations <https://github.com/openedx/openedx-atlas>`_ for more information.

Expand Down
2 changes: 1 addition & 1 deletion docs/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For detailed explanations on how to work on edx-platform and its dependencies, s
First-time setup
----------------

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).
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).

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

Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If that does not work, then check if there are any other Docker containers runni

docker ps -a

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.
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.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/tutor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ When making a new Tutor release, increment the:
- MAJOR version when making a backward-incompatible change (prefixed by "💥" in the changelog, as explained below).
- MINOR version when making a backward-compatible change.

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>`).
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>`).

`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.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/edx-platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Check out the right version of the upstream repository. If you are working on th
# I.e: aspen, birch, cypress, etc.
git checkout open-release/zebulon.master

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

git checkout master

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Open edX customization
edx-platform
edx-platform-settings
google-smtp
nightly
main

System administration
---------------------
Expand Down
6 changes: 3 additions & 3 deletions tutor/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

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

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

Expand Down
4 changes: 2 additions & 2 deletions tutor/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
PLUGINS_ROOT_ENV_VAR_NAME = "TUTOR_PLUGINS_ROOT"

# Folder path which contains *.yml and *.py file plugins.
# On linux this is typically ``~/.local/share/tutor-plugins``. On the nightly branch
# this will be ``~/.local/share/tutor-plugins-nightly``.
# On linux this is typically ``~/.local/share/tutor-plugins``. On the main branch
# this will be ``~/.local/share/tutor-plugins-main``.
# The path can be overridden by defining the ``TUTOR_PLUGINS_ROOT`` environment
# variable.
PLUGINS_ROOT = os.path.expanduser(
Expand Down
2 changes: 1 addition & 1 deletion tutor/plugins/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from tutor.types import Config, get_typed

PLUGIN_INDEXES_KEY = "PLUGIN_INDEXES"
# Current release name ('zebulon' or 'nightly') and version (1-26)
# Current release name ('zebulon' or 'main') and version (1-26)
RELEASE = __version_suffix__ or env.get_current_open_edx_release_name()
MAJOR_VERSION = int(__version__.split(".", maxsplit=1)[0])

Expand Down
4 changes: 2 additions & 2 deletions tutor/plugins/openedx.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@


@hooks.Filters.CONFIG_DEFAULTS.add()
def _set_openedx_common_version_in_nightly(
def _set_openedx_common_version_in_main(
items: list[tuple[str, t.Any]]
) -> list[tuple[str, t.Any]]:
if __version_suffix__ == "nightly":
if __version_suffix__ == "main":
items.append(("OPENEDX_COMMON_VERSION", "master"))
return items

Expand Down
6 changes: 3 additions & 3 deletions tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ RUN git config --global user.email "[email protected]" \
{%- if patch("openedx-dockerfile-git-patches-default") %}
# Custom edx-platform patches
{{ patch("openedx-dockerfile-git-patches-default") }}
{%- elif EDX_PLATFORM_VERSION == "master" %}
# Patches in nightly node
{%- elif EDX_PLATFORM_VERSION == "main" %}
# Patches in Main node
{%- else %}
# Patches in non-nightly mode
# Patches in non-Main mode
{%- endif %}

{# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/<GITSHA1>.patch | git am #}
Expand Down
2 changes: 1 addition & 1 deletion tutor/templates/config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ OPENEDX_CMS_UWSGI_WORKERS: 2
OPENEDX_LMS_UWSGI_WORKERS: 2
OPENEDX_MYSQL_DATABASE: "openedx"
OPENEDX_MYSQL_USERNAME: "openedx"
# the common version will be automatically set to "master" in the nightly branch
# the common version will be automatically set to "master" in the main branch
OPENEDX_COMMON_VERSION: "open-release/redwood.3"
OPENEDX_EXTRA_PIP_REQUIREMENTS: []
MYSQL_HOST: "mysql"
Expand Down

0 comments on commit ec260f4

Please sign in to comment.