Project

General

Profile

How to tag and build a LArSoft patch release » History » Version 10

Lynn Garren, 02/27/2019 01:20 PM

1 1 Lynn Garren
h1. How to tag and build a LArSoft patch release
2 1 Lynn Garren
3 3 Lynn Garren
{{>TOC}}
4 3 Lynn Garren
5 10 Lynn Garren
[[Policy for development from a tagged release]]
6 1 Lynn Garren
Experiments will build patch releases themselves with help from the LArSoft release manager.
7 2 Lynn Garren
There will be a very limited set of people with privileges to do this.  
8 7 Lynn Garren
We ask that the experiment release managers to whom these privileges have been granted do not grant privileges to anyone else.  Instead request permissions from LArSoft.
9 6 Lynn Garren
Permissions will be removed when someone ceases to have this responsibility.
10 2 Lynn Garren
11 10 Lynn Garren
* Permissions include:
12 10 Lynn Garren
** larsoft redmine manager role
13 10 Lynn Garren
** ability to login to larsoft cvmfs
14 10 Lynn Garren
** ability to upload to SciSoft with the larsoft role
15 10 Lynn Garren
16 10 Lynn Garren
17 10 Lynn Garren
18 2 Lynn Garren
h2(count). Tools
19 2 Lynn Garren
20 2 Lynn Garren
* Scripts used to build the patch release will be found in the larreltools product.  
21 2 Lynn Garren
* larreltools is not part of the standard distribution, but will be available from SciSoft and in cvmfs.
22 4 Lynn Garren
23 2 Lynn Garren
h2(count). Initial setup
24 1 Lynn Garren
25 10 Lynn Garren
*This step is done once for any patch release step and will be done by the LArSoft release manager.*
26 9 Lynn Garren
27 2 Lynn Garren
h3(count). Make branches for the release
28 2 Lynn Garren
29 2 Lynn Garren
* If a release is named vaa_bb_cc, branches will be created for the larsoft/larsoftobj suite with the name vaa_bb_cc_br.
30 2 Lynn Garren
<pre>
31 2 Lynn Garren
(setup the latest larreltools)
32 2 Lynn Garren
setup mrb
33 2 Lynn Garren
export MRB_PROJECT=larsoft
34 2 Lynn Garren
mrb newDev -v  vaa_bb_cc -q eN:prof 
35 2 Lynn Garren
source local*/setup
36 2 Lynn Garren
cd $MRB_SOURCE
37 2 Lynn Garren
mrb g -t LARSOFT_SUITE_vAA_BB_CC larsoft_suite
38 2 Lynn Garren
mrb g -t LARSOFT_SUITE_vAA_BB_CC larsoftobj_suite
39 2 Lynn Garren
dogit branch (check that you are on the head of the tag)
40 2 Lynn Garren
dogit "co -b vaa_bb_cc_br"
41 2 Lynn Garren
dogit "push -u origin vaa_bb_cc_br"
42 1 Lynn Garren
</pre>
43 8 Lynn Garren
** Note that some older patch releases may have used a slightly different branch naming scheme.
44 2 Lynn Garren
45 4 Lynn Garren
h3(count). Housecleaning
46 2 Lynn Garren
47 2 Lynn Garren
* cd $MRB_SOURCE/larsoft/releaseDB
48 2 Lynn Garren
* Make sure that larutils, larbatch, and mrb are removed from the cfg scripts.
49 2 Lynn Garren
** streamline this by creating a small "larsoft extras" distribution that can be optionally included.
50 2 Lynn Garren
* commit and push the change
51 2 Lynn Garren
52 4 Lynn Garren
h2(count). Making a patch release
53 2 Lynn Garren
54 2 Lynn Garren
* These notes presume that you do not have an existing directory
55 2 Lynn Garren
56 4 Lynn Garren
h3(count). MicroBooNE setup
57 2 Lynn Garren
58 2 Lynn Garren
* setup the latest release of larreltools
59 2 Lynn Garren
* startUboonePatchRel  <working_dir> <tag> <larsoft branch> [<uboone branch>]
60 2 Lynn Garren
** This script will create a directory named "tag" under the "working_dir".
61 2 Lynn Garren
** This script will clone the larsoft/larsoftobj on the named branch.
62 2 Lynn Garren
** The same branch name will be used when cloning the uboone_suite unless a second branch name is supplied.
63 2 Lynn Garren
** The directory structure will include a single source code directory with subdirectories for e17 and c2 debug and prof builds.
64 2 Lynn Garren
** Use "dogit branch" to double check that you are on the expected branch.
65 2 Lynn Garren
66 4 Lynn Garren
h3(count). Setup for other experiments
67 2 Lynn Garren
68 2 Lynn Garren
* Appropriate scripts will be supplied when necessary.
69 2 Lynn Garren
70 4 Lynn Garren
h3(count). Local development
71 2 Lynn Garren
72 2 Lynn Garren
* Before integrating any feature branches, make sure that the release builds as is and that the unit tests work.
73 2 Lynn Garren
** Make sure to build and test both e17 and c2.   Usually the prof build is sufficient for testing.  prof is preferred over debug, which sometimes masks problems.
74 2 Lynn Garren
<pre>
75 2 Lynn Garren
source local*/setup
76 2 Lynn Garren
cd $MRB_BUILDDIR
77 2 Lynn Garren
mrb t -jN
78 2 Lynn Garren
</pre>
79 2 Lynn Garren
* Next make changes and integrate feature branches
80 2 Lynn Garren
** Because feature branches may conflict or not have been thoroughly tested, we recommend merging one feature branch set at a time.  Build and test after each set.
81 2 Lynn Garren
82 4 Lynn Garren
h3(count). Update the package versions
83 2 Lynn Garren
84 2 Lynn Garren
* Do this once all changes have been made.
85 2 Lynn Garren
* ONLY update the version if there is a change.
86 2 Lynn Garren
* cd to each directory separately
87 2 Lynn Garren
* git diff LARSOFT_SUITE_vaa_bb_cc[_dd]
88 2 Lynn Garren
** You are comparing against the previous patch release in this set.
89 2 Lynn Garren
** If this is the first patch release in the set, compare against the original release.
90 2 Lynn Garren
** If there are no changes, move this package out of the way.
91 2 Lynn Garren
<pre>
92 2 Lynn Garren
cd $MRB_SOURCE
93 2 Lynn Garren
mkdir ../notag
94 2 Lynn Garren
mv xxx ../notag
95 2 Lynn Garren
mrb uc
96 2 Lynn Garren
</pre>
97 2 Lynn Garren
** Move all experiment code out of the way.  (_mv ub* ../notag/_ for MicroBooNE)
98 2 Lynn Garren
** Use "mrb uv" to update the version by one in the patch field.
99 2 Lynn Garren
*** There should be a script for this...
100 2 Lynn Garren
* You must update larsoftobj/bundle/CMakeLists.txt and larsoft/releaseDB/CMakeLists.txt by hand with the new versions.
101 2 Lynn Garren
** commit and push these changes
102 2 Lynn Garren
* DO NOT commit the changes to ups/product_deps
103 2 Lynn Garren
104 2 Lynn Garren
105 4 Lynn Garren
h3(count).  Tagging the release
106 2 Lynn Garren
107 2 Lynn Garren
* Do a final build and test with just the packages you expect to tag.  
108 2 Lynn Garren
** This step will also create the necessary build cfg files.
109 2 Lynn Garren
** If there are changes in both larsoft and larsoftobj, double check for consistency.
110 2 Lynn Garren
<pre>
111 2 Lynn Garren
cd $MRB_BUILDDIR/larsoft
112 2 Lynn Garren
diff releaseDB ../larsoftobj/bundle | grep diff
113 2 Lynn Garren
diff releaseDB ../larsoftobj/bundle | grep Only
114 2 Lynn Garren
</pre>
115 2 Lynn Garren
** If all is good, copy the cfg scripts to SciSoft
116 2 Lynn Garren
<pre>
117 2 Lynn Garren
cd $MRB_BUILDDIR/larsoft/releaseDB
118 2 Lynn Garren
copyToSciSoft lar*
119 2 Lynn Garren
</pre>
120 2 Lynn Garren
* Now tag
121 2 Lynn Garren
** tagPatchRel <existing branch> <new master tag>
122 2 Lynn Garren
** tagPatchRel will commit ups/product_deps with an appropriate message, make the tag, and push both tag and branch to origin.
123 2 Lynn Garren
** Use "dogit status" to doublecheck.
124 2 Lynn Garren
** *IMPORTANT*:  patch release tags are never merged with the master branch
125 2 Lynn Garren
126 4 Lynn Garren
h3(count).  Official build
127 2 Lynn Garren
128 2 Lynn Garren
* build on Jenkins
129 2 Lynn Garren
* Use special patch release build jobs.
130 2 Lynn Garren
** This avoids possible conflict with normal release builds.
131 1 Lynn Garren
* use copyFromJenkins to download the tarballs and release manifests from Jenkins
132 1 Lynn Garren
* use copyToSciSoft to upload the tarballs and release manifests to SciSoft
133 1 Lynn Garren
** This step requires extra privileges.
134 5 Lynn Garren
135 5 Lynn Garren
h3(count).  Release Notes and Cross Package Tag
136 5 Lynn Garren
137 2 Lynn Garren
* Once the build is complete for ALL variants (SLF and macOS), make the cross package tag.
138 5 Lynn Garren
** We wait because sometimes a problem is not found until building and we need to move a tag.
139 2 Lynn Garren
** This step requires redmine manager persmission for larsoft
140 2 Lynn Garren
<pre>
141 2 Lynn Garren
cp-lar-tag <larsoft tag> <larsoftobj tag>
142 2 Lynn Garren
</pre>
143 2 Lynn Garren
*** It would be nice to fix cp-lar-tag so it deduces the larsoftobj tag
144 2 Lynn Garren
* Make the release notes
145 2 Lynn Garren
** make-release-notes <working_directory> <tag> <previous tag>
146 2 Lynn Garren
*** This script will create a subdirectory named tag under the working_directory
147 2 Lynn Garren
** cd into the newly created tag directory
148 2 Lynn Garren
** cat ReleaseNotes-vaa_bb_cc_dd
149 2 Lynn Garren
*** The first line of this output is the entry in the [[LArSoft_release_list|release list]]
150 2 Lynn Garren
*** The remainder of the output is used to create the release note itself.
151 1 Lynn Garren
**** copy and edit the top part if appropriate.
152 1 Lynn Garren
**** Do not edit anything under the "Change List" section.
153 1 Lynn Garren
**** It is important to use cat so that there are no unexpected line breaks.
154 5 Lynn Garren
155 5 Lynn Garren
h3(count). Upload to cvmfs
156 5 Lynn Garren
157 5 Lynn Garren
* This step requires login privileges.
158 5 Lynn Garren
* ssh cvmfslarsoft@oasiscfs.fnal.gov
159 5 Lynn Garren
* The README provides an overview of the necessary steps.
160 5 Lynn Garren
** start a transaction
161 5 Lynn Garren
** install using installBundle.sh
162 5 Lynn Garren
** publish
163 5 Lynn Garren
* installBundle.sh larsoft vaa_bb_cc_zz sNN-eY
164 5 Lynn Garren
** Note that if you call installBundle.sh with sNN-e17, it will install both e17 and c2 variants.
165 5 Lynn Garren
** The script will attempt to install the release for all supported platforms and clean up after itself.
166 5 Lynn Garren
** If some expected distributions are not available, then manifests will be left in the .working subdirectory. Check and remove them if necessary.