Commit Graph

59172 Commits

Author SHA1 Message Date
svcscm
11341f2f06 Updating submodules
Summary:
GitHub commits:

17081f23b3
9c67b2d70a
a6b1b6e033
41df004efe
4962992024
210e2db6ec
e540b3ac42
dca6914b33
5f1a6ad552
a135f1d622

Reviewed By: yns88

fbshipit-source-id: b004b74076e84085837f31ce0a1b43ec7e820454
2020-07-19 00:09:44 -07:00
svcscm
d9b9748c67 Updating submodules
Summary:
GitHub commits:

b1196e99ce
fdcce5ae48
402510df73

Reviewed By: yns88

fbshipit-source-id: 30de8d5c751ea72addfe76c7d546862f43b9f5e5
2020-07-17 22:48:58 -07:00
Jun Wu
7b7ae0bd09 hgcommits: implement strip_commits for testing
Summary:
About 64 tests depend on the revlog `strip` behavior. `strip` is not used in
production client-repos.  I tried to migrate them off `strip` but that seems
too much work for now. Instead let's just implement `strip` in the HgCommits
layer to be compatible to run the tests.

Reviewed By: DurhamG

Differential Revision: D22402195

fbshipit-source-id: f68d005e04690d8765d5268c698b6c96b981eb0a
2020-07-17 22:23:05 -07:00
Jun Wu
c6cac3456a test-debugstrip: avoid revision numbers
Summary: This makes it more compatible if the strip algorithm gets changed.

Reviewed By: DurhamG

Differential Revision: D22402194

fbshipit-source-id: 0d296117c6959c0559bb33dcbe1b2de1624dc3b7
2020-07-17 22:23:05 -07:00
Jun Wu
01a6a189c6 changelog: use Rust RevlogIndex for ancestors
Reviewed By: DurhamG

Differential Revision: D22402199

