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

Tutor branches rename #1096

Closed
DawoudSheraz opened this issue Jul 9, 2024 · 10 comments
Closed

Tutor branches rename #1096

DawoudSheraz opened this issue Jul 9, 2024 · 10 comments
Assignees

Comments

@DawoudSheraz
Copy link
Contributor

DawoudSheraz commented Jul 9, 2024

This issue is to track the implementation/changes proposed in https://discuss.openedx.org/t/tep-rename-nightly-main-and-master-release/12994.

  • Update branch names in tutor core and plugins
    • nightly --> next nightly --> main
    • master --> release
  • Ensure github workflows are updated to represent the new branch naming
  • Ensure the GitLab build pipelines are upgraded to ensure releases and sync work as expected
@kdmccormick
Copy link
Collaborator

kdmccormick commented Nov 7, 2024

The Core PRs for this are ready:

If you like those PRs @regisb and @DawoudSheraz , then I can start asking plugin maintainers to make PRs. Once the plugin PRs and the Edly-internal PRs are ready, we can merge all at once, and then Regis can change the branch names in GitHub.

I'm willing to make that happen before Sumac release, but I'm also willing to wait if it seems like too much change during the release testing phase.

@kdmccormick kdmccormick moved this from Backlog to Blocked in Tutor project management Nov 7, 2024
kdmccormick added a commit to kdmccormick/tpi that referenced this issue Nov 7, 2024
This relies on all the referenced plugins having renamed their
"nightly" branches to "next".

overhangio/tutor#1096
@regisb
Copy link
Contributor

regisb commented Nov 8, 2024

I'm happy with those PRs, thanks for opening them Kyle. But shouldn't they target the "nightly" branches? It's a major breaking change, after all. EDIT: this was a very silly suggestion. Since we are renaming the master branch as well, we should update the release docs.

If necessary I can make the s/nightly/next/g sed replacements in plugins and push straight to the git repos.

Let's push this change before Sumac.

@DawoudSheraz
Copy link
Contributor Author

Should we hold on until sumac? The original proposal to do it with Sumac was because upstream branches would be renamed as well. Since they are not renamed yet, we can wait until sumac. We can do this first thing after sumac. I am ok with merging it before too.

@regisb
Copy link
Contributor

regisb commented Nov 11, 2024

I think we should make that change before we release tutor v19.0.0. Otherwise we are going to find ourselves with a big, risky change to merge in a very short time.

@kdmccormick
Copy link
Collaborator

If necessary I can make the s/nightly/next/g sed replacements in plugins and push straight to the git repos.

I would not oppose that!

As far as I can tell, those PRs will simply be documentation updates. The timing of them is not so sensitive.

But shouldn't they target the "nightly" branches? It's a major breaking change, after all.

Right, uhhh, stepping back... it seems that we have seven things to coordinate:

  1. The Sumac release on Dec 09
  2. The big Tutor PR, which affects docs, GH workflows, and the setting of OPENEDX_COMMON_VERSION.
  3. The version-suffix Tutor PR, which just changes tutor_nightly to tutor_next
  4. The core branch renaming in overhangio/tutor GitHub settings, which only a repo admin (not I) can do.
  5. The plugin branch renamings in overhangio/tutor-* GitHub settings, which only a repo admin can do.
  6. The TPI PR, which adds the next index and switches from @nightly branches to @next branches.
  7. The Edly GitLab pipeline updates

No matter how we order these, it seems that there will necessarily be some moments of disruption. Since many of these have to be done by Edly, I can't say what the easiest route forward is, so I leave the decision to you folks. Just let me know what branches my PRs should target and I will do that 😄 Or, feel free to take over those PRs and operate them yourselves if that's easier.

@DawoudSheraz
Copy link
Contributor Author

As per the latest comments https://discuss.openedx.org/t/tep-rename-nightly-next-and-master-release/12994/9?u=syed_muhammad_dawoud, the new names would be:

  • master --> release (default)
  • nightly --> main

@DawoudSheraz
Copy link
Contributor Author

DawoudSheraz commented Nov 19, 2024

