Closed
Bug 1484231
Opened 7 years ago
Closed 7 years ago
Write tests for unifyrepo extension
Categories
(Developer Services :: Mercurial: hg.mozilla.org, enhancement)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sheehan, Assigned: sheehan)
References
Details
Attachments
(6 files)
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
46 bytes,
text/x-phabricator-request
|
gps
:
review+
|
Details | Review |
We've had the unify repo service break twice in the last month (bug 1484181 and bug 1480034). Setting the service to notify developer-services@mozilla.org when a failure occurs alerted us to bug 1480203, which we have yet to resolve. It's time we write some tests for this functionality.
Assignee | ||
Comment 1•7 years ago
|
||
I have a few patches for this ready to go, just ironing out a race condition in the test. Should be up for review later today.
Assignee: nobody → sheehan
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
If this warning is displayed, we will always hit an abort
later in the program: "abort: repository is unrelated". We will hit
this condition while pulling in changesets from other repos, but
we may end up wasting time pulling in changesets for repos
that are relevant first. We should abort upon hitting this
condition instead.
Assignee | ||
Comment 3•7 years ago
|
||
Currently the call to `replicatesync` comes from inside the
unifyrepo extension. This means that vcsreplicator is a direct
dependency of unifyrepo and we will need to run the Docker
test suite to test this extension. Boo!
By moving the replicatesync call into the daemon, we can create
a lightweight test for the unifyrepo extension that does not
require Docker. We can also run the unifyrepo tests in our
Docker-less CI environment. A later commit will add a test
to ensure this functionality works as intended.
Assignee | ||
Comment 4•7 years ago
|
||
The path variable is set when iterating over the source repos
the first time, but it is never reset to the correct
source when iterating over the sources a second time. Therefore
whatever repo was last in the iteration during the first
loop will have the same name in the final loop.
This causes an issue in the `unifypushes` function, as we will
hit the `if lastsource == source and lastid == pushid` condition
when pushlogs between two separate repos have the same push id.
For example, this condition will be true for repo1 push 1 and
repo2 push 1, as source is the same for all repos. This is likely
the root cause of bug 1480203, further testing will be required
to know for certain.
Assignee | ||
Comment 5•7 years ago
|
||
This extension requires a pushlog to exist on every source repo
to correctly function. While we are ensuring the repos have
correct origin commits, we should also check for a pushlog.
Assignee | ||
Comment 6•7 years ago
|
||
This commit adds a basic test for unifyrepo functionality.
The test covers all available config options and a few
failure conditions (no common ancestor, pushlog required).
Assignee | ||
Comment 7•7 years ago
|
||
This commit adds a test for the unify-daemon process. The
main thing to test in this instance is that we can successfully
use the script to specify an `hg` executable, config files
and that moving the `hg replicatesync` call into the daemon
will work as intended.
Comment 8•7 years ago
|
||
Comment on attachment 9002965 [details]
unifyrepo: abort when source commit is not shared by all repos (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002965 -
Flags: review+
Comment 9•7 years ago
|
||
Comment on attachment 9002967 [details]
unifyrepo: set `path` variable correctly while iterating over source repos (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002967 -
Flags: review+
Comment 10•7 years ago
|
||
Comment on attachment 9002968 [details]
unifyrepo: verify pushlog is available before repo unification (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002968 -
Flags: review+
Updated•7 years ago
|
Attachment #9002966 -
Attachment description: unifyrepo: move `hg replicatesync` call to unify-daemon (Bug 1484231) r?gps → unifyrepo: move `hg replicatesync` call behind conditional flag (Bug 1484231) r?gps
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
Comment 11•7 years ago
|
||
Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b25f52b53220
unifyrepo: abort when source commit is not shared by all repos r=gps
Comment 12•7 years ago
|
||
Comment on attachment 9002966 [details]
unifyrepo: move `hg replicatesync` call behind conditional flag (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002966 -
Flags: review+
Comment 13•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/f8bbd15046e4
unifyrepo: move `hg replicatesync` call behind conditional flag r=gps
Comment 14•7 years ago
|
||
Comment on attachment 9002969 [details]
unifyrepo: add basic test functionality (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002969 -
Flags: review+
Comment 15•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/a0122a3f55fd
unifyrepo: set `path` variable correctly while iterating over source repos r=gps
Comment 16•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/0f67d96305df
unifyrepo: verify pushlog is available before repo unification r=gps
Comment 17•7 years ago
|
||
Comment on attachment 9002970 [details]
unifyrepo: add test for daemon process (Bug 1484231) r?gps
Gregory Szorc [:gps] has approved the revision.
Attachment #9002970 -
Flags: review+
Comment 18•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/63c717b84205
unifyrepo: add basic test functionality r=gps
Comment 19•7 years ago
|
||
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/881b1e7254a7
unifyrepo: add test for daemon process r=gps
Assignee | ||
Comment 20•7 years ago
|
||
Tests for unifyrepo have landed.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
You need to log in
before you can comment on or make changes to this bug.
Description
•