Difference between revisions of "Source branches"

From Second Life Wiki
Jump to navigation Jump to search
(→‎Flow of changes between branches: Linden Lab Repository Strategy)
(The SVN repo is long gone. Replaced page with #REDIRECT to article about LL's public mercurial repositories)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{CompileNav}}
#REDIRECT [[Viewer Integration and Release Processes]]
 
= Current repository structure =
{{KBnote|The current state of the repository should be temporary, so these explanations might be outdated by the time you view them. They are based on the situation as of 2009-04-25 (2010-04-01 for the [[#Snowglobe project|Snowglobe related branches]])}}
At the moment, Linden Lab's only public SVN repository is [http://svn.secondlife.com/svn/linden/ http://svn.secondlife.com/svn/'''linden/''']. (More might be added in the future, if they aren't superseded by the initiative to move things to Mercurial by then.) Some parts of this repository mirror Linden Lab's internal SVN repository structure, while others are dedicated to open source development and cooperation with external partners.
== Viewer source branches ==
=== Branches mirroring (snapshots of) Linden Lab's internal SVN ===
* [http://svn.secondlife.com/svn/linden/trunk linden/'''trunk'''] ('''"release"''' in earlier revisions) - the main branch of development.  This is often referred to as "head", "default" or "main" in other SCMs.  Linden Lab is rather conservative about what gets checked into trunk, though, preferring that development work mainly happens on branches (either a dedicated feature branch, or one of the "maintenance" branches for the small stuff, and only gets merged into trunk once QA has happened).  Developers aspire to keep "trunk" compatible with the agni (main) grid.  All branches occasionally pick up changes from trunk, and are occasionally merged back into trunk.
* [http://svn.secondlife.com/svn/linden/branches linden/'''branches'''/*]There are several major branches at all times, along with many temporary development branches:
**  linden/branches/'''maint-*''' - bug fixes and small features that don't warrant their own branch get checked into the matching '''maint-*''' branch. Changes from maintenance are periodically merged up to release  after QA has tested a build from the branch.  Many source code contributions from the community land in this branch first. There are actually several maintenance branches internally, UI/Server/Viewer/Rendering. The public ones are:
*** [http://svn.secondlife.com/svn/linden/branches/maint-viewer/ linden/branches/'''maint-viewer''']
*** [http://svn.secondlife.com/svn/linden/branches/maint-l10n-1/ linden/branches/'''maint-l10n-1''']
** '''feature branch''' a major new feature gets developed here before turning into various first looks (snapshots of this branch), or getting eventually merged into "trunk" and no longer maintained as a feature branch.
**  '''Numbered branch''' (currently [http://svn.secondlife.com/svn/linden/branches/viewer_1-23 linden/branches/'''viewer_1-23''']) - this is a branch of "trunk" where RC snapshots come from, and where final releases are checked in.  Small fixes can be checked in here if they fix regressions.
 
=== Branches for development together with open source community and/or external partners ===
Branches in the '''sandbox''' and '''projects''' areas won't be overwritten by automated exports from Linden Lab's internal SVN repository.
* [http://svn.secondlife.com/svn/linden/sandbox linden/'''sandbox'''/*] was created as an experiment when Linden Lab realized that there was no safe place for external contributors to commit, because commits would get stomped by the export scripts. Now pretty much dormant. For commit rules, see the [http://svn.secondlife.com/svn/linden/sandbox/README.txt README].
* [http://svn.secondlife.com/svn/linden/projects linden/'''projects'''/*] Later on, Linden Lab wanted to have a more serious project that was more of a shared effort that they were conducting with an external vendor in the public repository, so they created the '''projects''' area.
** [http://svn.secondlife.com/svn/linden/projects/2008/landmarks-1 linden/projects/2008/'''landmarks-1'''] The [[Landmarks and Navigation Project]]
** [http://svn.secondlife.com/svn/linden/projects/2008/pyogp_old linden/projects/2008/'''pyogp_old'''] and [http://svn.secondlife.com/svn/linden/projects/2008/pyogp '''pyogp'''] Python client to test the Open Grid Protocol. See [[Pyogp]]
** [http://svn.secondlife.com/svn/linden/projects/2009/easybuild linden/projects/2009/'''easybuild'''] and [http://svn.secondlife.com/svn/linden/projects/2009/easybuild-2 '''easybuild-2'''] Build system improvement by [http://www.kitware.com/ Kitware]. See {{jira|VWR-11114}} and [https://lists.secondlife.com/pipermail/sldev/2009-March/thread.html#13190 this mailing list thread].
 
==== Snowglobe project ====
The [[Snowglobe]] project produces an open source Second Life-compatible viewer, built jointly by the open source community and Linden Lab.
 
===== Snowglobe 1 series =====
* [http://svn.secondlife.com/svn/linden/projects/2009/http-texture linden/projects/2009/'''http-texture'''] ''previous'' home of Snowglobe, as the first release was focused on [[HTTP Texture]].
* [http://svn.secondlife.com/svn/linden/projects/2009/snowglobe linden/projects/2009/'''snowglobe'''] Contains branches of '''Snowglobe 1.x''':
** [http://svn.secondlife.com/svn/linden/projects/2009/snowglobe/trunk linden/projects/2009/snowglobe/'''trunk'''] open for commits. Will become the next 1.x release (1.4 at the time of writing, which will probably also be the last 1.x release). Most changes here will be ported to [[#Snowglobe 2 series|Snowglobe 2]].
** '''Numbered branch''' (currently [http://svn.secondlife.com/svn/linden/projects/2009/snowglobe/1.3 linden/projects/2009/snowglobe/'''1.3''']) — here, the release with the same version number as the branch name is being prepared. This branch is frozen (doesn't accept any new features) and only gets bugfixes.
 
===== Snowglobe 2 series =====
* [http://svn.secondlife.com/svn/linden/projects/2010/snowglobe linden/projects/2010/'''snowglobe'''] Contains branches of '''Snowglobe 2.x''':
** [http://svn.secondlife.com/svn/linden/projects/2010/snowglobe/trunk linden/projects/2010/snowglobe/'''trunk'''] open for commits. Will become the first <!--next--> 2.x release (2.0<!-- at the time of writing-->).
** '''Numbered branch''' (none, yet<!--currently [http://svn.secondlife.com/svn/linden/projects/2010/snowglobe/2.0 linden/projects/2010/snowglobe/'''2.0''']-->) &mdash; here, the release with the same version number as the branch name will be prepared, once we're ready for that. (If we haven't switched to [[Mercurial]] by then.)
 
== Non-Viewer branches ==
* [http://svn.secondlife.com/svn/linden/lindenlib linden/'''lindenlib'''/*] home of 3rd party libraries for which Linden Lab has become either the primary maintainer or the primary source. At the moment only '''libndofdev''' (Win/Mac, originally from [http://www.3dconnexion.com/ 3DConnexion])
** [http://svn.secondlife.com/svn/linden/lindenlib/trunk linden/'''lindenlib/trunk'''] main (and currently only) branch of libndofdev development
 
== Non-branch stuff in the repository ==
* [http://svn.secondlife.com/svn/linden/patches linden/'''patches''']
 
 
{{KBcaution|The following sections are probably out of date and should be updated by someone who knows the details of the current state.}}
 
= Flow of changes between branches =
 
{{KBtip|For the flow between Linden Lab's internal [[Mercurial]] repositories and the public Subversion branches, see [[Linden Lab Repository Strategy]]}}
 
The public [[version control repository]] provided by Linden Lab has many of the same branches that Linden Lab's internal repository has.
 
http://svn.secondlife.com/trac/linden/browser/branches
 
[[image:branches.png|500px]]
 
Linden Lab does feature development on temporary branches.  As those features are validated by the [[QA_Portal|QA group]], they are merged into the "release" branch.  Three kinds of releases are possible:
 
* Server-only - may occur with or without downtime
* Viewer-only - optional viewers
* Viewer and Server (with dependencies) - required viewer updates. This case is avoided whenever possible.
 
== Release Candidates ==
When a release is about to happen, a release candidate (RC) branch is created for work on that release (e.g. "Branch_1-13-2").  In the rare case of a client/server update with dependencies, pending changes which would break compatibility with the main grid and require downtime and new viewers for an update are merged into this release candidate branch. 
 
Following this point, only stability work is done on the branch - developers fix any new bugs above a certain priority that are found by QA. 
 
For server-side changes, the beta grid is updated frequently as the stabilization occurs. Once the code is finalized, it is deployed to the main grid.  After that, any stability work in the RC branch gets merged back into "release", and the process repeats for the next major release.  Additional patches may be made to the RC branch and deployed to the grid.
 
For viewer-side changes, once the code is deemed stable it is released as [http://blog.secondlife.com/2007/08/29/new-update-process-introducing-release-candidate-viewers/ Release Candidate] viewer. Any bug reports which are new to this version are triaged. As fixes are made, additional RC viewer builds may be made and released. Once no more bugs have passed triage, the final RC becomes the next released viewer.
 
 
The intended process is:
# developers commit changes that have passed QA into the code trunk
# at appropriate times we freeze (branch off) from the trunk to start stabilizing a version and call it an RC
# we stabilize the RC branch via iterations of internal QA, fixes, public releases, fixes; meanwhile (1) continues unblocked
# when deemed "good enough" then the RC is released.
 
 
We triage changes going into an RC. When the RC is first frozen, the bar is roughly: regression fixes, bug fix for new features, fit-and-finish on new features, internationalization/localization changes, security, performance, text-only UI changes. We try and raise the bar with each RC iteration.
 
The purpose is to get a "we think it's ready" version to the public for use on the service. Some times we're closer to being ready out of the gate than others. Apart from changes that meet the triage bar, the feature set should be frozen so that as an RC is iterated on the risk is constantly being reduced.
 
There are humans in the triage loop, and yes, we may say "you know what, that change is low risk and high impact, and we'd prefer to have it out in the RC and next release, and not wait another month for the next go-round of the cycle".
 
Basically, almost all development work happens in maintenance or feature branches. Those merge into the trunk (named "release", a source of potential confusion). Periodically an RC is branched off the trunk. So something can be marked "fixed internally" on JIRA when it's in a maintenance branch but, until it merges into the trunk it's not going to be in an RC.
 
This is best shown with a picture.  It is of course overly simplified.  The flow is left to right. This diagram *just* shows how a fix that goes in while 1.18.6 RCx is out may still not make it into 1.19.0 and is not a complete picture at all.  The point marked 'fix foo submitted' is actually the point it will often get marked as 'fixed internally' or 'fix pending', and when it starts going through internal QA.
 
[[Image:Merging.jpg|700px]]
 
There are always exceptions. Some work is done right in the RC branch to fix regressions. Some work doesn't affect production code so can go right into the trunk. But the goal is to have nothing enter the trunk that hasn't passed QA.
 
We internally track this by tagging the items with an actual Fix Version only at the point where the change has merged into the trunk - which is the soonest point you can predict what version it will be in. We do this by tracking the maintenance and feature branches as they go in and doing bulk updates. Therefore, Status = Resolved, Resolution = Fixed, Fix Version = 1.19.0 indicates that not only is it fixed but it's merged into the trunk. We'd create a Version 1.19.1 as soon as 1.19.0 is frozen (branched) so that the next fixes to merge into the trunk can be marked appropriately.
 
Ideally we would sweep through the JIRAs that have PJIRA counterparts and do the same thing. We're still trying to get tools/processes into place for this, and additional people to help. There's also the overhead that suddenly 1.19.1 appears in PJIRA before we're even ready to really start talking in detail about 1.19.0, so suddenly a gazillion questions come our way. But that's why this is fun.
 
= Maintenance =
"Maintenance" is now subdivided into four branches in order to distribute and organize maintenance responsibilities between development teams. (new as of August 2007)
 
== Maintenance Branches ==
* maint-ui
** UI specific maintenance tasks
* maint-render
** Render specific maintenance tasks
* maint-viewer
** Other viewer only maintenance tasks
** e.g. viewer crashes, audio, misc
* maintenance
** Tasks that involve server-side changes
** Tasks that affect shared viewer / server libraries
** Tasks that in any way affect messaging
 
[[Category:Compiling viewer]]

Latest revision as of 07:51, 20 February 2012