Commit Graph

57641 Commits

Author SHA1 Message Date
svcscm
5742cf5978 Updating submodules
Summary:
GitHub commits:

31db27b735
6c0325d0d7
18212e38a5

Reviewed By: jurajh-fb

fbshipit-source-id: c5b44da1dc64ab2cf1cc6d639973162589d281da
2020-05-07 14:51:22 -07:00
svcscm
f21759b8ea Updating submodules
Summary:
GitHub commits:

2dcfdbf1c2
678c674257
3c93c7b1f8
9c7e962518
486c3b267a
e9ba4ba348
938100e488
0ab3763c44
f16f2fb04e
57c543634c
b0cb27110b
55deb05e03

Reviewed By: jurajh-fb

fbshipit-source-id: f636391a9abb95259cb09c4a3a66c69b4b7222e2
2020-05-07 13:09:23 -07:00
Meyer Jacobs
d49ac73f4c datastore: remove HgIdDataStore ::get_delta and ::get_delta_chain
Summary:
Remove HgIdDataStore::get_delta and all implementations. Remove HgIdDataStore::get_delta_chain from trait, remove all unnecessary implentations, remove all implementations from public Rust API. Leave Python API and introduce "delta-wrapping".

MutableDataPack::get_delta_chain must remain in some form, as it necessary to implement get using a sequence of Deltas. It has been moved to a private inherent impl.

DataPack::get_delta_chain must remain in some form for the same reasons, and in fact both implenetations can probably be merged, but it is also used in repack.rs for the free function repack_datapack. There are a few ways to address this without making DataPack::get_delta_chain part of the public API. I've currently chosen to make the method pub(crate), ie visible only within the revisionstore crate. Alternatively, we could move the repack_datapack function to a method on DataPack, or use a trait in a private module, or some other technique to restrict visibility to only where necessary.

UnionDataStore::get has been modified to call get on it's sub-stores and return the first which matches the given key.

MultiplexDeltaStore has been modified to implement get similarly to UnionDataStore.

Reviewed By: xavierd

Differential Revision: D21356420

fbshipit-source-id: d04e18a0781374a138395d1c21c3687897223d15
2020-05-07 11:04:01 -07:00
svcscm
008a0fb839 Updating submodules
Summary:
GitHub commits:

692063dded
5232565ab8
2f30dbeb4e
34ea33d2e9
f72c40855a
ac3ae1df0b
253bb6846a
48032a841d
17633ddbc1
a2a311b026
8f41535116
1473f6a810

Reviewed By: jurajh-fb

fbshipit-source-id: 2675c67402bd0517eda4c46466fa6d13a2f9d295
2020-05-07 10:54:29 -07:00
Xavier Deguillard
dc0b875615 store: enable more store tests
Summary:
These 3 tests compile without issues on Windows. The RocksDB one is weird,
while it compiles with no hickups, I simply cannot run the resulting test
binary, and I'm not sure how to debug this. The local store one fails in folly.

Reviewed By: chadaustin

Differential Revision: D21393724

fbshipit-source-id: db90bf20a9d116bc8aa493703997c5e8da76eb1f
2020-05-07 10:07:33 -07:00
Xavier Deguillard
a351d8d136 model: add git tests to CMake
Summary: All the tests are passing.

Reviewed By: chadaustin

Differential Revision: D21341730

fbshipit-source-id: 90a3872b190879ec163935ff53703157028f87bc
2020-05-07 10:07:32 -07:00
Xavier Deguillard
e6ac99b269 model: add tests to CMake
Summary:
The modeFromEntryType and treeEntryTypeFromMode tests for symlinks and
executable had to be disabled as these function explicitely do not support
these. Since mode bits are a bit meaningless on Windows, this is probably OK.

Reviewed By: chadaustin

Differential Revision: D21341728

fbshipit-source-id: 86acf24d9ab67a02ecab33b7ebe82a456295fc3c
2020-05-07 10:07:32 -07:00
Xavier Deguillard
eae382e8e9 journal: add tests to CMake
Summary: All of these tests are passing on Windows with no changes.

Reviewed By: chadaustin

Differential Revision: D21341729

fbshipit-source-id: 2b4d52751e74fa953bfe5143dc0c5735de2d34cf
2020-05-07 10:07:31 -07:00
Ravindra Sunkad
7e45849a52 Update FBOSS OSS build to link with v4.12.0 of iproute2
Summary:
fboss-oss build links to hash that corresponds to tag v4.4.0 released on Jan 11 2016

```
repo_url = https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
rev = 92a0236a3cdf3438000834121b7ea8a09f1f52b1
```

The change is to update the iproute2 version to ```v4.12.0``` (July 5 2017) to match with the version used internally to Facebook

Reviewed By: shri-khare

Differential Revision: D21411714

fbshipit-source-id: fac606396e284193bb7199cf60d2601594bfa5f0
2020-05-07 09:54:57 -07:00
Xavier Deguillard
018da41a93 service: enable several service handlers
Summary:
All of these were simply NOT_IMPLEMENTED on Windows, but the code compiles
and doesn't break any existing tests. The underlying called functions might
have been implemented already, or are NOT_IMPLEMENTED, either way, this reduces
the amount of `#ifdef _WIN32`.

Reviewed By: chadaustin

Differential Revision: D21405622

