This is an archive of the discontinued Mercurial Phabricator instance.

infinitepush: introduce server option to route every push to bundlestore
ClosedPublic

Authored by pulkit on Mar 27 2018, 8:38 AM.

Details

Summary

This patch introduces a new config option for server
infinitepush.pushtobundlestore which if sets to True, the server will route
each incoming push to the bundlestore and store all the parts i.e. changegroups,
phases, obsmarkers in the bundlestore and won't be applied to the revlog.

This config option does not need any client side wrapping and does not need any
custom bundle2 part or stream level parameter to decide where the push should
go.

This is very useful for Mozilla CI use case where they have a central server
that recieves pushes to trigger code-reviews, trigger a test run of CI, run
static analysis etc. The server using the new config option can stash standalone
bundles to the bundlestore and server can get access to individual revisions on
demand.

A new test file which has related tests are added for the config option.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Mar 27 2018, 8:38 AM
indygreg accepted this revision.Mar 30 2018, 2:25 PM
indygreg added a subscriber: indygreg.

This looks reasonable.

Could we also please get an explicit test for hg pull -r <rev> in this server configuration? Yes, I believe that will be redundant with other tests. But it is useful to have explicit coverage for this specific server operation mode.

tests/test-infinitepush-ci.t
143

I actually think the behavior is acceptable. Having to dynamically overlay multiple bundles from the bundle store on the server feels like it will be a lot of work. For cases where the server is mainly ingesting ad-hoc commits, it is fine to have to re-push changesets.

This could get annoying if people are pushing very large changesets. But until we have a better store, I don't think there's much we can do.

This revision is now accepted and ready to land.Mar 30 2018, 2:25 PM
This revision was automatically updated to reflect the committed changes.
mharbison72 added inline comments.
tests/test-infinitepush-ci.t
79

On Windows, this command fails like so. Any thoughts on the unexpected end of stream?

--- c:/Users/Matt/projects/hg/tests/test-infinitepush-ci.t
+++ c:/Users/Matt/projects/hg/tests/test-infinitepush-ci.t.err
@@ -78,15 +78,12 @@

   $ hg unbundle .hg/scratchbranches/filebundlestore/a4/c2/a4c202c147a9c4bb91bbadb56321fc5f3950f7f2
   adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  new changesets 6cb0989601f1
-  (run 'hg update' to get a working copy)
-
-  $ hg glog
-  o  1:6cb0989601f1 added a
-  |  public
+  transaction abort!
+  rollback completed
+  abort: stream ended unexpectedly  (got 68 bytes, expected 218759168)
+  [255]
+
+  $ hg glog
   @  0:67145f466344 initialcommit
      public
pulkit added inline comments.Apr 11 2018, 4:56 AM
tests/test-infinitepush-ci.t
79

I looked at code but was unable to find any reason.
(Sorry for getting late to reply, I have phabricator emails turned off and I missed this one in mailing list.)