Background Updates/Implementation Strategies: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 41: Line 41:
We need a way to name the two versions living next to each other.  My proposal is to use the following format
We need a way to name the two versions living next to each other.  My proposal is to use the following format


  <hg generational index>.<hg full revision ID>
  <hg repository index>.<hg full revision ID>


("hg generational index" is the number of the changeset living in the hg database, which is seen throughout the hg UI).
("hg repository index" is the number of the changesets living in the hg database, which is seen throughout the hg UI).


The rationale for this is that we need a way to determine which one of two versions is newer, and coming up with a method for that is really tricky in a non-linear multi-repository development model, such as what we have now.  Here are a number of use cases which is satisfied by this scheme:
The rationale for this is that we need a way to determine which one of two versions is newer, and coming up with a method for that is really tricky in a non-linear multi-repository development model, such as what we have now.  Here are a number of use cases which is satisfied by this scheme:
Line 49: Line 49:
* The comparison is simple (just a numerical comparison) and doesn't rely on filesystem timestamps.
* The comparison is simple (just a numerical comparison) and doesn't rely on filesystem timestamps.
* The comparison does not rely on Firefox version numbers, which makes it work for branches which update with the same version number (such as Nightly)
* The comparison does not rely on Firefox version numbers, which makes it work for branches which update with the same version number (such as Nightly)
* We can use the hg full revision ID in the updater later to refuse to install two versions with the same generational index and the same hg full revision ID.  If the generational index are the same and the revision IDs are not, then we can artificially increment the generational index of the update to be installed by 1 so that it gets picked up later in the startup process.
* We can use the hg full revision ID in the updater later to refuse to install two versions with the same repository index and the same hg full revision ID.  If the repository index are the same and the revision IDs are not, then we can artificially increment the repository index of the update to be installed by 1 so that it gets picked up later in the startup process.
* The comparison works with our current multi-repository release model.  Under all conceivable circumstances, we can assume that if F returns the number of revisions in an hg repository, then:
* The comparison works with our current multi-repository release model.  Under all conceivable circumstances, we can assume that if F returns the number of revisions in an hg repository, then:


Line 55: Line 55:


[[User:LawrenceMandel|LawrenceMandel]] Is there a build id/timestamp? Is that a suitable identifier to use? Would this method break if FF moved off of hg?
[[User:LawrenceMandel|LawrenceMandel]] Is there a build id/timestamp? Is that a suitable identifier to use? Would this method break if FF moved off of hg?
(ehsan) There is a build ID, but using that would fail for updating across branches.  I don't really want to use timestamps since they are prone to all sorts of race conditions, and also to the correctness of the clock on our builders/users' machines.  I don't know of any other suitable identifiers.  Moving off from hg would break this unless we come up with a way to get a generational index from the repository.  I would imagine that any RCS that we would use would have to have a similar concept.  Since we only use the revision ID for uniqueness, it's treated as an opaque value so switching away from hg won't affect it.
(ehsan) There is a build ID, but using that would fail for updating across branches.  I don't really want to use timestamps since they are prone to all sorts of race conditions, and also to the correctness of the clock on our builders/users' machines.  I don't know of any other suitable identifiers.  Moving off from hg would break this unless we come up with a way to get a repository index from the repository.  I would imagine that any RCS that we would use would have to have a similar concept.  Since we only use the revision ID for uniqueness, it's treated as an opaque value so switching away from hg won't affect it.


Downsides of this approach:
Downsides of this approach:


* Updating between development branches might not work correctly.  For example, if we ever decide to move a bunch of users from the nightly update channel to the devtools update channel, the update process might fail to work because the devtools branch might have fewer chanegsets in the Mercurial repository.
* Updating between development branches might not work correctly.  For example, if we ever decide to move a bunch of users from the nightly update channel to the devtools update channel, the update process might fail to work because the devtools branch might have fewer chanegsets in the Mercurial repository.
[[User:LawrenceMandel|LawrenceMandel]] Perhaps we need to have a product specific preference included in the version. For example,  ffn.<hg generational index>.<hg full revision ID>, ffa.<hg generational index>.<hg full revision ID>,  ffb.<hg generational index>.<hg full revision ID>,  ff.<hg generational index>.<hg full revision ID>. In this way you can have different streams installed concurrently. Alternatively, if we already install different streams into different directories that approach can be expanded to support dev tools or other similar 'like' builds of FF.
[[User:LawrenceMandel|LawrenceMandel]] Perhaps we need to have a product specific preference included in the version. For example,  ffn.<hg repository index>.<hg full revision ID>, ffa.<hg repository index>.<hg full revision ID>,  ffb.<hg repository index>.<hg full revision ID>,  ff.<hg repository index>.<hg full revision ID>. In this way you can have different streams installed concurrently. Alternatively, if we already install different streams into different directories that approach can be expanded to support dev tools or other similar 'like' builds of FF.


=== Migration ===
=== Migration ===
Confirmed users
657

edits

Navigation menu