To ensure that both Github and private Gitlab work as expected, the following sequence of events would be taken:

  1. Update tutor and plugin yaml files in tutor-ci on Gitlab (as these files are what power the actual build sequences)
  2. Rename the branches on Gitlab
  3. Rename the branches on Github
  4. Merge the PR in release. For tutor core, we would be merging another PR for nightly suffix.
  5. Repeat 2-4 for all plugins.

Why should the rename be done before merge?

  • If we rename on Gitlab only and then merge on Github, it can cause syncback issues on Github.
  • If we merge PRs on Github before rename, the Github actions simply wont run.

Pull Requests

We plan to do this tomorrow if all the things are set. If not, we will target this before the end of this week.
cc @kdmccormick @regisb

kdmccormick added a commit that referenced this issue Nov 27, 2024
BREAKING CHANGES:
* Change default TUTOR_ROOT folder name from tutor-nightly to
  tutor-main.
* Change default TUTOR_PLUGINS_ROOT folder name from
  tutor-nightly-plugins to tutor-main-plugins.

Other changes:
* Update container suffixes from _nightly to _main.
* Update "Tutor Nightly" in docs to "Tutor Main".
* Update references to "master" and "nightly" branches to "release"
  and "main", respectively.
* Update GitHub links to Tutor's master branch to its release branch.
* Update CI to also test main and release branches.

TEP: https://discuss.openedx.org/t/tep-rename-nightly-next-and-master-release/12994

GitHub issue: #1096
kdmccormick added a commit to kdmccormick/tpi that referenced this issue Nov 27, 2024
This relies on all the referenced plugins having renamed their
"nightly" branches to "next".

overhangio/tutor#1096
regisb added a commit that referenced this issue Nov 27, 2024
BREAKING CHANGES:
* Change default TUTOR_ROOT folder name from tutor-nightly to
  tutor-main.
* Change default TUTOR_PLUGINS_ROOT folder name from
  tutor-nightly-plugins to tutor-main-plugins.

Note that both the project root and the plugins root will be automatically
migrated from the -"nightly" to the "-main" suffix if the destination
does not already exist.

Other changes:
* Update container suffixes from _nightly to _main.
* Update "Tutor Nightly" in docs to "Tutor Main".
* Update references to "master" and "nightly" branches to "release"
  and "main", respectively.
* Update GitHub links to Tutor's master branch to its release branch.
* Update CI to also test main and release branches.

TEP: https://discuss.openedx.org/t/tep-rename-nightly-next-and-master-release/12994

GitHub issue: #1096


---------

Co-authored-by: Régis Behmo <[email protected]>
@regisb
Copy link
Contributor

regisb commented Nov 27, 2024

For the record, GitHub users will have to run the following git commands:

git branch -m master release
git fetch origin
git branch -u origin/release release
git remote set-head origin -a

git branch -m nightly main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

(That is, assuming that the remote name is "origin")

regisb added a commit to overhangio/tpi that referenced this issue Nov 27, 2024
This is part of overhangio/tutor#1096

We are renaming the "nightly" branch to "main" across Tutor
repositories. As a consequence, we also rename the plugin index for the
nightly branch.

We are preserving the existing nightly indices thanks to symlinks.
regisb added a commit to overhangio/tpi that referenced this issue Nov 27, 2024
This is part of overhangio/tutor#1096

We are renaming the "nightly" branch to "main" across Tutor
repositories. As a consequence, we also rename the plugin index for the
nightly branch.

We are preserving the existing nightly indices thanks to symlinks.
regisb added a commit to overhangio/tpi that referenced this issue Nov 27, 2024
This is part of overhangio/tutor#1096

We are renaming the "nightly" branch to "main" across Tutor
repositories. As a consequence, we also rename the plugin index for the
nightly branch.

We are preserving the existing nightly indices thanks to symlinks.
@regisb
Copy link
Contributor

regisb commented Nov 27, 2024

All done \o/

@DawoudSheraz
Copy link
Contributor Author

@kdmccormick Thanks for initiating this.

@regisb Thank you for your help in this entire epic, be it the guidance or helping with renaming/merging with your terminal magic 🧙🏽 🪄. You rock, as always. I learned quite a few neat tricks with this work.

I have created an announcement on discuss https://discuss.openedx.org/t/tutor-branches-rename/14455.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Tutor project management Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants