Project

General

Profile

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

Lynn Garren, 07/01/2019 01:47 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 12 Lynn Garren
** developer status for larreltools
16 22 Lynn Garren
** abiltiy to run Jenkins jobs
17 10 Lynn Garren
18 13 Lynn Garren
[[LArSoft responsiblities for patch releases]]
19 13 Lynn Garren
20 11 Lynn Garren
h2(count). Request a release
21 11 Lynn Garren
22 11 Lynn Garren
* Before starting any patch release, fill out a redmine issue requesting the release with all pertinent information.
23 10 Lynn Garren
24 10 Lynn Garren
25 2 Lynn Garren
h2(count). Tools
26 2 Lynn Garren
27 2 Lynn Garren
* Scripts used to build the patch release will be found in the larreltools product.  
28 19 Lynn Garren
* *larreltools* is not part of the standard distribution, but will be available from SciSoft and in cvmfs.
29 16 Lynn Garren
** Always use the latest release, which will be declared current.
30 20 Lynn Garren
** More [[larreltools:|information]]
31 4 Lynn Garren
32 2 Lynn Garren
h2(count). Initial setup
33 1 Lynn Garren
34 15 Lynn Garren
*This step is done once for any patch release set and will be done by the LArSoft release manager.*
35 9 Lynn Garren
36 4 Lynn Garren
h2(count). Making a patch release
37 2 Lynn Garren
38 2 Lynn Garren
* These notes presume that you do not have an existing directory
39 2 Lynn Garren
40 24 Lynn Garren
h3(count). Setup the working area
41 2 Lynn Garren
42 1 Lynn Garren
* setup the latest release of larreltools
43 24 Lynn Garren
* startPatchRel <working_dir> <experiment> <new patch tag> <larsoft branch> [<experiment branch>]
44 24 Lynn Garren
** Recognized experiment names are argoneut, dune, lariat, icarus, sbnd, and uboone.
45 2 Lynn Garren
** This script will create a directory named "tag" under the "working_dir".
46 24 Lynn Garren
** This script will clone the larsoft and larsoftobj suites using the named branch.
47 24 Lynn Garren
** The same branch name will be used when cloning the experiment code unless a second branch name is supplied.
48 2 Lynn Garren
** The directory structure will include a single source code directory with subdirectories for e17 and c2 debug and prof builds.
49 24 Lynn Garren
** Use "dogit branch" to double check that you are on the expected branch of all packages.
50 2 Lynn Garren
51 4 Lynn Garren
h3(count). Local development
52 2 Lynn Garren
53 2 Lynn Garren
* Before integrating any feature branches, make sure that the release builds as is and that the unit tests work.
54 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.
55 2 Lynn Garren
<pre>
56 2 Lynn Garren
source local*/setup
57 2 Lynn Garren
cd $MRB_BUILDDIR
58 2 Lynn Garren
mrb t -jN
59 2 Lynn Garren
</pre>
60 2 Lynn Garren
* Next make changes and integrate feature branches
61 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.
62 2 Lynn Garren
63 4 Lynn Garren
h3(count). Update the package versions
64 2 Lynn Garren
65 2 Lynn Garren
* Do this once all changes have been made.
66 2 Lynn Garren
* ONLY update the version if there is a change.
67 2 Lynn Garren
* cd to each directory separately
68 2 Lynn Garren
* git diff LARSOFT_SUITE_vaa_bb_cc[_dd]
69 2 Lynn Garren
** You are comparing against the previous patch release in this set.
70 2 Lynn Garren
** If this is the first patch release in the set, compare against the original release.
71 2 Lynn Garren
** If there are no changes, move this package out of the way.
72 2 Lynn Garren
<pre>
73 2 Lynn Garren
cd $MRB_SOURCE
74 2 Lynn Garren
mkdir ../notag
75 2 Lynn Garren
mv xxx ../notag
76 2 Lynn Garren
mrb uc
77 1 Lynn Garren
</pre>
78 1 Lynn Garren
** Move all experiment code out of the way.  (_mv ub* ../notag/_ for MicroBooNE)
79 16 Lynn Garren
80 17 Lynn Garren
* Use the *updatePatchVersion* script from larreltools.
81 17 Lynn Garren
** This script takes no arguments.
82 16 Lynn Garren
** This script will call "mrb uv" to update each patch release by one.
83 16 Lynn Garren
** If there was no previous patch release, the version will be vaa_bb_cc_01
84 2 Lynn Garren
* You must update larsoftobj/bundle/CMakeLists.txt and larsoft/releaseDB/CMakeLists.txt by hand with the new versions.
85 2 Lynn Garren
** commit and push these changes
86 2 Lynn Garren
* DO NOT commit the changes to ups/product_deps
87 2 Lynn Garren
88 2 Lynn Garren
89 4 Lynn Garren
h3(count).  Tagging the release
90 2 Lynn Garren
91 2 Lynn Garren
* Do a final build and test with just the packages you expect to tag.  
92 2 Lynn Garren
** This step will also create the necessary build cfg files.
93 2 Lynn Garren
** If there are changes in both larsoft and larsoftobj, double check for consistency.
94 2 Lynn Garren
<pre>
95 2 Lynn Garren
cd $MRB_BUILDDIR/larsoft
96 2 Lynn Garren
diff releaseDB ../larsoftobj/bundle | grep diff
97 2 Lynn Garren
diff releaseDB ../larsoftobj/bundle | grep Only
98 2 Lynn Garren
</pre>
99 2 Lynn Garren
** If all is good, copy the cfg scripts to SciSoft
100 2 Lynn Garren
<pre>
101 2 Lynn Garren
cd $MRB_BUILDDIR/larsoft/releaseDB
102 2 Lynn Garren
copyToSciSoft lar*
103 2 Lynn Garren
</pre>
104 2 Lynn Garren
* Now tag
105 2 Lynn Garren
** tagPatchRel <existing branch> <new master tag>
106 2 Lynn Garren
** tagPatchRel will commit ups/product_deps with an appropriate message, make the tag, and push both tag and branch to origin.
107 2 Lynn Garren
** Use "dogit status" to doublecheck.
108 2 Lynn Garren
** *IMPORTANT*:  patch release tags are never merged with the master branch
109 2 Lynn Garren
110 4 Lynn Garren
h3(count).  Official build
111 2 Lynn Garren
112 2 Lynn Garren
* build on Jenkins
113 2 Lynn Garren
* Use special patch release build jobs.
114 2 Lynn Garren
** This avoids possible conflict with normal release builds.
115 21 Lynn Garren
** "larpatch-slf":https://buildmaster.fnal.gov/buildmaster/view/LArSoft/job/larpatch-slf/
116 21 Lynn Garren
** "larpatch-mac":https://buildmaster.fnal.gov/buildmaster/view/LArSoft/job/larpatch-mac/
117 1 Lynn Garren
* use copyFromJenkins to download the tarballs and release manifests from Jenkins
118 1 Lynn Garren
* use copyToSciSoft to upload the tarballs and release manifests to SciSoft
119 1 Lynn Garren
** This step requires extra privileges.
120 5 Lynn Garren
121 5 Lynn Garren
h3(count).  Release Notes and Cross Package Tag
122 5 Lynn Garren
123 2 Lynn Garren
* Once the build is complete for ALL variants (SLF and macOS), make the cross package tag.
124 5 Lynn Garren
** We wait because sometimes a problem is not found until building and we need to move a tag.
125 2 Lynn Garren
** This step requires redmine manager persmission for larsoft
126 2 Lynn Garren
<pre>
127 18 Lynn Garren
cp-patch-tag <larsoft tag> <larsoftobj tag>
128 2 Lynn Garren
</pre>
129 18 Lynn Garren
*** It would be nice to fix cp-patch-tag so it deduces the larsoftobj tag
130 2 Lynn Garren
* Make the release notes
131 23 Lynn Garren
** makePatchRelNotes <working_directory> <tag> <previous tag>
132 2 Lynn Garren
*** This script will create a subdirectory named tag under the working_directory
133 2 Lynn Garren
** cd into the newly created tag directory
134 2 Lynn Garren
** cat ReleaseNotes-vaa_bb_cc_dd
135 2 Lynn Garren
*** The first line of this output is the entry in the [[LArSoft_release_list|release list]]
136 2 Lynn Garren
*** The remainder of the output is used to create the release note itself.
137 1 Lynn Garren
**** copy and edit the top part if appropriate.
138 1 Lynn Garren
**** Do not edit anything under the "Change List" section.
139 1 Lynn Garren
**** It is important to use cat so that there are no unexpected line breaks.
140 5 Lynn Garren
141 5 Lynn Garren
h3(count). Upload to cvmfs
142 5 Lynn Garren
143 5 Lynn Garren
* This step requires login privileges.
144 5 Lynn Garren
* ssh cvmfslarsoft@oasiscfs.fnal.gov
145 5 Lynn Garren
* The README provides an overview of the necessary steps.
146 5 Lynn Garren
** start a transaction
147 5 Lynn Garren
** install using installBundle.sh
148 5 Lynn Garren
** publish
149 5 Lynn Garren
* installBundle.sh larsoft vaa_bb_cc_zz sNN-eY
150 5 Lynn Garren
** Note that if you call installBundle.sh with sNN-e17, it will install both e17 and c2 variants.
151 5 Lynn Garren
** The script will attempt to install the release for all supported platforms and clean up after itself.
152 23 Lynn Garren
** *If some expected distributions are not available, then manifests will be left in the .working subdirectory. Check and remove them if necessary.*