fbshipit-source-id: cf8354fe41224e3e5dea90508ed7fe473f3a6b08
2020-07-17 22:23:04 -07:00
Jun Wu
e6c9e6aa42 changelog: add dageval API
Summary:
The new Rust DAG API is more verbose than the revset because it requires `dag.`
for operations. Add a helper function to remove the `dag.` part so code can be
shorter. For example, one can write:

    cl.dageval(lambda: heads(nodes) & draft

Reviewed By: DurhamG

Differential Revision: D22402196

fbshipit-source-id: a9834c7f6c138e2378b344d90f7d39e20ad821d9
2020-07-17 22:23:04 -07:00
Jun Wu
eb4c007145 changelog: use Rust RevlogIndex for partialmatch
Summary:
I dropped the special case of wdir handling. With the hope that we will handle
the virtual commits differently eventually (ex. drop special cases, insert real
commits to Rust DAG but do not flush them to disk, support multiple wdir
virtual commits, null is no longer an ancestor of every commit).

`test-listkeyspatterns.t` is changed because `0` no longer resolves to `null`.

Reviewed By: DurhamG

Differential Revision: D22368836

fbshipit-source-id: 14b9914506ef59bb69363b602d646ec89ce0d89a
2020-07-17 22:23:04 -07:00
svcscm
9d78b75eea Updating submodules
Summary:
GitHub commits:

88a7a96f67
cff628bf6f
89c96bd880
eeb59fc3d0
8c8b0bfa3a
d388496408
f142dd45d9
0eba6178ca
6149bfcea7
cc26ed10ef
050c67feb0
57748a8a8d

Reviewed By: yns88

fbshipit-source-id: 3faa33d453eb539b4ade18ebc5bab08da60eb2fc
2020-07-17 22:23:04 -07:00
svcscm
df5cb69e7d Updating submodules
Summary:
GitHub commits:

5319c4b382
a144a46dd1
2faf9025ae
e914b363f8
e0f4d8e450
491cc1ac48
c561b0676b
1cc9b0eb02
3c969ba260
0982fbf159
e4aad57259
85c730284a
0ec7242b9f
1f1ddc0a59
458f7e75a0
929dae01fe
208f895fbd

Reviewed By: yns88

fbshipit-source-id: aa0c400b8de2057e1fb7532a19b473ea904ace9b
2020-07-17 19:29:11 -07:00
Arun Kulshreshtha
6a00dd8e8a http_client: update client description
Reviewed By: quark-zju

Differential Revision: D22606295

fbshipit-source-id: e8fca2fd6b074d0991cde4a3cacb95bf0fe07877
2020-07-17 18:49:01 -07:00
Arun Kulshreshtha
cc6dd8ef03 edenapi: allow sending extra HTTP headers with each request
Summary: Allow the user to specify extra HTTP headers that should be sent with each EdenAPI request in the `edenapi.headers` config option. The field is expected to be a JSON object whose key-value pairs are used as header keys and values.

Reviewed By: quark-zju

Differential Revision: D22591870

fbshipit-source-id: ac1bb669270d667895554dcc5f7176d18736375c
2020-07-17 17:33:26 -07:00
Jun Wu
6685a3facc changelog: implement descendant using isancestor
Reviewed By: DurhamG

Differential Revision: D22368835

fbshipit-source-id: bbd7aac5f61b03c76185b055c42e160fccd58e9b
2020-07-17 17:25:54 -07:00
Jun Wu
15c824afe3 changelog: use Rust RevlogIndex for ancestor
Summary:
This can pick a different common ancestor in criss-cross case.
The test is updated to reflect that.

Reviewed By: DurhamG

Differential Revision: D22368837

fbshipit-source-id: 9f897142b3a4bacd0fc90a4a054b7806f1bde826
2020-07-17 17:25:54 -07:00
Stanislau Hlebik
9d18c46b1f remediation of S205607
fbshipit-source-id: 798decc90db4f13770e97cdce3c0df7d5421b2a3
2020-07-17 17:16:13 -07:00
Stanislau Hlebik
3665548bb0 remediation of S205607
fbshipit-source-id: 5113fe0c527595e4227ff827253b7414abbdf7ac
2020-07-17 17:16:13 -07:00
Arun Kulshreshtha
bfd46b50b0 pyedenapi: return dict from health method
Summary: Make the Python EdenAPI client's `health()` method return a dict of server metadata.

Reviewed By: DurhamG

Differential Revision: D22604932

fbshipit-source-id: 51ca60cc95a8dbd15635520b2a9bd72603643cb6
2020-07-17 16:04:32 -07:00
svcscm
35fe96760b Updating submodules
Summary:
GitHub commits:

f2dafde616
e577d04f50
d07f9f3cf0
89bd17d8f0
828624b077
3c5e062497
ce77a24d08
0bf64ce683

Reviewed By: yns88

fbshipit-source-id: fcd5eadda677326d8fcdad9f297db68777d67047
2020-07-17 14:39:40 -07:00
Qinfan Wu
bf06c5782a Import libra-crypto
Summary: Will be useful and avoid copy-pasting some code.

Differential Revision: D22592284

fbshipit-source-id: c42df645042722ea26c13d0737cb349fc2e8fbc1
2020-07-17 13:55:04 -07:00
svcscm
f65c669719 Updating submodules
Summary:
GitHub commits:

58bb0f31fb

Reviewed By: yns88

fbshipit-source-id: f235d2416742908eb6c938d79d958f3e2cd9e192
2020-07-17 13:42:11 -07:00
Jun Wu
b769de39d3 tests: 'buck run :run-tests-py3' should use Python 3 hg
Summary:
`unittestify.py` has logic to discover executables. It is hardcode as Python 2
hg for now. Change it to be aware of the Python 3 versions.

Reviewed By: DurhamG

Differential Revision: D22562875

fbshipit-source-id: 2a19ac6ee805e22fbcc2651ada5f4eaa1bc85f51
2020-07-17 12:31:04 -07:00
Jun Wu
e76eafca39 chgserver: do not save or restore io
Summary:
It's not needed as chgserver forks per request.

This avoids potential EBUSY issues:

  File "chgserver.py", line 267, in _restoreio
    os.dup2(fd, fp.fileno())
  OSError: [Errno 16] Device or resource busy

Reviewed By: DurhamG

Differential Revision: D22534976

fbshipit-source-id: 3e673a7366d1cb060670260ff0b2f5864b75a22d
2020-07-17 12:13:07 -07:00
Ailin Zhang
316698a3c6 add --mount option to eden debug processfetch
Summary: add `--mount` option to `eden debug processfetch` as users might want to know under which checkout they have run those commands.

Reviewed By: kmancini

Differential Revision: D22485225

fbshipit-source-id: df321e6c30064c17abc62584863119b362b2c296
2020-07-17 06:43:58 -07:00
Ailin Zhang
aef527dbb0 eliminate extra blank line in tabulate
Summary: Eliminate extra blank line in tabulate

Reviewed By: kmancini

Differential Revision: D22477405

fbshipit-source-id: b867bfa5c971fcac0104563e866a314416f24fb0
2020-07-17 06:43:58 -07:00
Ailin Zhang
2deb2f28eb eden debug processfetch
Summary:
This diff added a sub-command `process_fetch` to `eden debug`, which lists eden processes sorted by their fetch counts.

New argument options will be added in following diffs.

Reviewed By: fanzeyi

Differential Revision: D22456147

fbshipit-source-id: 75f94ec0ad03d59af1a5bf31c37bdf56de70241b
2020-07-17 06:43:57 -07:00
Thomas Orozco
8a244dc0de mononoke/derived_data: log perf counters to derived data Scuba
Summary:
Like it says in the title. This would be helpful to understand why a particular
derivation took a given amount of time. To avoid having other work that shares
this CoreContext resulting in biased counters, I set this up so that we start
new perf counters for derivation.

Reviewed By: farnz

Differential Revision: D22595473

fbshipit-source-id: de85d5108aabde23cf6587662f15f25aac0cd650
2020-07-17 04:32:12 -07:00
svcscm
c34f157678 Updating submodules
Summary:
GitHub commits:

e9b9c63a53

Reviewed By: yns88

fbshipit-source-id: 143416172ed487c37dbf7398a63efba98bf446bc
2020-07-17 01:37:41 -07:00
Lukasz Piatkowski
44c4ca8597 pass --allow-system-packages to getdeps.py build of Mononoke (#28)
Summary:
Using system packages speeds up the build process

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/28

Reviewed By: StanislavGlebik

Differential Revision: D22579916

Pulled By: lukaspiatkowski

fbshipit-source-id: 7315dc898143d44e2be29a1fa9c15554c5775b35
2020-07-17 00:36:06 -07:00
svcscm
8c5f781e0b Updating submodules
Summary:
GitHub commits:

35359b8d2a
9b544a5d72
bad646f4d9
0c55dac5eb

Reviewed By: yns88

fbshipit-source-id: e67869153fda593c019763c320da3f04ca518d65
2020-07-17 00:33:49 -07:00
Jun Wu
74e5bc403a bookmarks: ignore default-push remote names
Summary:
See https://fburl.com/1rft34i8 for context. Ignore the default-push names until
we have cleaned up most repos.

Reviewed By: DurhamG

Differential Revision: D22395806

fbshipit-source-id: fd60dd89d8ba82fb9b7c4d145c8c86c9b11c6e68
2020-07-16 23:15:30 -07:00
Jun Wu
10f53151f4 remotenames: normalize 'default-push' to 'default'
Summary:
We have seen cases where `default-push` remote name gets written during pull.
Teach `paths.getname` (new code path) and `remotenames.activepath` (old code
path) to optionally normalize `default-push` to `default` to avoid that.

Reviewed By: DurhamG

Differential Revision: D22395521

fbshipit-source-id: ed16dc30150fc1369f7037296cf77f7f0fc83fee
2020-07-16 23:15:30 -07:00
Arun Kulshreshtha
6f2adbf2cc edenapi: include field names in malformed config errors
Summary: Include the name of bad config fields in the error message so the user can more easily fix the problem.

Reviewed By: quark-zju

Differential Revision: D22591871

fbshipit-source-id: e23e2c71e49e0458e7ea5c13e7feac3a990ead0c
2020-07-16 21:26:37 -07:00
Qinfan Wu
50a8016efc Update libra to latest revision
Summary: Update libra to latest revision.

Reviewed By: jsgf

Differential Revision: D22574392

fbshipit-source-id: e8b937d6957a159c3dc6f1809a042e74c6aa3729
2020-07-16 21:10:44 -07:00
Arun Kulshreshtha
0b7a612c0e edenapi: use CA cert bundle specified in hg config
Summary: Update `edenapi::Builder` to use the CA certificate bundle specified in the `[auth]` section of the user's config.

Reviewed By: quark-zju

Differential Revision: D22591034

fbshipit-source-id: 3a417adbf50ef7d2c538f4a032e54a038cbd282e
2020-07-16 19:48:36 -07:00
Arun Kulshreshtha
3613e4c840 auth: allow specifying a CA certificate bundle
Summary: Allow specifying a CA certificate bundle in the `auth` section of an `hgrc`. This is useful for testing with locally-built servers using self-signed certificates.

Reviewed By: quark-zju

Differential Revision: D22591045

fbshipit-source-id: 023fe006267b0b781a1af16a7505e188c008a8c0
2020-07-16 19:48:36 -07:00
Meyer Jacobs
e3b86cf77d debug: introduce binding layer for propagating error metadata to Python
Summary:
Implements based Rust-Python binding layer for error metadata propagation.

We introduce a new type, `TaggedExceptionData`, which carries CommonMetadata and the original (without metadata) error message for a Rust Anyhow error. This class is passed to RustError and can be accessed in Python (somewhat awkwardly) via indexing:
```
except error.RustError as e:
    fault = e.args[0].fault()
    typename = e.args[0].typename()
    message = e.args[0].message()
```
As far as I can tell, due to limitations in cpython-rs, this can't be made more ergonomic without introducing a Python shim around the Rust binding layer, which could adapt the cpython-rs classes to use whatever API we'd like.

Currently, anyhow errors that are not otherwise special-cased will be converted into RustError, with both the original error message and any attached metadata printed as shown below
```
  abort: intentional error for debugging with message 'intentional_error'
  error has type name taggederror::IntentionalError and fault None
```
We can of course re-raise the error if desired to maintain the previous behavior for handling a RustError.

If we'd like other, specialized Rust Python Exception types to carry metadata (such as `IndexedLogError`), we'll need to modify them to accept a `TaggedExceptionData` like `RustError`.

Renamed the "cause an error in pure rust command" function to `debugcauserusterror`, and instead used the name `debugthrowrustexception` for a command which causes an error in rust which is converted to a Python exception across the binding layer.

Introduced a simple integration test which exercises `debugthrowrustexception`.

Added a basic handler for RustError to scmutil.py

Reviewed By: DurhamG

Differential Revision: D22517796

fbshipit-source-id: 0409489243fe739a26958aad48f608890eb93aa0
2020-07-16 19:30:00 -07:00
svcscm
8901481cb0 Updating submodules
Summary:
GitHub commits:

0faa9bf318
5b551f7cf6
99df2f4c51
eb1dd2c31b

Reviewed By: yns88

fbshipit-source-id: 5fd783da0fd3742a4733ff17959128377226605f
2020-07-16 19:30:00 -07:00
svcscm
88ff2abd81 Updating submodules
Summary:
GitHub commits:

737fad50ec
1a18702937
76e9a041ef
8c7b424325
76fc228ad5
059eccb722
9edc02c5b5
d569cd1943
e162c8e7aa
cb9f35bc5a
89a7547f50
7d3e2dbc7f

Reviewed By: yns88

fbshipit-source-id: 62277f707216b36eb406eb2454e101424e78dff3
2020-07-16 16:38:24 -07:00
Durham Goode
43489d91d4 py3: fix prompt being erased by progress
Summary:
Flushing behavior changed in Python 3 and now we need to flush the
progress bar after clearing it, since clearing it is part of suspending the
progress and we don't want any stored up redraw bytes to wipe out future writes
from the caller.

Reviewed By: quark-zju

Differential Revision: D22579013

fbshipit-source-id: f3afd560e1365696509f56b137cceababcfed794
2020-07-16 16:26:33 -07:00
svcscm
282829a49f Updating submodules
Summary:
GitHub commits:

4ec8fa55dc
09ac2c9f4f
fdad20cb85
238972c361
3c4fdab49e
c709e67f28
bb74054c47
136d9ce51d
1ac3bd97f1
ea865a3a46
987b333a0a
d5532740ae

Reviewed By: yns88

fbshipit-source-id: b265b549c43df5fa7f15d35874dc7f8d23ba069b
2020-07-16 13:39:37 -07:00
Arun Kulshreshtha
bffb24216d revisionstore: move tokio runtime into EdenApiRemoteStore
Summary: Move the `tokio::Runtime` into `EdenApiRemoteStore` so that if initialization fails, we can propagate the error instead of panicking.

Reviewed By: xavierd

Differential Revision: D22564210

fbshipit-source-id: 9db1be99f2f77c6bb0f6e9dc445d624dc5990afe
2020-07-16 13:32:19 -07:00
Arun Kulshreshtha
6849666105 edenapi_types: add metadata field to DataEntry
Summary:
Add a metadata field to `read_res` containing a `revisionstore::Metadata` struct (which contains the object size and flags). The main purpose of this is to support LFS, which is indicated via a metadata flag.

Although this change affects the `DataEntry` struct which is serialized over the wire, version skew between the client and server should not break things since the field will automatically be populated with a default value if it is missing in the serialized response, and ignored if the client was built with an earlier version of the code without this field.

In practice, version skew isn't really a concern since this isn't used in production yet.

Reviewed By: quark-zju

Differential Revision: D22544195

fbshipit-source-id: 0af5c0565c17bdd61be5d346df008c92c5854e08
2020-07-16 13:32:19 -07:00
Arun Kulshreshtha
3327e15201 edenapi: percent-encode repo names
Summary: Instead of restricting the allowed characters in a repo name, allow any UTF-8 string. The string will be percent-encoded before being used in URLs.

Reviewed By: quark-zju

Differential Revision: D22559830

fbshipit-source-id: f9caa51d263e06d424531e0947766f4fd37b035f
2020-07-16 13:32:19 -07:00
Lukasz Piatkowski
0dd3c4e4bb add Mononoke integration tests CI (#26)
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
2020-07-16 12:16:10 -07:00
Durham Goode
9d2a577ac4 merge: backout checkunknownfiles fix
Summary:
This fix was originally meant to prevent doing checkunknown files when
it was clear there was no conflict. Unfortunatley, the data doesn't appear to
show it helped, and in some cases it definitely hurt it. Let's back it out for
now until we can do more investigation.

Reviewed By: StanislavGlebik

Differential Revision: D22574000

fbshipit-source-id: aeb644ecd6da046df17e6d10418a72363c1ee532
2020-07-16 10:45:14 -07:00
Genevieve Helsel
4624d1f3af if APFS volume name exceeds 127 length, hash it to avoid failure
Summary: APFS volume names have a length limit of 128, so we need to hash mount point to make sure we do not error out. Right now what happens if we get an error, but we do still successfully mount and the volume name is just truncated. Since we errored, we don't store this information anywhere. Instead now, we will check the volume name, and if it is too long, we hash the volume name in order to mitigate the "name too long" error.

Reviewed By: wez

Differential Revision: D22327372

fbshipit-source-id: d68f90472c1d952879078d0541b341d271c17092
2020-07-16 09:17:16 -07:00
Durham Goode
905ee42654 configs: add support for hostname-based dynamicconfigs
Summary: Makes the hostname available for dynamicconfig conditions.

Reviewed By: quark-zju

Differential Revision: D22537946

fbshipit-source-id: 630ee833bb3ec00253d718b3d03bbb8b3d49afca
2020-07-16 09:07:54 -07:00
Durham Goode
76df783c93 configs: implement user sharding
Summary: Adds support for sharding based on user name.

Reviewed By: quark-zju

Differential Revision: D22537540

fbshipit-source-id: 962f9582c8947335dc9d9d29c500d8c09df69878
2020-07-16 09:07:53 -07:00
svcscm
fc12054bfb Updating submodules
Summary:
GitHub commits:

7381376eea
2a5235d3d0
1b24ada453
44f7fc160d
4073a28c54
3415e9ba74
f9e98ad2c5
8467548c0e
24b550f91c
2dc5424fb1
f86f5441ff

Reviewed By: yns88

fbshipit-source-id: 05d94226ca5e9aecb740f1a8a4b8036f19f68960
2020-07-16 09:07:53 -07:00
svcscm
8a36455e00 Updating submodules
Summary:
GitHub commits:

8b136f3730
ab31b48c30
34321c4ac5
6bc436a61e
d6f17f0eb0
f5c2897951
584b6736c8
bfa5b24db8
a054bd825c
64c4448a43
9b2ed4fb6d
32c89859ba

Reviewed By: yns88

fbshipit-source-id: 037fbd56f190070e80adaa1c68acfacc21449948
2020-07-16 07:21:21 -07:00
Lukas Piatkowski
d323203d86 Back out "fix boost macOS build with new Xcode" (#27)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/27

Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/9

Original diffs: D22417488 (ad89d50a79), D22528869 (b3c9a79f30)

Reviewed By: markbt

Differential Revision: D22571972

fbshipit-source-id: c6f013565680a757b642dd79e647207fce3351ec
2020-07-16 06:36:41 -07:00