Commit Graph

57619 Commits

Author SHA1 Message Date
svcscm
5de2fd3093 Updating submodules
Summary:
GitHub commits:

16544b5dee
52d45cf6fa
5b5e17c534
2b144501d4

Reviewed By: jurajh-fb

fbshipit-source-id: 44c1328481fc67c799f75aaedda6e5af34c711cb
2020-05-06 22:25:15 -07:00
svcscm
c5a31b78be Updating submodules
Summary:
GitHub commits:

15bfa96afd
2c064a01ac
ad92ccc781
1f20df2f38
6e76746415
f2dfdbea5f
0258a144e4

Reviewed By: jurajh-fb

fbshipit-source-id: 38c0e240b567b7e21fc5b3596f496fdcadbe7ee8
2020-05-06 21:33:45 -07:00
svcscm
afe7ca726a Updating submodules
Summary:
GitHub commits:

3f841a1068
4f02b6a779
f633fb70e4
fb7081afd8
fa7b2b30d4

Reviewed By: jurajh-fb

fbshipit-source-id: 4fb1955cbf7736bb158ea8135076ab23b7bd12d9
2020-05-06 21:33:44 -07:00
svcscm
5e5b3d7e7f Updating submodules
Summary:
GitHub commits:

27b152e63e
82070c967b
15ba461f16
e8010d69ec
c1e1185b7a
e726d65cf0
56fa901615
817dd790b7
4b6e5a3727

Reviewed By: jurajh-fb

fbshipit-source-id: 5b0905b8cfa77903d5e1906c28d490470304b513
2020-05-06 17:35:08 -07:00
Jun Wu
ead30c096c phrevset: rewrite pull -r Dxxx into pull -r HASH
Summary: This matches user expectation.

Reviewed By: sfilipco

Differential Revision: D21320629

fbshipit-source-id: 0464b813c01fe31a2ca9473d5b389e563c7a2827
2020-05-06 15:29:57 -07:00
Jun Wu
495bf73f13 phrevset: implement autopull in revset layer
Summary:
Implement autopull so non-automation `hg pull -r Dxxxx`, `hg up Dxxxx` will
pull `Dxxxx` automatically.

Since we now autopull the commits, error messages are removed. The old code
actually causes issues because it will raise at `"D1234" in repo`, which is
a surprise to many code paths, including the revset autopull logic, which
uses `x in repo` to decide whether `x` is unknown.

Note `hg pull -r Dxxxx` is not using the revset layer and needs to be handled
separately. It works for hg servers right now because the server can translate
`Dxxx` to a commit hash. It probably does not work for a Mononoke server.

Reviewed By: sfilipco

Differential Revision: D21320626

fbshipit-source-id: 939abe12e3a9a8ed5ca7ed29bb4f90fb39e7674a
2020-05-06 15:29:57 -07:00
Jun Wu
c08236ccc9 phrevset: make diffid -> node translation infalliable
Summary:
Change the interface to return infallible `Optional[node]` instead of fallible
`List[rev]`.  In the next diff, we're going to use the 'node' information to
implement autopull.

Reviewed By: sfilipco

Differential Revision: D21320628