fbshipit-source-id: bdc2de41d6a57e1c0b532e76eeb2c0c86180d558
2020-05-07 09:52:18 -07:00
Thomas Orozco
fb162c513d mononoke/scs_server: report per-method completion times to ODS
Summary: What it says in the title. I'd like to set up alarms on this.

Reviewed By: farnz

Differential Revision: D21450584

fbshipit-source-id: 539299407cea84c67ff14b30184e8df4282415f8
2020-05-07 09:38:43 -07:00
Mark Thomas
052e7c3877 check-code: convert to Python 3
Summary:
Update `contrib/check-code.py` to Python 3.

Mostly it was already compatible, however stricter regular expression parsing
revealed a case where one of our tests wasn't working, and as a result lots of
instances of `open(file).read()` existed that this test should have caught.

I have fixed up most of the instances in the code, although there are many
in the test suite that I have ignored for now.

Reviewed By: quark-zju

Differential Revision: D21427212

fbshipit-source-id: 7461a7c391e0ade947f779a2b476ca937fd24a8d
2020-05-07 09:07:50 -07:00
Mark Thomas
49166dbdfd format: apply latest Black formatting
Summary: Reformat using a newer version of Black.

Reviewed By: quark-zju

Differential Revision: D21426337

fbshipit-source-id: 1ac7f6e85a06feec0d41e9509eca09194f421a1d
2020-05-07 09:07:49 -07:00
Mark Thomas
8788654efd i18n: use _x to signal untranslated strings
Summary:
The latest version of Black removes unneccessary parenthesis.  Mercurial's
test-check-code currently uses extra parentheses to signal untranslated strings, so
Black's reformatting breaks this test.

Capitulate to Black by adding a new `_x` translation marker that means "untranslated".

Reviewed By: quark-zju

Differential Revision: D21426335

fbshipit-source-id: a6c26d7c6365c49530a7dee3a5f9ed71ff166835
2020-05-07 09:07:49 -07:00
Kostia Balytskyi
828b034119 unbundle: do not record cross-backend sync infinitepush bundles
Summary:
If a bundle comes from the commit cloud forward filler, we need to ignore
and not record it.

To do so, we need to start paying attention to stream-level params for the
first time.

Reviewed By: krallin

Differential Revision: D21427620

fbshipit-source-id: 9ee417cd2a5f2f5bb6ec342cd63071c6ca822475
2020-05-07 05:12:14 -07:00
Kostia Balytskyi
3f9ba38f09 unbundle: save infinitepush unbundles into reversefillerqueue
Summary:
We want to be able to record all the bundles Mononoke processes to be later
replayed by Mercurail.

Reviewed By: krallin

Differential Revision: D21427622

fbshipit-source-id: b88e10e03d07dae35369286fe31022f36a1ee5cf
2020-05-07 05:12:14 -07:00
Lukas Piatkowski
5975838cc8 mononoke/rust-shed: apply new coding style convention that separates oss-only code
Summary: To make it easier to navigate the codebase the oss-only code will be from now on stored in a separate module, similarly to how the fbcode-only code is stored.

Reviewed By: markbt

Differential Revision: D21429060

fbshipit-source-id: aa7e80961de2897dae31bd0ec83488c683633b7a
2020-05-07 04:52:16 -07:00
Thomas Orozco
b8d582aa7f mononoke/warm_bookmarks_cache: log full errors
Summary:
Something was up yesterday with the warm bookmarks cache. It started failing on
some hosts, and went out of sync for > 1 hour on some hosts. The logs reported
a lot of failures, but without any context they weren't super useful:
P130438422.

This adds a bit more logging. If this happens again, we'll be able to better
understand what happened.

Reviewed By: StanislavGlebik

Differential Revision: D21447043

fbshipit-source-id: 67a3924c4486991df5e4d38a995ff8054c145cf9
2020-05-07 03:15:50 -07:00
Kostia Balytskyi
1256d9cf45 commitcloud: add reversefillerqueue to the repo_client schemas
Summary: This is an sqlite equivalent of what exists in xdb now.

Reviewed By: krallin

Differential Revision: D21427621

fbshipit-source-id: 7024fbf7a8773c4465d2e6ee327aadeaf87cb213
2020-05-07 02:56:39 -07:00
svcscm
12e9e9b5bc Updating submodules
Summary:
GitHub commits:

e15d61adf1
77505dd784
e6b156a139
204e7819f4
224e9d9376
220a6af389
f754b8e766
f3792d9458
5a203c90db
d7e26b2441

Reviewed By: jurajh-fb

fbshipit-source-id: bde6f8ce09b85ece439488793d2f0ce006c1074b
2020-05-07 02:56:38 -07:00
svcscm
7bd7e8ff30 Updating submodules
Summary:
GitHub commits:

8727b4becd
4ced273f7b
e1a9b0d805
15cf7e676a
0b1b272b3a
dfac023550
c99d951975
7fd6d24b08
fe7150cfff
207f49c90c
5b6f511845

Reviewed By: jurajh-fb

fbshipit-source-id: d11a7d1b96b4e75ca18bded1cd779bb6b4d94299
2020-05-06 23:26:40 -07:00
Hasnain Lakhani
fa7e8e7480 Add manifest for fatal
Reviewed By: wez

Differential Revision: D21417542

fbshipit-source-id: f7f0726e84db3dc903bf11c9045a9975a3e90234
2020-05-06 22:25:15 -07:00
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