Commit Graph

57876 Commits

Author SHA1 Message Date
Jun Wu
c2869d6ca9 remotefilelog: call setuprepo unconditionally in clone_shallow -> pull_shallow
Summary:
Before this change, pull_shallow only calls setuprepo if the remotefilelog
requirement is not in repo. With D21011401, the remotefilelog requirement
will be added by clone.py and pull_shallow can skip calling setuprepo, causing
the pull code paths to write file logs (and fail).

Change the pull_shallow to always call `setuprepo` to solve the issue.

The final fix is probably moving more remotefilelog related clone logic to core.
Right now I just did the minimal change to fix things.

Reviewed By: sfilipco

Differential Revision: D21632429

fbshipit-source-id: 17775ac0df18cda10247419b40f9c27436b22606
2020-05-18 17:52:34 -07:00
svcscm
acfa7f4291 Updating submodules
Summary:
GitHub commits:

e05a737c18
d3b7867ab4
30bff94e85

Reviewed By: wittgenst

fbshipit-source-id: 7c89711e394c8cc9ee4ee934e1bf2af7fcbb705a
2020-05-18 17:52:34 -07:00
svcscm
8cb4f39bc5 Updating submodules
Summary:
GitHub commits:

d67d568565
6472821406
10a3d74cc4
10957464df
b2ab01c578
06943d59da
218b463647

Reviewed By: wittgenst

fbshipit-source-id: af0d8f75f6ee6ac9e67812fcd6206070f74f3f49
2020-05-18 15:02:08 -07:00
Xavier Deguillard
97a90e7de9 revisionstore: add doc comment
Summary:
We didn't have a high level overview of the types and traits and their
purposes, add that.

Reviewed By: DurhamG

Differential Revision: D21599759

fbshipit-source-id: 18e8d23ed00134f9d662778eddaee4a9451f7c2c
2020-05-18 12:11:52 -07:00
svcscm
a9734869fe Updating submodules
Summary:
GitHub commits:

08763d6583
b2c842281f
474a2bde70
f732967c40
b9d65f5aa6
64c5a2a73e
49f42386a9

Reviewed By: wittgenst

fbshipit-source-id: 1cb968b6411cb414b0ce38ff6ba4a7d5bf4b28cf
2020-05-18 11:24:37 -07:00
Genevieve Helsel
c8402345af redirect PrivHelper stdin to /dev/null to fully daemonize
Summary: EdenFS doesnt daemonize correctly due to the privhelper not closing fd 0 (see http://www.faqs.org/faqs/unix-faq/programmer/faq/). This redirects stdin to /dev/null/ in order to do so.

Reviewed By: xavierd

Differential Revision: D21602545

fbshipit-source-id: 0aeb589efbf214ef22c0db039fbb6a436a71e360
2020-05-18 10:11:18 -07:00
Katie Mancini
76204197c0 fix use of service identity in scs CAT authentication
Summary:
This updates a placeholder in the authentication process for requests
in the rust thrift services to allow authentication with CATs. This change
allows for passing in a configurable server identity to be used as the
verifier identity here.

Additionally this sets the verifer identity to be "scm_service_identity"
for the mononoke scs server (the service identity for this service).

This is needed to use the mononoke scs server from corp.

Reviewed By: markbt

Differential Revision: D21560204

fbshipit-source-id: 02e41718307fddab6f0ac2101306bb7f4a59cf7e
2020-05-18 10:07:43 -07:00
Jun Wu
2aa85dc4d7 version: a Rust crate providing version information
Summary: Otherwise the version information is only available in Python.

Reviewed By: DurhamG

Differential Revision: D19803762

fbshipit-source-id: 044c5da86efc8c657d0c422a2b1947086444895e
2020-05-18 09:00:40 -07:00
Harvey Hunt
4629da9f0a mononoke: Fix potential race in blobstore write_order logging
Summary:
Currently, we have a gap between updating and subsequently reading the
value of `write_order`. If another blobstore's put operation completes before
we have called `record_put_stats` then we may have an incorrect `write_order`
value.

Whilst this is only a minor issue, let's fix it anyway. :-)

Reviewed By: krallin

Differential Revision: D21619669

fbshipit-source-id: 1b8bacbcb4c195e6765ebdfaa68425f286f88c06
2020-05-18 08:41:25 -07:00
Alex Hornby
7296456a39 mononoke: walker: use array of AtomicUsize for visit_count
Summary:
After other optimizations the CHashMap version of visit_count was showing as a hot spot.

Given the number of possible NodeTypes is small we can store the visit_count in array indexed by ordinal instead.

Reviewed By: farnz

Differential Revision: D21618518

fbshipit-source-id: 84978778034df11a9a48452adf9269db2dc17145
2020-05-18 08:17:00 -07:00
Stanislau Hlebik
54c036e8b2 mononoke: record git mapping while doing a push
Summary:
Currently we record them only during pushrebase. Let's record during push as
well.

To simplify things a little bit let's allow only a very simple push case:
1) Single bookmark.
2) All pushed commits should be reachable by this bookmark.

Reviewed By: krallin

Differential Revision: D21451337

fbshipit-source-id: bf2f1e6025ac116fb8096824b7c4c6440d073874
2020-05-18 05:41:41 -07:00
Stanislau Hlebik
108b468af3 mononoke: fix unnecessary bonsai entries when pushrebasing a merge
Summary:
This is the fix that might be hard to explain.

First, why we need `generate_additional_bonsai_file_changes()` function at all.
TL;DR is to fix pushrebasing of a diamond merge commit. Merge bonsai changeset
must have a file change entry if p1 and p2 has the same file with different
content, and when merge commit is pushrebased we need to preserve this property.
more details are in D18065013 and in the comments.

Secondly, what was wrong with generate_additional_bonsai_file_changes. While it
was technically correct (i.e. it was producing valid bonsai changeset) it had
an unexpected side-effect for non-diamond merges (e.g. repo imports). It was
adding all changed files between root and onto commit (i.e. all changed files
from commits over which it was rebased). This in turn leads to unnecessary
push failures with "conflicts" errors.

Thirdly, why it was wrong. generate_additional_bonsai_file_changes
a) finds all files changed between onto and root (see comments for more details about onto
and root),
b)then finds those that needs to be added in the pushrebase merge bonsai changeset.

The problem was in step b). It needed to check which files exists in merge
parent but instead it checked which files exists in merge commit itself.
This is because merge commit itself cannot change any of the files that were changed between root
and onto - in that case we get a pushrebase conflict. So all the files come
either from root commit or from another parents. And the entry can become
"stale" only if it existed in one of the parents and later was changed between
root and onto.

Reviewed By: krallin

Differential Revision: D21596758

fbshipit-source-id: f2bea36fcc29fc736caaa7494696a1f6dc848b9e
2020-05-18 05:31:31 -07:00
Alex Hornby
878693e1cf mononoke: walker: add MPathHash memoization to WrappedPath
Summary: Add MPathHash memoization to WrappedPath as the paths are hashed multiple times

Reviewed By: farnz

Differential Revision: D21613720

fbshipit-source-id: b850cf5ea1668b5ff75b07a0489b54f86078677a
2020-05-18 04:54:59 -07:00
Harvey Hunt
c45b4541e2 mononoke: Add with_tunables function to allow overriding tunable values
Summary:
Currently, there isn't a way to override the value of a tunable during
a unit test. This is unfortunate and may push people to creating integration
tests when unit tests would be best.

Add `with_tunables`, which allows callers to override the tunables values that
a closure accesses. Further, add an example unit test that shows the behaviour.

Thanks to krallin for suggesting this and helping with the implementation
details.

Reviewed By: krallin

Differential Revision: D21595220

fbshipit-source-id: c31da88fb4fcfd38f761960ffe8025132025e6c9
2020-05-18 04:31:40 -07:00
Stanislau Hlebik
211032d5af mononoke: log undesired file/tree fetches
Summary:
Let's add an option to log how many files and trees were fetched in a
particular repo that start with a prefix.

Reviewed By: farnz

Differential Revision: D21617347

fbshipit-source-id: a57f74eadf32781e6c024e18da252c98af21996d
2020-05-18 04:12:54 -07:00
Stanislau Hlebik
fc7b25b0a2 RFC: mononoke: add support for string tunables
Summary:
Just as for ints and bools, let's add support for strings.
A few notes:
1) we don't have AtomicString, so I decided to use ArcSwap<String>.
However to make code generation simpler (see tunables-derive) I've added a type
alias for that
2) Return type is Arc<String> to avoid unnecessary copies.Another option that we might have here is to put the whole Tunables structure inside ArcSwap, and changing `tunables()` to return Arc<MononookeTunables>
instead of &'static MononokeTunables. However that's a bigger change to make.

Reviewed By: markbt

Differential Revision: D21592390

fbshipit-source-id: 6d3cf340b13f7aef9adb2b1b99ed2bf260033285
2020-05-18 03:35:54 -07:00
Stanislau Hlebik
cc5d3fafc4 mononoke: update tunables struct
Reviewed By: markbt

Differential Revision: D21616301

fbshipit-source-id: 72ed3d77c10182738e56d876bcf7fa714e551c69
2020-05-18 03:35:53 -07:00
svcscm
fd5b027131 Updating submodules
Summary:
GitHub commits:

9b0e67ee8c

Reviewed By: zpao

fbshipit-source-id: bae83694fa49c0d32ca2861934935358d1c06e60
2020-05-18 03:35:53 -07:00
svcscm
14a432a34f Updating submodules
Summary:
GitHub commits:

0d8e13cf96

Reviewed By: zpao

fbshipit-source-id: 17d72824a48803c09f7978ebd21ba6f018923caa
2020-05-17 06:39:22 -07:00
svcscm
f103557161 Updating submodules
Summary:
GitHub commits:

81d2abd909

Reviewed By: zpao

fbshipit-source-id: 1901a6eac2f1ef70c4016c6a04c585de85bd6a5d
2020-05-16 21:24:58 -07:00
svcscm
f0503d2371 Updating submodules
Summary:
GitHub commits:

435aa6f17a
9908c44c20
085eeb2350
02a7046078
586b5278a6

Reviewed By: zpao

fbshipit-source-id: a05ce6a02eb756dfd6a5c448704d7aef23d50e2a
2020-05-15 21:10:12 -07:00
Durham Goode
49ac0401b7 discovery: go back to random sampling but include master
Summary:
An earlier change (D21394302) made discovery sampling use the most
recent commits. This ended up not being correct since if the requested sample
did not find any hits then the unknown set would not be reduced and the next
requested set would not change, resulting in an infinite loop.

The goal of the original diff was to ensure master was in the initial sample set
so we didn't have to inspect a bunch of really old commits. Let's go back to
random sampling, but manually insert master into the initial set.

In the long-term we should throw away all this code and use something similar to
discovery.fastdiscovery instead which just relies on the public heads.

Reviewed By: quark-zju

Differential Revision: D21577331

fbshipit-source-id: d738de255e292fc569eb27f250dcd3eaafaaae43
2020-05-15 19:03:29 -07:00
svcscm
2021c7ca73 Updating submodules
Summary:
GitHub commits:

8e6a6315dd
d0910a4d1b
4819eee6ac

Reviewed By: zpao

fbshipit-source-id: 8396b635b7444907e16927df06130b95052cc386
2020-05-15 18:52:23 -07:00
Adam Simpkins
145320fe96 check in some high-level design documentation for EdenFS
Summary:
This checks in some design documents based on the "EdenFS Internals"
presentation that I've given internally a few times.

Reviewed By: wez

Differential Revision: D21519530

fbshipit-source-id: 3f79d38e8ccf994b2ef303d491809a91fa5b6d95
2020-05-15 18:08:47 -07:00
svcscm
c0b0bb9797 Updating submodules
Summary:
GitHub commits:

c49a1f934e
2db01ebc47

Reviewed By: zpao

fbshipit-source-id: 9309fb61ecdbb86408b321ced8a200af5a0f5415
2020-05-15 18:05:50 -07:00
Xavier Deguillard
0634e3f690 cmake: do no allow concurrent jobs when compiling Rust
Summary:
CMake description of `JOB_POOL` is:
"A pool is a named integer property and defines the maximum number of
concurrent jobs which can be started by a rule assigned to the pool."

Not very clear by it looks like putting all the Rust jobs in it prevent CMake
from spawning concurrent jobs when these are running. This should help in
reducing the strain on the system while compiling, while not increasing
compile time.

Reviewed By: wez

Differential Revision: D21595135

fbshipit-source-id: e718c92a237274a9edbc35417644a46bdfde5617
2020-05-15 16:46:16 -07:00
svcscm
3ac615d9de Updating submodules
Summary:
GitHub commits:

ab94f6d977
4425227078
10e3eae0d4
35da1e767f

Reviewed By: zpao

fbshipit-source-id: 5ed64d41a20ce6288b5983c835e9798cc0e9d3b6
2020-05-15 13:36:15 -07:00
Xavier Deguillard
3f0dcccd42 mount: unify EdenMount::initialize
Summary:
Next step in unifying the mount path, let's make the initialize the same in
Windows and unices. The only difference is now limited to the .eden directory
which we will be able to implement once regular users can create symlinks.

For the takeover code, the #ifdef is pushed down to the actual code that does
it, this allows the rest of the code to not have to bother about Windows vs
other platforms.

Reviewed By: wez

Differential Revision: D21517478

fbshipit-source-id: d40ca2694d23031ff98e319071e610efa306008f
2020-05-15 13:14:55 -07:00
Stanislau Hlebik
6bfd2adb21 rust/thrift: add an option to stop processing requests if client disconnected
Reviewed By: farnz

Differential Revision: D20763778

fbshipit-source-id: 9963f9ec91ba9f502b4aea9411d40b43d3729388
2020-05-15 10:41:45 -07:00
Harvey Hunt
cecc0bf2dc mononoke: Add logging blobstore
Summary:
The blobstore multiplexer contains logic to log blobstore operations to
scuba, as well as updating `PerfCounters`. There are some cases where we don't use the
multiplexed blobstore, which means that we're missing this important logging.

Factor out the logging to a separate crate and implement `LogBlob`, which wraps
another blobstore and performs logging to both scuba and PerfCounters.

Reviewed By: StanislavGlebik

Differential Revision: D21573455

fbshipit-source-id: 490ffd347f1ad19effc93b93f880836467b87651
2020-05-15 10:28:31 -07:00
svcscm
ad303b48ee Updating submodules
Summary:
GitHub commits:

02fa333a56
dd4dd7b279
5d07a157a8

Reviewed By: zpao

fbshipit-source-id: 5dba0bd104b2d4e86ccc21850d852ea44277856b
2020-05-15 09:00:52 -07:00
Harvey Hunt
a26f1d21cb mononoke: Remove path from hook config
Summary:
The configerator thrift file was updated to remove a path from hook
config. However, this change wasn't synced to fbsource.

Sync the change and fix up the tests that are broken by this change.

Reviewed By: krallin

Differential Revision: D21594221

fbshipit-source-id: 7b64180914f6c6802e4d70fcb1a5d6ec36eb2eac
2020-05-15 08:10:12 -07:00
Thomas Orozco
6676a7a476 logginghelper: use repo basename as repo name
Summary:
When we don't provide a repo name, scm_telem_log will run `hg config` to try
and get the path, and fall back to using the basename of the repo directory.

However, this is a bit undesirable, because if we ran this code we already
checked the path, so the repo URL isn't going to magically materialize once `hg
config` asks for it, which means we make a completely redundant call to hg from
scm_telem_log.

By just doing this in logginghelper, we avoid this extra roundtrip.

Reviewed By: StanislavGlebik

Differential Revision: D21572027

fbshipit-source-id: 58e5ab2e3e525edef1ecde039cd968eab8d89172
2020-05-15 03:02:00 -07:00
Thomas Orozco
e96c923fba hghave: fix jq matching
Summary:
My jq has 2 spaces after "Usage:", so this fails. Let's make the matching a bit
more lenient.

Reviewed By: StanislavGlebik

Differential Revision: D21572028

fbshipit-source-id: 1948af8bbee6486df78299c3cc08209ce3ef3e12
2020-05-15 03:02:00 -07:00
Thomas Orozco
ec60105698 rage: collect debuglocks
Summary:
This feels like it might have been helpful here:
https://fb.workplace.com/groups/scm/permalink/2854695251246743/

Reviewed By: markbt

Differential Revision: D21575908

fbshipit-source-id: 0fcc74793ecfbd57d11e9d393a4bb63fe5d013ce
2020-05-15 02:57:50 -07:00
svcscm
3fa957dd70 Updating submodules
Summary:
GitHub commits:

ef4e45e6be
f3ec7dc3e9

Reviewed By: zpao

fbshipit-source-id: 629e349cbf08ae422ba6a8973c1528121a0a0dd7
2020-05-15 02:57:50 -07:00
svcscm
61724cbe22 Updating submodules
Summary:
GitHub commits:

1b4b90a028
17b31be012

Reviewed By: zpao

fbshipit-source-id: 504a9afa39116184bd7d211698b406d935116715
2020-05-14 22:53:59 -07:00
Jun Wu
d75ac1d575 sigtrace: also write tracing data
Summary: This might provide some useful insights for debugging hanging processes.

Reviewed By: kulshrax

Differential Revision: D21580307

fbshipit-source-id: 424992cdd9851bfd782a3333ed22ac1193c33fe3
2020-05-14 21:28:30 -07:00
Arun Kulshreshtha
57e92bb28d movement: allow prev/next with pending changes
Summary:
Make `prev` and `next` match the behavior of `update` and allow movement with pending changes. A new `--check` flag has been added to enforce a clean working copy (similar to `update`).

Note that these commands literally just call `update` under the hood, so this was just a matter of removing the existing dirtiness check. (The check was originally put there because `update` originally required a clean working copy by default.)

Reviewed By: quark-zju

Differential Revision: D21581805

fbshipit-source-id: 33d0ac4d36a795713054af7e8776d077fd353048
2020-05-14 21:23:27 -07:00
Arun Kulshreshtha
3f8518bf9b treemanifest: allow BFS prefetch without HTTP
Summary: Previously, we would only allow BFS prefetching when HTTP was enabled (since prior to the `designatednodes` server capability, SSH had no way of supporting BFS). That has now changed, so we should allow BFS even if HTTP is disabled.

Reviewed By: quark-zju

Differential Revision: D21581215

fbshipit-source-id: b9d5945730e2c718681004f7d5e5f319449fcf6a
2020-05-14 21:11:43 -07:00
svcscm
5bbe42d3cc Updating submodules
Summary:
GitHub commits:

0cec467ed0
0d590d5dd5
dd142643b9
2cc045b7e2
7a6adeea7c
2c01d87f58
468b087f3c
9359e9ab10
45dc2aa42e
5bbab2865d

Reviewed By: zpao

fbshipit-source-id: 287664b8e2882af79f4ed5b13747c4247446c941
2020-05-14 21:11:43 -07:00
svcscm
a10d8004d3 Updating submodules
Summary:
GitHub commits:

cc8536a799
f98f9746f3
dc8a041ea5
8cc979bafa
8b08b00eb6
b11a8b1b9a
e862b9eea8
e5aa0460ed
6c17ef772b
c31bd19341
feb04f7112
ab17ea2a8d
53ba2b88bb

Reviewed By: zpao

fbshipit-source-id: b90cabd842d77deaa5a6b8d8609dd79495b85a17
2020-05-14 19:34:53 -07:00
Wez Furlong
e19a93b09e getdeps: upgrade zstd from 1.3.8 -> 1.4.4
Summary:
I'm doing this mostly so that we can avoid using git
to fetch the sources.

Reviewed By: chadaustin

Differential Revision: D21508201

fbshipit-source-id: 54d4635d8938659bea962e90bd829d237f1ed221
2020-05-14 18:08:22 -07:00
Wez Furlong
2a0fa00ec9 getdeps: windows: avoid expanding drive letter substitutions
Summary:
We use drive letter substitutions to workaround Windows
filename length limitations.  On my personal Windows system running
python 3.8.2 realpath inside an ssh session manages to resolve to
the full filename which causes the boost build to fail.

Avoid that!

Reviewed By: chadaustin

Differential Revision: D21507851

fbshipit-source-id: 1220c1c85d2124ddc51f42cefff2ce00e10c55c9
2020-05-14 18:08:22 -07:00
svcscm
b5bab3d581 Updating submodules
Summary:
GitHub commits:

f5c3a265cc

Reviewed By: zpao

fbshipit-source-id: 6450dee2c95b8cf69f0d69356902f4cf2571d96c
2020-05-14 18:08:22 -07:00
svcscm
b35a0f849e Updating submodules
Summary:
GitHub commits:

64bad39e0d
d10385b2cf
d1d606ea75
5b7309d5fe
e5c84d203b
6e64791678
b9a2b343c4
d9c1059140
1bcde534b5
46981b8186

Reviewed By: zpao

fbshipit-source-id: 5299cef9c91612f176ff0c29d0cc3acf629d2240
2020-05-14 14:15:58 -07:00
Jun Wu
06f03628aa infinitepush: remove legacy auto pull logic
Summary: The revset autopull now covers the infintiepush autopull logic.

Reviewed By: DurhamG

Differential Revision: D21526664

fbshipit-source-id: 90cfdebc99bb69b3e45eadcbf4b0d764e0cd68c6
2020-05-14 12:47:35 -07:00
Jun Wu
b2c1d90f22 commitcloud: use dag operations to simplify 'hide' logic
Summary:
Now we have a virtual DAG that can be queried. Use that to figure out what
heads to hide and add instead of manually traversal through the graph.

Also did some tweaks to fix Python 3 compatibility and make the parent graph
style a bit more correct.

Reviewed By: markbt

Differential Revision: D21554672

fbshipit-source-id: 749d7938a8612e21c5975d9b80a275a059de022d
2020-05-14 12:03:46 -07:00
Jun Wu
4ff20f93e0 commitcloud: decouple graphlog rendering logic from getsmartlog APIs
Summary:
The `getsmartlog` APIs return a generator suitable for passing to the graphlog
rendering layer, but not suitable for doing other things such as querying the
DAG. Split that API into two APIs:

- getsmartlog -> SmartlogInfo
- makedagwalker(SmartlogInfo, Repo) -> generator suitable for graph rendering

Reviewed By: markbt

Differential Revision: D21554673

fbshipit-source-id: c709b7a41572eb3e9c9f91b74fc2bc8226bc481f
2020-05-14 12:03:45 -07:00
Jun Wu
791ec223ba commitcloud: use Rust dag abstractions for smartlog rendering
Summary:
This simplifies a lot of the code, and makes it possible to do DAG queries like
ancestors, descendants on the commit cloud graph.

Reviewed By: markbt

Differential Revision: D21554674

fbshipit-source-id: ee08cddfc162a7546d63d4bf385f2948fc799fd3
2020-05-14 12:03:45 -07:00