fbshipit-source-id: 6f7c070faba667cc85313cc78d6149c787ca8593
2020-05-06 15:29:56 -07:00
Jun Wu
cb3b437fe5 phrevset: improve sucessor calculation
Summary:
Currently, phrevset picks the "successor" that has the maximum revision
number. That depends on the assumption that larger revision numbers
are modified last. Howevver, that's not always true with commit cloud sync. For example, in my repo I have D21179514 modified from 63768bf43
to 684612d5d. Phabricator has 63768bf43. Local successor is 684612d5d,
but the revision number of 684612d5d is smaller than 63768bf43:

    quark@devvm1939 ~/hg/edenscm/hgext % hg log -r 'D21179514'
    changeset:   63768bf436d01982a8d42ce97160ac6d9ae2cdad  D21179514
    user:        Jun Wu <quark@fb.com>
    date:        Wed, 22 Apr 2020 09:45:50 -0700
    summary:     [hg] commitcloud: log metalog root during update references

    quark@devvm1939 ~/hg/edenscm/hgext % lhg log -r 'D21179514'
    changeset:   684612d5d606b01c224889f2b3f87aff7b93db49  D21179514  (@)
    user:        Jun Wu <quark@fb.com>
    date:        Wed, 22 Apr 2020 10:10:37 -0700
    summary:     [hg] commitcloud: log metalog root during update references

    quark@devvm1939 ~/hg/edenscm/hgext % lhg log -r 'successors(63768bf436d0198
    2a8d42ce97160ac6d9ae2cdad)' -T '{node} {rev}\n'
    684612d5d606b01c224889f2b3f87aff7b93db49 76718
    63768bf436d01982a8d42ce97160ac6d9ae2cdad 95363

Improve it by actually prefer selecting a non-obsoleted successor.

Reviewed By: sfilipco

Differential Revision: D21267552

fbshipit-source-id: d43d72a7c273c55af70bb41ad967fff0c78a452a
2020-05-06 15:29:56 -07:00
Jun Wu
e1179f695e autopull: pull names in batch
Summary: This is more efficient (if pullattempts have high chance to succeed).

Reviewed By: sfilipco

Differential Revision: D21320627

fbshipit-source-id: a2166f5a59f98c7d705c806b9d152ceb9981f3be
2020-05-06 15:29:55 -07:00
Jun Wu
e89e16d35c autopull: make autopull function declarative
Summary:
Make it so that the autopull functions just describe what to do (using the
`pullattempt` struct) instead of having the side effect directly. This will be
useful in multiple cases:
- The actual autopull logic becomes easier to implement.
- The revset autopull layer can merge `pullattempt`s to fetch things in one go.
- The `pull -r` logic can reuse the `pullattempt`s to translate what to pull
  (ex. from `D1234` to a commit hash).

This has subtle changes that multiple "remote"s are no longer properly
supported.  That is probably fine in our production use-cases but we might
want to revisit if we want to support remotes "properly".  Currently, this
greatly simplifies things due to the fact that "infinitepush" or
"infinitepushbookmark" have to be used in certain cases.

Reviewed By: sfilipco

Differential Revision: D21320633

fbshipit-source-id: e38b68abf69a34a97431685aa7ab0d2fe022fda8
2020-05-06 15:29:55 -07:00
Jun Wu
1ee6f1f91a registrar: add autopullpredicate
Summary: Add a way for extensions to register how to auto pull unknown names.

Reviewed By: sfilipco

Differential Revision: D21320630

fbshipit-source-id: d20e11cff83b8a7e15a5085b0508a3e5bef305c3
2020-05-06 15:29:55 -07:00
Jun Wu
a5c1b003a3 autopull: move to a module
Summary:
We're going to make autopull more complicated. Move it to a separate module as
it is not directly related to revset.

Reviewed By: sfilipco

Differential Revision: D21320631

fbshipit-source-id: fe60bc53ebf1c75f8bf66156805cbe2801fe6532
2020-05-06 15:29:54 -07:00
Jun Wu
a71893676d autopull: analyze unknown names before revset optimization
Summary:
The revset optimization makes unknown names harder to extract.  For example,
`(or (list "a" "b" "c"))` will be optimized to `(_list "a\0b\0c")` and it
becomes harder to extract `"a"`, `"b"`, and `"c"`.

Move the unknown name extraction logic to before the optimization step to solve
it.

Reviewed By: sfilipco

Differential Revision: D21320632

fbshipit-source-id: 3a25f1cf4aab0449be6952113d622f29b1c0b631
2020-05-06 15:29:54 -07:00
Wez Furlong
b29f7a1020 eden: fix compilation on latest vs2017
Summary:
vs2017 is not able to compile the static assertion in KeySpace.cpp.
Previously we thought that this would be resolved in a later release of vs2017
but now that is here it is clear that it hasn't been fixed.

This commit pushes the version requirement to vs2019 (see
https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd for a mapping between
product versions and compiler versions), but we cannot build with vs2019
because folly and rangev3 don't compile with vs2019, so this assertion (heh!)
has literally not been tested.

This commit also fixes up an oversight in the gating logic: the intent is that
we perform the assertion on all systems except known broken MSVC.  We were
accidentally restricting it to later versions of MSVC.

Reviewed By: simpkins

Differential Revision: D21432890

fbshipit-source-id: e11ffccc53bf8dffdf2db45ad4f3cf199b1cc70d
2020-05-06 15:05:37 -07:00
svcscm
9ef61e4a9a Updating submodules
Summary:
GitHub commits:

6af9edb3a0
43ac0956f5
f29bd8e01e

Reviewed By: jurajh-fb

fbshipit-source-id: 14f2105ec8ddd6d88c97ee452fe787356d018925
2020-05-06 13:28:53 -07:00
Jun Wu
44c8c7a9e3 transaction: write hgrc to metalog
Summary:
This allows us to understand what config is used during a transaction.
For example, is `selectivepull` enabled during a `pull`?

Reviewed By: DurhamG

Differential Revision: D21222146

fbshipit-source-id: a8c82f2b02e9657885947a706f728e28b1bfc1e2
2020-05-06 12:15:36 -07:00
svcscm
3574d0b11e Updating submodules
Summary:
GitHub commits:

0f3dc9ff8e
045694e8cd
ac2905ddaf
f16a8b5ea6
5a24bb495b
53f84470d2
f1949dd109
d4e27d5b15
4f9300c89d
a7675615c3
50d5c29346
8d8eb1f19d

Reviewed By: jurajh-fb

fbshipit-source-id: 3d6263cd910af52a01bca6dc2213bf615cfaf8be
2020-05-06 12:05:24 -07:00
Durham Goode
1fdc23ddf6 progress: invalidate engine on process fork
Summary:
We're seeing deadlocks where if the process forks (like in a update
worker) while a background python thread is holding the progress lock, it can
cause a deadlock in the forked process if the thread ever tries to access the
progress bar.

To fix it, let's invalidate the engine if the process forks.

Reviewed By: xavierd

Differential Revision: D21415152

fbshipit-source-id: 75607dd2c1ed122b3a9df68d359ba9dcdde78a77
2020-05-06 12:01:39 -07:00
svcscm
0608448c58 Updating submodules
Summary:
GitHub commits:

843b1cb701
76a9f07723
ea59d20d9c
aef5dd9e25
8b4a8682e3
6c378a0eab
95b6ef6d62
93dba83ff0
dcf917ff81
586bc1d67c
0457b02715
5a92ba8c83

Reviewed By: jurajh-fb

fbshipit-source-id: 092941470dca12a826d616ec73f8c14fd0bc0e48
2020-05-06 10:44:37 -07:00
Lukas Piatkowski
179a72ef4e mononoke: fixup licenses in mononoke
Reviewed By: krallin

Differential Revision: D21427558

fbshipit-source-id: dc46b4269836bbb70636efcea24c3ead090df84c
2020-05-06 10:00:19 -07:00
Wez Furlong
21821e2bc6 getdeps: fix builds with cached project downloads
Summary:
D21364132 accidentally broke this; we can't run the fetcher
for projects for which we pulled the build out of cache, because there
is no source to update in that case.

This commit adjusts the logic so that we write out a marker file
to indicate that we installed a build from cache and to look for
that file being present to gate the new update logic.

Reviewed By: lnicco

Differential Revision: D21419122

fbshipit-source-id: 304670848add22531d88549d66f22c40ff255140
2020-05-06 09:22:49 -07:00
Stanislau Hlebik
5e095198eb mononoke: fix scrub_get race
Summary:
There was a bug in scrub blobstore that caused failures while traversing the
fsnodes.
If all blobstores returned None, then we need to return None and not fail as we
do now. So the situation we ran into was:
1) fsnodes is not derived, all blobstore return None
2) Previously it returned the error, which later checked in
https://fburl.com/diffusion/mhhhnkxv - this check makes sure there's no entry
with the same key on the queue. However by that time fsnodes might already be
derived and someone else might insert a new entry in the blobstore and in the
queue. This would return an error to the client.

The fix here is to not fail if all blobstores returned None

Reviewed By: ahornby

Differential Revision: D21405418

fbshipit-source-id: 21fe130ce65a0087c408a5014e5b108c7ce8fe6c
2020-05-06 09:20:42 -07:00
Durham Goode
aa99e36327 configs: convert (www|www-merge)_overrides.rc
Summary: Converts (www|www-merge)_overrides.rs to our dynamic config generator

Reviewed By: quark-zju

Differential Revision: D21412128

fbshipit-source-id: d248d3b756e4f59038cb33335ba4a023fe335b2c
2020-05-06 09:03:18 -07:00
Durham Goode
939ff6c956 configs: move repo names to a enum
Summary:
A number of repo names are used quite frequently. Let's use an enum to
prevent typos and make things cleaner.

Reviewed By: quark-zju

Differential Revision: D21365036

fbshipit-source-id: 1d3d681443df181e9076f5ee87029ae61124a486
2020-05-06 09:03:17 -07:00
Lukas Piatkowski
ff2eddaffb mononoke: reverse autocargo include list to excludes
Summary: Cover as much as remining code with `Cargo.toml`s, for the rest create an exlusion list in the autocargo config.

Reviewed By: krallin

Differential Revision: D21383620

fbshipit-source-id: 64cc78a38ce0ec482966f32a2963ab4939e20eba
2020-05-06 08:43:18 -07:00
Stanislau Hlebik
864a9bc991 mononoke: remove pending_heads
Summary: The alarm was already removed in D21425313

Reviewed By: krallin

Differential Revision: D21425971

fbshipit-source-id: d043e1393e497bdf29f28d224d7e710b6beaa8f8
2020-05-06 07:55:04 -07:00
Stanislau Hlebik
d3fd4f09a2 mononoke: renamed futures to futures-old
Reviewed By: krallin

Differential Revision: D21425900

fbshipit-source-id: 121bf1d9e5527bd6f035f1f7a506ad0f75de68fc
2020-05-06 07:55:04 -07:00
Stanislau Hlebik
1b9bf79c69 mononoke: asyncify is_derived
Reviewed By: krallin

Differential Revision: D21425882

fbshipit-source-id: 9c3969da679339e13818928a0c8de06f6ae78958
2020-05-06 07:55:04 -07:00
Stanislau Hlebik
043887c13e mononoke: asyncify find_underived
Reviewed By: krallin

Differential Revision: D21425800

fbshipit-source-id: e445bb8e10fd8c41b0322cbe4de5f6fd0a4e924c
2020-05-06 07:55:03 -07:00
Lukas Piatkowski
2a1863c35d mononoke/server: make the main mononoke binary OSS buildable
Summary: Covering repo_listener and microwave plus some final touch and we have a buildable Mononoke binary.

Reviewed By: krallin

Differential Revision: D21379008

fbshipit-source-id: cca3fbb53b90ce6d2c3f3ced7717404d6b04dd51
2020-05-06 06:11:02 -07:00
Lukas Piatkowski
7033889eac mononoke/repo_client: make repo_client buildable in OSS
Summary:
There are few related changes included in this diff:
- backsyncer is made public
- stubs for SessionContext::is_quicksand and scuba_ext::ScribeClientImplementation
- mononoke/hgproto is made buildable

Reviewed By: krallin

Differential Revision: D21330608

fbshipit-source-id: bf0a3c6f930cbbab28508e680a8ed7a0f10031e5
2020-05-06 06:11:02 -07:00
svcscm
e8eb164b55 Updating submodules
Summary:
GitHub commits:

c6514eb5c2
15c99b4b6b
c1e80e6455
e79f66edfe

Reviewed By: jurajh-fb

fbshipit-source-id: 3c83129be5e50c44705a3d975e571e9110f6dc32
2020-05-06 05:46:59 -07:00
Mistral Orhan Jean-Pierre Contrastin
5fe820dd06 Expose ctime from Blobstore::get() in mononoke
Summary:
- Change get return value for `Blobstore` from `BlobstoreBytes` to `BlobstoreGetData` which include `ctime` metadata
- Update the call sites and tests broken due to this change
- Change `ScrubHandler::on_repair` to accept metadata and log ctime
- `Fileblob` and `Manifoldblob` attach the ctime metadata
- Tests for fileblob in `mononoke:blobstore-test` and integration test `test-walker-scrub-blobstore.t`
- Make cachelib based caching use `BlobstoreGetData`

Reviewed By: ahornby

Differential Revision: D21094023

fbshipit-source-id: dc597e888eac2098c0e50d06e80ee180b4f3e069
2020-05-06 00:55:07 -07:00
svcscm
3f0760427f Updating submodules
Summary:
GitHub commits:

8eb845b08d
40f530d566

Reviewed By: jurajh-fb

fbshipit-source-id: d73a0ab8a9ab28196e88b40bb31fe93bf20378ba
2020-05-05 23:36:14 -07:00
Zeyi (Rice) Fan
61f67c044a batch fetch blobs
Summary: Instead of having `HgBackingStore` fetch blobs separately, we now try to read from hgcache and fetch from `HgImporter` as batches.

Reviewed By: chadaustin

Differential Revision: D20903245

fbshipit-source-id: d8e404d6765f1bcbacbf2a39f83eab0a351a3fe0
2020-05-05 20:59:04 -07:00
Zeyi (Rice) Fan
5bf6b58928 clean up HgQueuedBackingStore
Summary: split functions up.

Reviewed By: chadaustin

Differential Revision: D20808045

fbshipit-source-id: 3160566deb763c888a0bf34557d934feccc5ae3b
2020-05-05 20:59:04 -07:00
Zeyi (Rice) Fan
cc880f9622 populate multiple requests at once from the queue
Summary: This diff makes `HgImportRequestQueue` to be able to return multiple requests in the queue at once.

Reviewed By: chadaustin

Differential Revision: D20197070

fbshipit-source-id: 8cff1780d6e56321a756d30ac0e9b9d5d319c049
2020-05-05 20:59:03 -07:00
Zeyi (Rice) Fan
beb58087c9 track request by attaching the tracker to the Future
Summary: The life of a request is only able to be finished with one of the method. So we can instead having the tracker destroyed when the future is resolved.

Reviewed By: chadaustin

Differential Revision: D20995819

fbshipit-source-id: 5dac2f762513b5d0bcacaab7d0669fc8fdb61e80
2020-05-05 20:59:03 -07:00
Zeyi (Rice) Fan
659d185b4f Split HgBackingStore::getBlob
Summary:
Readability improvements.

`HgQueuedBackingStore` will need to call these functions individually.

Reviewed By: chadaustin

Differential Revision: D20683321

fbshipit-source-id: 9a9bd766c34559048bd0971f17304090abbb2774
2020-05-05 20:59:03 -07:00
Zeyi (Rice) Fan
4b2a6b7f16 remove Mononoke usage in HgBackingStore
Reviewed By: genevievehelsel

Differential Revision: D20909616

fbshipit-source-id: 5bd8cc386dc1a5fdfaf2c4fd0cabbb18da1ed179
2020-05-05 20:59:02 -07:00
Mohan Zhang
2ef3e20e4d Run auto cargo locally
Summary: Since thirdpart depedency change on D21341319

Reviewed By: jsgf, wqfish

Differential Revision: D21417890

fbshipit-source-id: 3cc6bafa23512c7ae489513216bcafa46e7a744f
2020-05-05 20:59:02 -07:00
Chad Austin
0e86e57c2c disallow import helpers from spawning watchman instances
Summary:
During a graceful restart, while the fuse mount is not handling
requests, avoid a possible deadlock between the edenfs, hg
debugedenimporthelper, and watchman processes.

See the comment in HgImporter.cpp.

Reviewed By: fanzeyi

Differential Revision: D21342275

fbshipit-source-id: df8fb5df5d5cd1490e88b42054b34cbb2acdb692
2020-05-05 20:46:31 -07:00
Zeyi (Rice) Fan
952069397c fix get blob local
Summary: This bug got in while iterating the original Diff. It should only be returning empty when the blob does not exist locally.

Reviewed By: xavierd

Differential Revision: D21417659

fbshipit-source-id: 676e22313ab4a024af5341d8c99797fc062bd293
2020-05-05 20:21:21 -07:00
svcscm
ffc1ff373a Updating submodules
Summary:
GitHub commits:

ca3fc479ed
c21c459771
7ab262586c
be20f1c25c

Reviewed By: jurajh-fb

fbshipit-source-id: 03c4364247da35b714e50c2f0253f9bb0c63e77f
2020-05-05 20:21:21 -07:00
svcscm
377be3ddbb Updating submodules
Summary:
GitHub commits:

6ad92107a5
911311aba9
11f49c1469
ca296a862e
481d507212
354bb79e06
fb0e5fd94b
84c9b9c565

Reviewed By: jurajh-fb

fbshipit-source-id: 25f72385b08f151b4d2af9bb65d7af410842ee18
2020-05-05 19:00:09 -07:00
Durham Goode
022196d3b7 configs: convert instagram-server_overrides.rc
Summary: Converts instagram-server_overrides.rc to our dynamic config generator

Reviewed By: quark-zju

Differential Revision: D21339855

fbshipit-source-id: 1cd4709c1f239322de3ccf516c4ebef519ea41ac
2020-05-05 18:19:11 -07:00
Durham Goode
726e3f6a73 configs: convert configerator_overrides.rc
Summary: Converts configerator_overrides.rc to our dynamic config generator

Reviewed By: quark-zju

Differential Revision: D21339856

fbshipit-source-id: 84bd17d04db1a2e6070eb5e75bda668a596822d4
2020-05-05 18:19:11 -07:00
Durham Goode
97d84e3b5d configs: move hgrc.dynamic to always be in the shared repo
Summary:
Instead of trying to maintain two hgrc.dynamic's for shared repositories,
let's just always use the one in the shared repo. In the long term we may be
able to get rid of the working-copy-specific hgrc entirely.

This does remove the ability to dynamically configure individual working copies.
That could be useful in cases where we have both eden and non-eden pointed at
the same repository, but I don't think we rely on this at the moment.

Reviewed By: quark-zju

Differential Revision: D21333564

fbshipit-source-id: c1fb86af183ec6dc5d973cf45d71419bda5514fb
2020-05-05 18:19:10 -07:00
Durham Goode
c326c5fc6b configs: log dynamic config mismatches to scuba
Summary: Let's log the mismatches to scuba so we can track them down.

Reviewed By: quark-zju

Differential Revision: D21313255

fbshipit-source-id: ee79c9504a80ebe5b21849c0eae5993b65eaff28
2020-05-05 18:19:10 -07:00
Durham Goode
b9223b9db6 sampling: move ui.log sampling logic to core
Summary:
In a future diff we want to log information about configuration
mismatches. In order to do that, we need to be able to call ui.log before
extensions are setup. Let's move the ui.log sampling logic into core so it can
be called before extension setup.

Reviewed By: quark-zju

Differential Revision: D21313257

fbshipit-source-id: fe1c0f572720c17e7398f2a4fa7082ef8fb59536
2020-05-05 18:19:09 -07:00