Actions

Developer Area/Release Instructions/Release Candidate: Difference between revisions

From Mahara Wiki

< Developer Area‎ | Release Instructions
No edit summary
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= 1. Create the new branch =
==Create the new dev branch==
Note: You only need to do this for the '''first''' release candidate. If you need to do another release candidate, put it on the '''same branch.'''


* You should create a new "_STABLE" branch based off of master.
Create a new <code>_DEV</code> branch based off of main.
** Obviously you only need to do this for the '''first' release candidate for each major version. If you need to do subsequent release candidates, just put them on the same branch.


<pre>
*<code>git checkout main</code>
git checkout master
git checkout -b 1.10_STABLE
git push gerrit 1.10_STABLE
</pre>


* If gerrit won't let you push your new branch, you can instead create it through Gerrit by going to reviews.mahara.org, clicking on "Projects", then on the "mahara" project, and then on the "Branches" subtab.
*<code>git checkout -b 1.10_DEV</code>
* In the '''Makefile''' of the new '''_STABLE''' branch, replace "master" with the name of the branch.
* Create an empty "Changelog" file and commit it
* Update the release in htdocs/lib/version.php to be [whatever]rc1


= 2. Bump the version on master =
*<code>git push gerrit 1.10_DEV</code>


* Go to the master branch and bump the version to 1.5.0dev (if you just created the 1.4_STABLE branch)
If Gerrit won't let you push your new branch, you can instead create it through Gerrit.
** htdocs/lib/version.php
** README


= 3. Package the release =
*Go to [https://reviews.mahara.org/ reviews.mahara.org]
*Click on 'Projects', the 'mahara' project, and then on the 'Branches' subtab.


Now, on the new _STABLE branch, follow the usual [[Developer Area/Release Instructions|release instructions]] '''up to and including step 5'''.
Then do the following


= 4. Creating the new language packs branch =
*In the '''<code>Makefile</code>''' of the new '''<code>_DEV</code>''' branch, replace <code>main</code> with the name of the branch. Commit and make push.
*Create an empty 'ChangeLog' file. Commit and <code>make push</code>. Note: the file needs a capital C and L in the name.
*Update the release in <code>htdocs/lib/version.php</code> to be  <code>$config->release = 'XX.XXrc1';</code> ??? Do we still need this or is it done by release script


You need to set up launchpad translations for the new branch. See the separate instructions on [[Developer_Area/Language_Packs/Launchpad_Branching|setting up a new translations branch]].
==Bump the version on main==
 
*Go to the main branch and bump the version (e.g. if you just created the <code>22.04_DEV</code> branch, bump it to <code>22.10_DEV</code> )
*In <code>htdocs/lib/version.php</code> update <code>$config->series</code>, <code>$config->release</code> and <code>$config->version</code> (version should be today's date)
*Update the README.md with information about how to upgrade to this version, e.g. which minimum version they should have etc
*Commit and <code>make push</code>
 
{{Final_Checks}}
 
==Skip the changelog and release notes==
Do not populate the changelog. For the release notes put something like ''<nowiki/>'First release candidate for 1.4''<nowiki/>'.


= 5. Changelog and release notes =
==About Release Candidate releases==
For a Release Candidate, a selection of bugs have been targeted to a the 'rc1' milestone. After the first release candidate, an rc2 milestone may be created to track which ones will go onto the final release. '''Once an rc1 or rc2 bug has been committed, its status should change back to its original .0 milestone.'''


Do not paste the full changelog on Launchpad (that's for the actual release) and only put something like "First release candidate for 1.4" in the bullet point section of the release notes on Launchpad.
{{Release_Script}}


= 6. Do not update the bug tracker =
{{Testing}}


The bug tracker does not need to be updated because no bugs should ever have an RC release as its milestone.
{{Upload_Tarballs}}


Furthermore, these bugs are not fixed until the release has happened, so they should be left as "Fix committed".
==Creating the new language packs branch==


= 7. Announcements =
You need to set up launchpad translations for the new branch.  See the separate instructions on [[Developer_Area/Language_Packs/Launchpad_Branching|setting up a new translations branch]].


The main purpose of an RC is to get people to test the release for any major bugs. Therefore, we do not consider the RC as a release and only announce it through:
==Changelog and release notes==


* Twitter
Do not paste the full changelog on Launchpad (that's for the actual release) and only put something like "First release candidate for 1.4" in the bullet point section of the release notes on Launchpad.
* IRC
* The mahara.org news forum


(Note that Freshmeat is missing.)
==Update master.dev.mahara.org==


=== Sample news forum post for first release candidate ===
Updating master.dev.mahara.org however is useful for users who do not have somewhere to set up a test instance but would like to check out the changes.


Subject: First release candidate for Mahara 1.10 available
==Do not update the bug tracker==
We have just published the first release candidate for Mahara 1.10.
This is a call for testing. If you want to make sure that Mahar 1.10 works well on your site, please help us out by testing this first release candidate:


* https://launchpad.net/mahara/+milestone/1.0rc1
The bug tracker does not need to be updated because no bugs should ever have an RC release as its milestone.


New features for the release candidate are listed on Launchpad with the "nominatedfeature" tag.
Furthermore, these bugs are not fixed until the release has happened, so they should be left as "Fix committed".


* https://bugs.launchpad.net/mahara/+bugs?field.milestone%3Alist=64606&field.tag=nominatedfeature
==Do not update the demo site==


We've also done lots of bug fixing is this release cycle. The full list of changes that have been made for 1.10 can be found by clicking here.
The demo site should always be the last '''stable''' release. The RC is not a release yet.


* https://bugs.launchpad.net/mahara/+bugs?field.status%3Alist=FIXCOMMITTED&field.status%3Alist=FIXRELEASED&field.milestone%3Alist=64606
{{Announcements}}
Publish news [[Developer Area/Release Instructions/Release day#.28Release candidate.29 Announcements|forum posts to get people to test the release]].


If any of the targeted bugs affect your users, this is an opportunity for you to make sure they are fixed properly.
The main purpose of an RC is to get people to test the release for any major bugs. Therefore, we do not consider the RC as a release and only announce it through: [https://twitter.com/maharaproject Twitter], IRC, and the mahara.org news forum.


If you find any bugs, please report them on Launchpad so they can be fixed before the 1.10.0 release:
{{Additional tasks}}


* https://bugs.launchpad.net/mahara/+filebug
===Update master.dev.mahara.org===
Updating master.dev.mahara.org however is useful for users who do not have somewhere to set up a test instance but would like to check out the changes.


If important bugs are found within the next week we may produce a second release candidate. Otherwise this release candidate will become the final 1.10.0 release.
===News forum post template for RC1===
🟡  Kristina


Cheers,
[https://mahara.org/interaction/forum/topic.php?id=8934 Example for 21.10] and [https://mahara.org/interaction/forum/topic.php?id=8934 22.04].


The 1.10 Release Managers
===News forum template for second and/or final RC===
🟡  Kristina


=== Sample forum post for second and/or final release candidate ===
''Note: Outdated - needs updating''


Subject: Second release candidate for Mahara 1.4 available
Subject: Second release candidate for Mahara 1.4 available
Line 85: Line 88:
Based on the feedback we have received so far, this will most likely be the last release candidate before the final 1.4 release:
Based on the feedback we have received so far, this will most likely be the last release candidate before the final 1.4 release:


* https://launchpad.net/mahara/1.4/1.4rc2
*https://launchpad.net/mahara/1.4/1.4rc2


New Features for the Release Candidate are listed on Launchpad with the newfeature tag:
New Features for the Release Candidate are listed on Launchpad with the newfeature tag:


* https://bugs.launchpad.net/mahara/+bugs?field.milestone%3Alist=64606&field.tag=nominatedfeature
*https://bugs.launchpad.net/mahara/+bugs?field.milestone%3Alist=64606&field.tag=nominatedfeature


We've also done lots of bug fixing is this release cycle. The full list of changes that have been made for 1.4 can be found by clicking here.
We've also done lots of bug fixing is this release cycle. The full list of changes that have been made for 1.4 can be found by clicking here.


* https://bugs.launchpad.net/mahara/+bugs?field.status%3Alist=FIXCOMMITTED&field.status%3Alist=FIXRELEASED&field.milestone%3Alist=64606
*https://bugs.launchpad.net/mahara/+bugs?field.status%3Alist=FIXCOMMITTED&field.status%3Alist=FIXRELEASED&field.milestone%3Alist=64606


If you haven't had a chance to test it out yet, please do so now and report any bugs on the tracker:
If you haven't had a chance to test it out yet, please do so now and report any bugs on the tracker:
 
 
* https://bugs.launchpad.net/mahara/+filebug
*https://bugs.launchpad.net/mahara/+filebug
 
 
This is your last chance to make sure your upgrade to 1.4 will be smooth. If nothing major is reported in the next few days, we will be cutting the 1.4.0 release in about a week.
This is your last chance to make sure your upgrade to 1.4 will be smooth. If nothing major is reported in the next few days, we will be cutting the 1.4.0 release in about a week.


Cheers,
Cheers,
 
 
The 1.4 Release Managers
The 1.4 Release Managers
= 8. Do not update the demo site =
The demo site should always be the last '''stable''' release. The RC is not a release yet.
= 9. Update master.dev.mahara.org =
Updating master.dev.mahara.org however is useful for users who do not have somewhere to set up a test instance but would like to check out the changes.

Latest revision as of 15:35, 17 October 2022

Create the new dev branch

Note: You only need to do this for the first release candidate. If you need to do another release candidate, put it on the same branch.

Create a new _DEV branch based off of main.

  • git checkout main
  • git checkout -b 1.10_DEV
  • git push gerrit 1.10_DEV

If Gerrit won't let you push your new branch, you can instead create it through Gerrit.

  • Go to reviews.mahara.org
  • Click on 'Projects', the 'mahara' project, and then on the 'Branches' subtab.

Then do the following

  • In the Makefile of the new _DEV branch, replace main with the name of the branch. Commit and make push.
  • Create an empty 'ChangeLog' file. Commit and make push. Note: the file needs a capital C and L in the name.
  • Update the release in htdocs/lib/version.php to be $config->release = 'XX.XXrc1'; ??? Do we still need this or is it done by release script

Bump the version on main

  • Go to the main branch and bump the version (e.g. if you just created the 22.04_DEV branch, bump it to 22.10_DEV )
  • In htdocs/lib/version.php update $config->series, $config->release and $config->version (version should be today's date)
  • Update the README.md with information about how to upgrade to this version, e.g. which minimum version they should have etc
  • Commit and make push

📋 Final Checks

🟡 Security team (if you don't have +2 review status, you won't be able to see these patches)

🚨 Make sure that any security reviews/patches are merged before proceeding 🚨

  • Merge the 'Private' security patches.
  • Update the related Launchpad bugs to 'Public security'.

🟡 Release manager

  • CVE #'s - Security issues have an assigned CVE number?
  • Backporting - security fixes backported to all supported versions that need them?
  • Bugs fixed - all bugs going into his release have their fixes merged for all supported versions?
  • Comms - to Mahara partners + drafted the forum posts?

🟡 All devs

  • Confirm your minor point release number, i.e. check the latest minor point release and add 1, e.g. 21.10.4 -> 21.10.5
  • (Security team) Cherry-pick the security bugs with the status ' Confirmed' to your minor point branch. e.g. _DEV
  • Create a release on the milestone on Launchpad to receive the release generated tarballs
  • git pull mahara-scripts
  • Valid GPG - ensure you have a valid GPG key added to your Launchpad account: See https://launchpad.net/~username/+editpgpkeys
  • lptools - ensure you have the lp-upload-project installed for uploading the release tars: apt-get install lptools

Skip the changelog and release notes

Do not populate the changelog. For the release notes put something like 'First release candidate for 1.4'.

About Release Candidate releases

For a Release Candidate, a selection of bugs have been targeted to a the 'rc1' milestone. After the first release candidate, an rc2 milestone may be created to track which ones will go onto the final release. Once an rc1 or rc2 bug has been committed, its status should change back to its original .0 milestone.

⚡ The release script

  • A git repo will be created at /tmp/mahara.####/mahara/ cloned from https://git.mahara.org/mahara/mahara .
  • It builds Mahara archives based on the given _DEV branch and puts thme into your current folder. ( .zip, .tar.gz.asc, and .tar.bz2.asc)
  • You will get a release-X.Y.Z-cleanup.sh script to run later.


Run the script

  1. Go into mahara-scripts and git pull the latest version.
  2. Run ./release.php X.Y.Z X.Y_DEV.
    • X.Y.Z is the new branch that will be made. This is also used in the archive file names.
    • X.Y_DEV is the existing branch we will create the new release from.
    • If the Z in X.Y.Z is "0" this will also create a new _STABLE branch.
  3. When prompted, insert your changelog.

Any data you enter for the prompts will go into the Launchpad release page. You can enter it here, or leave it empty here and enter it directly into the Launchpad webpage.

Check the terminal output in case there are GPG errors

E.g. Tag new version bump commit as 'X.YRC2_RELEASE' error: gpg failed to sign the data error: unable to sign the tag

So this is what I did to fix it, all commands are on command line:

  1. Update the gpg program with: git config --global gpg.program gpg2
  2. Test if it is working with: echo "test" | gpg2 --clearsign

It wasn't so I had to do: export GPG_TTY=$(tty)

then run again echo "test" | gpg2 --clearsign

Run release.php command again and check if it still gives the error.

Do not reboot your machine in the middle of doing a release or you will have to run through the release script again.

Note: For release candidates the commit message should be empty.

✅ Testing

With continuous Behat testing throughout development, we only need to some basic manual testing.

Extract the build and prep the database

Test that we can install Mahara with the pre-built packages.

  1. Extract the build (.tar or .zip) of your pre-built Mahara and make sure you can connect to it via web installer.
  2. Drop the database and create a new blank one.

Test case #1: Install the site with the web interface

  1. Go to your Mahara site and click 'Install'.
  2. Reset your database and repeat with MySQL/PostgreSQL.

Note: If we are doing a .0 release the install will complain about missing $versions->$currentmajorversion->latest release number but don't panic this is because the local copy of the release has the series version that doesn't exist upstream yet so we can ignore this warning·

Test case #2: Manual upgrade with the CLI and the web interface

Web interface

  1. Install a fresh site on version X.Y.Z(-1), i.e. (an earlier version).
  2. Create a portfolio, a blog with a blogpost, a group with a forum and forum post.
  3. Switch the code to your current release.
  4. Check that everything still works.
  5. Go to the site and click 'Upgrade' to get the site version to X.Y.Z .
  6. Repeat with PostgreSQL/MySQL.

CLI

  1. Install a fresh site on version X.Y.Z(-1), i.e. (an earlier version).
  2. Create a portfolio, a blog with a blogpost, a group with a forum and forum post.
  3. Switch the code to your current release.
  4. Upgrade to X.Y.Z with the CLI script htdocs/admin/cli/upgrade.php
  5. Check that everything still works.
  6. Repeat with PostgreSQL/MySQL.

🚀 Sign and upload the tarballs

Run ./release-X.Y.Z-cleanup.sh to upload the release and clean up any temporary files.

Note I: If running this file stops before completion for any reason you will need to edit it and comment out the bits that did finish so that you don't run those buts twice then try the script again. For example the script does the bit where it pushes the tag to the git remote and signs the zipped files but doesn't upload them - you would need to comment out the 'git push' lines and the 'gpg --armor' lines.

Note II: If the zipped files fail to upload to Launchpad via the script then you will need to manually upload the zipped files and their corresponding .asc files. To do this go to the milestone page in Launchpad and click the 'Add download file' link. Set the description to: release tarball and choose the matching zipped and .asc file to upload. You will need to do this for all the three types: .zip, .tar.bz2, .tar.gz

Creating the new language packs branch

You need to set up launchpad translations for the new branch. See the separate instructions on setting up a new translations branch.

Changelog and release notes

Do not paste the full changelog on Launchpad (that's for the actual release) and only put something like "First release candidate for 1.4" in the bullet point section of the release notes on Launchpad.

Update master.dev.mahara.org

Updating master.dev.mahara.org however is useful for users who do not have somewhere to set up a test instance but would like to check out the changes.

Do not update the bug tracker

The bug tracker does not need to be updated because no bugs should ever have an RC release as its milestone.

Furthermore, these bugs are not fixed until the release has happened, so they should be left as "Fix committed".

Do not update the demo site

The demo site should always be the last stable release. The RC is not a release yet.

📣 Announcements

Publish news forum posts to get people to test the release.

The main purpose of an RC is to get people to test the release for any major bugs. Therefore, we do not consider the RC as a release and only announce it through: Twitter, IRC, and the mahara.org news forum.

📋 Additional tasks

Manage merge conflicts in version.php in backports

When backporting patches, sometimes the htdocs/lib/version.php will get merge conflicts because of a new DB upgrade step.

Example backporting from 22.04 to 21.10.png

Solve the conflict:

  1. Keep the set of code that matches to the version you're working with, e.g. in this case, the top section.
  2. Increment the $config->version number by 1.
  3. Copy the incremented version number and replace the last step in htdocs/lib/db/upgrade.php
  4. Check that the new number is higher than the previous upgrade step.

In certain situations, $config->version number needs to be incremented and copied over the most latest DB upgrade steps, ensuring that it's later than the other DB upgrade steps.

Update master.dev.mahara.org

Updating master.dev.mahara.org however is useful for users who do not have somewhere to set up a test instance but would like to check out the changes.

News forum post template for RC1

🟡 Kristina

Example for 21.10 and 22.04.

News forum template for second and/or final RC

🟡 Kristina

Note: Outdated - needs updating

Subject: Second release candidate for Mahara 1.4 available

Based on the feedback we have received so far, this will most likely be the last release candidate before the final 1.4 release:

New Features for the Release Candidate are listed on Launchpad with the newfeature tag:

We've also done lots of bug fixing is this release cycle. The full list of changes that have been made for 1.4 can be found by clicking here.

If you haven't had a chance to test it out yet, please do so now and report any bugs on the tracker:

This is your last chance to make sure your upgrade to 1.4 will be smooth. If nothing major is reported in the next few days, we will be cutting the 1.4.0 release in about a week.

Cheers,

The 1.4 Release Managers