Skip to content

Commit 3efc9fa

Browse files
hotfix release notes (#555)
Co-authored-by: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com>
1 parent 074679b commit 3efc9fa

3 files changed

Lines changed: 124 additions & 82 deletions

File tree

source/Reviewers/curaterelease.rst

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,55 @@ developed the release branch and the other will review it (**developer** and
8686
* The **reviewer** can now ``merge`` the second PR.
8787
* The admin **must** now revert the 2 settings above in ``main`` and remove the
8888
exception for ``stable`` in the ``prevent updates`` ruleset from earlier.
89+
* :ref:`Tag <tagging>` the release.
8990

91+
Hotfix Release
92+
--------------
93+
94+
This section describes the process of applying a hotfix to the most recent
95+
release. This section is relevant for all repositories with a stable and main
96+
branch setup. The hotfix process will be completed by 2 people with commit
97+
privilege to the relevant repository, at least one of whom must be an ``admin``.
98+
One will have developed the hotfix branch and the other will review it
99+
(**developer** and **reviewer** below).
100+
101+
* An admin will need to enable updates to the ``stable`` branch by adding it as
102+
an exception to the target branches in the ``prevent updates`` ruleset. They
103+
should also enable ``squash`` as a merge option in the ``stable`` ruleset.
104+
* The **developer** will make the hotfix change, making sure the branch has been
105+
created from ``stable``. Open a PR for this change targetting ``stable`` and
106+
get it reviewed and committed. The **reviewer** should squash this change into
107+
``stable``.
108+
* The admin should now update the ``main`` ruleset:
109+
110+
* Disable ``Require linear history``.
111+
* Set ``merge`` as an allowed merge strategy and disable ``squash``.
112+
* Uncheck the ``Require branches to be up to date`` box.
113+
114+
* The **developer** will then create another new PR, to merge the
115+
``stable`` branch into ``main``.
116+
117+
.. image:: images/gh_screenshots/stable_main_light.png
118+
:class: only-light border
119+
120+
.. image:: images/gh_screenshots/stable_main_dark.png
121+
:class: only-dark border
122+
123+
* The **reviewer** can now ``merge`` the second PR.
124+
* The admin **must** now revert the 3 settings above in ``main`` and remove the
125+
exception for ``stable`` in the ``prevent updates`` ruleset from earlier.
126+
* :ref:`Tag <tagging>` the hotfix.
127+
128+
.. _tagging:
90129

91130
Tags and Releases
92131
^^^^^^^^^^^^^^^^^
93132

94133
* All repositories will be tagged with the Simulation Systems release tag in the
95134
format YYYY.MM.X.
96-
* In an upto-date clone of the repository:
135+
136+
* In an upto-date clone of the repository, switch to the commit that you would
137+
like to create a tag from (probably ``git switch stable``):
97138

98139
.. code-block:: shell
99140

source/Reviewers/howtocommit.rst

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ of these steps outlined below.
1919
Before You Start:
2020
* Is anyone else committing?
2121

22-
* `Main Status`_ is used to coordinate ``main`` commits for all
22+
* `Repository Status`_ is used to coordinate ``main`` commits for all
2323
projects.
24+
25+
* This operates on a first-come-first-served queing system.
26+
* To join the queue use the ``Add Item`` button.
27+
* Do not move yourself up the queue unless agreed with others.
28+
2429
* Simple, not conflicting commits can be done in parallel if
2530
reviewers all agree.
2631
* Changes with KGO or Macros usually require sole access to ``main``.
@@ -66,12 +71,17 @@ there are more complicated conflicts ask the developer to solve them
6671
themselves. If there are conflicts in versions.py then see the details in the
6772
macro section below.
6873

69-
Then switch to the up to date branch, e.g.
74+
Then clone the up to date branch. There are many ways to do this, eg.
7075

7176
.. code-block:: shell
7277
7378
gh repo clone <developer>/<fork_name> <clone_name> -- -b <branch_name>
7479
80+
# OR
81+
82+
cd /path/to/upstream/clone
83+
gh pr checkout <pr_number>
84+
7585
2. Macros (if required)
7686
-----------------------
7787

@@ -371,24 +381,27 @@ KGO differently*
371381
372382
cylc vip -z group=all -n <name/of/suite> ./rose-stem
373383
374-
#. You will need access to both a clone with the branch active, and
375-
up to date with ``main``, and a clone of the `SimSys_Scripts github
376-
repo <https://github.com/MetOffice/SimSys_Scripts>`__ (one is
377-
available in $UMDIR). Run the script
378-
``kgo_updates/meto_update_kgo.sh`` which is located in
379-
SimSys_Scripts.
384+
#. You will need access to both:
385+
386+
* The PR branch, up to date with ``main`` and cloned locally. You
387+
likely already have this.
388+
* A clone of the `SimSys_Scripts github repo
389+
<https://github.com/MetOffice/SimSys_Scripts>`__ (one is available
390+
in $UMDIR). Run the script ``kgo_updates/meto_update_kgo.sh`` which
391+
is located in SimSys_Scripts.
380392

381393
#. The script will ask you to enter some details regarding the PR.
382-
* Platforms: enter each platform which has a kgo change, lower case
383-
and space seperated, e.g. `azspice ex1a`
384-
* If running on the EX's it will ask for the host you ran on - this
385-
can be found from Cylc Review.
386-
* Path to your local clone - the script will check this exists and
387-
will fail if it can't be found.
388-
* KGO directory: this will default to vnXX.X_tYYYY where XX.X is
389-
the version number and YYYY is the PR number.
390-
* There are further prompts to the user through the script - in
391-
particular to check the shell script produced.
394+
395+
* Platforms: enter each platform which has a kgo change, lower case
396+
and space seperated, e.g. `azspice ex1a`
397+
* If running on the EX's it will ask for the host you ran on - this
398+
can be found from Cylc Review.
399+
* Path to your local clone - the script will check this exists and
400+
will fail if it can't be found.
401+
* KGO directory: this will default to vnXX.X_tYYYY where XX.X is
402+
the version number and YYYY is the PR number.
403+
* There are further prompts to the user through the script - in
404+
particular to check the shell script produced.
392405

393406
#. If running on EX's the script will ask whether to rsync UM files or
394407
lfricinputs files to the other EX hosts. Select the appropriate
@@ -620,13 +633,13 @@ the PR via the GitHub interface,
620633
6. Close
621634
--------
622635

623-
Nightly testing results are usually checked with a status posted on `Main
636+
Nightly testing results are usually checked with a status posted on `Repository
624637
Status`_. If this hasn't been done then :ref:`check the nightly results
625638
<nightlytesting>`.
626639

627640
If something is broken:
628641

629-
* Announce to the team and on `Main Status`_.
642+
* Announce to the team and on the `Repository Status`_.
630643
* There are a few possibilities for how to proceed,
631644

632645
* If the fix is obvious and trivial then create a quick PR on a branch from
@@ -691,4 +704,4 @@ If something is broken:
691704
* You can then access other machines as the admin user via ``ssh -Y
692705
<HOSTNAME>``.
693706

694-
.. _Main Status: https://code.metoffice.gov.uk/trac/lfric_apps/wiki/TrunkStatus
707+
.. _Repository Status: https://wwwspice/~umadmin/simsys_commit_status/index.html

source/WorkingPractices/reviews.rst

Lines changed: 48 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,31 @@ Selecting Reviewers
1414
-------------------
1515

1616
There is a space in the pull request template to list the GitHub user ID of the
17-
scitech and code reviewers. These can also be filled into the appropriate
17+
scitech and code reviewers - these will also be filled into the appropriate
1818
:ref:`project spaces <review_project>`.
1919

20+
.. admonition:: Requesting a Review
21+
22+
Review requests are handled in the ``Reviewers`` pane on the right hand
23+
side of a pull request.
24+
25+
In Simulation Systems repositories, SciTech and Code Reviewers will be
26+
automatically requested by a workflow, based on entries in the Pull Request
27+
Template.
28+
29+
To request a review manually, select the cog, and then search for the person
30+
you wish to review by either name or GitHub user ID.
31+
32+
.. image:: images/gh_screenshots/review_cog_light.png
33+
:class: only-light border
34+
35+
.. image:: images/gh_screenshots/review_cog_dark.png
36+
:class: only-dark border
37+
38+
Code owners in some repositories will automatically be added to this
39+
reviewers section based on the files being changed.
40+
41+
2042
SciTech Review
2143
^^^^^^^^^^^^^^
2244

@@ -25,8 +47,9 @@ owner(s) for the area affected. If they don't want to then they may have
2547
suggestions for other suitable reviewers or you can approach anyone who would
2648
have good insight into the changes made.
2749

28-
Once you have found a reviewer add their GitHub user ID to the pull request
29-
description and request their review.
50+
Once you have found a reviewer and are ready for review, add their GitHub user
51+
ID to the pull request description. Their review will automatically be
52+
requested by the :ref:`review project workflow <review_project>`.
3053

3154
Guidance for the SciTech reviewer can be found on the
3255
:ref:`SciTech review page <scitech_review>`.
@@ -42,30 +65,13 @@ leave a comment for ``@MetOffice/ssdteam`` on the pull request.
4265

4366
The assigned person will be listed in the pull request description and
4467
:ref:`Review Tracking project <review_project>`. Once the SciTech review has
45-
been completed either the developer or SciTech reviewer should request the
46-
review of the assigned Code Reviewer.
68+
been completed, the Code Reviewer will be automatically requested (unless they
69+
are already requested as a Code Owner - in this case you may want to tag them to
70+
make them aware).
4771

4872
Guidance for the Code reviewer can be found on the
4973
:ref:`Code review page <code_review>`.
5074

51-
.. admonition:: Requesting a Review
52-
53-
Review requests are handled in the ``Reviewers`` pane on the right hand
54-
side of a pull request.
55-
56-
Select the cog, and then search for the person you wish to review by
57-
either name or GitHub user ID.
58-
59-
.. image:: images/gh_screenshots/review_cog_light.png
60-
:class: only-light border
61-
62-
.. image:: images/gh_screenshots/review_cog_dark.png
63-
:class: only-dark border
64-
65-
Code owners in some repositories will automatically be added to this
66-
reviewers section based on the files being changed.
67-
68-
6975
.. _review_project:
7076

7177
Simulation Systems Review Tracker
@@ -82,45 +88,27 @@ sidebar of the pull request:
8288
:class: only-dark border
8389

8490
The project is used to give pull requests a status that distinguishes between
85-
the different review states, and to monitor who is doing the reviews.
86-
87-
Some states are achieved automatically, some require changing manually:
88-
89-
* When the developer feels a PR is ready for the SciTech or Code Reviewer to
90-
look at (either initially, or after changes have been made) the state should
91-
be **manually** changed to ``SciTech Review`` or ``Code Review`` as
92-
appropriate.
93-
94-
* When the SciTech Review has been completed the state should be **manually**
95-
changed to Code Review.
96-
97-
* When the Code Review has been completed the state should be **manually**
98-
changed to Approved.
99-
100-
Automatic changes include:
101-
102-
* When changes are requested by a reviewer the state becomes ``Changes Requested``
103-
* When the pull request has been merged, or otherwise closed, the state becomes
104-
``Done``
105-
106-
.. important::
107-
Changing the project status **does not** notify the reviewer. To do this:
108-
109-
* When the SciTech Review has been completed you should add the assigned Code
110-
Reviewer to the list of reviewers. This will notify them that their review is
111-
required.
112-
113-
* If a reviewer has requested changes then you can alert them that you are
114-
ready for another review by using GitHubs ``rerequest review`` option;
115-
selecting the circling arrows to the right of the reviewers name.
116-
117-
.. image:: images/gh_screenshots/rerequest_light.png
118-
:class: only-light border
91+
the different review states, and to monitor who is doing the reviews. The state
92+
and fields of the project are automatically updated by github actions.
93+
94+
* The developer should tag the SciTech Reviewer in the Pull Request template
95+
when you are ready for review. This will request a review from them and update
96+
the state to SciTech Review.
97+
* The SSD team will add a Code Reviewer. When the Scitech Review has been
98+
completed a review from the Code Reviewer will automatically be requested, and
99+
the project state updated. If the Pull Request is trivial, you will need to
100+
manually request a review from the Code Reviewer.
101+
* As reviews are completed the state will move to ``Changes Requested`` and
102+
``Approved`` as appropriate. Re-request a review once any changes have been
103+
made.
104+
105+
.. image:: images/gh_screenshots/rerequest_light.png
106+
:class: only-light border
119107

120-
.. image:: images/gh_screenshots/rerequest_dark.png
121-
:class: only-dark border
108+
.. image:: images/gh_screenshots/rerequest_dark.png
109+
:class: only-dark border
122110

123-
* You can ``@username`` in any comment to draw that persons attention to the
111+
* You can ``@username`` in any comment to draw that persons attention to the
124112
pull request.
125113

126114

0 commit comments

Comments
 (0)