Commit Graph

59160 Commits

Author SHA1 Message Date
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
Simon Farnsworth
ae4b55ccaf Sort test output in test-cmd-manual-scrub.t
Reviewed By: krallin

Differential Revision: D22570814

fbshipit-source-id: bd1ef5defb2c401a3a6d19c4102c8904a211289d
2020-07-16 05:48:07 -07:00
svcscm
cbc9318be3 Updating submodules
Summary:
GitHub commits:

3123138abe
8879818e0b
03144b6abb
78becc980e
b72f773975
3ce3231ae3
d60904dcc8

Reviewed By: yns88

fbshipit-source-id: 1249acfb9e2ccb28e9bb8eac74990087440ce886
2020-07-16 05:48:07 -07:00
svcscm
393dbcd380 Updating submodules
Summary:
GitHub commits:

7f1bda2562

Reviewed By: yns88

fbshipit-source-id: d8b5e832a010065a9931ec183a332b128fd2c114
2020-07-15 23:39:10 -07:00
Durham Goode
2eae6130fb py3: fix eden lfs fetching
Summary: The tests now pass

Reviewed By: xavierd

Differential Revision: D22561933

fbshipit-source-id: 7f130391de845207589b0abe52481d03915ce18f
2020-07-15 22:16:19 -07:00
Stanislau Hlebik
2a07de29df dynamicconfig: do not use perfpipe_hgerrors
Summary:
Turned out we have perfpipe_hgerrors and perfpipe_hg_errors. Having both of
them is quite confusing, so I suggest to only use perfpipe_hg_errors

We don't seem to have any alarms on these tables, so renaming should be esy

Reviewed By: quark-zju

Differential Revision: D22546855

fbshipit-source-id: a450444e8c2270603c3146f4f05072029f935f4d
2020-07-15 19:41:58 -07:00
Jun Wu
2dd3bb83d4 test-fb-hgext-fbconduit: update the test
Summary:
D22526230 (7ab2c54f08) adds extra output.
The test seems to be skipped in buck test due to the hgsql requirement.

Reviewed By: kulshrax

Differential Revision: D22555707

fbshipit-source-id: 8659de3cda517a49296c747e65bfbd0d372c031a
2020-07-15 19:00:50 -07:00
Jun Wu
3068ac02bd hgsql: fix chunksize py3 compatibility
Summary: `int / int` gives `float` on Python 3 and that can cause issues.

Reviewed By: singhsrb

Differential Revision: D22563891

fbshipit-source-id: 443245710a0d2de660019f03845bed0077d62889
2020-07-15 17:16:33 -07:00
svcscm
92c5510314 Updating submodules
Summary:
GitHub commits:

f96a9cab0d
1b79f5aed7

Reviewed By: yns88

fbshipit-source-id: 097977fea26a0ea8d32f70ed8985a6454b0fca43
2020-07-15 17:16:33 -07:00
svcscm
a19550c66c Updating submodules
Summary:
GitHub commits:

5390bfdb15
eef55493a2
ca5a069a79

Reviewed By: yns88

fbshipit-source-id: aed3495f17cb1a56e9728d889491114dd4ba399f
2020-07-15 16:06:22 -07:00
Arun Kulshreshtha
c7bffff0ff edenapi: allow all ASCII characters in repo names
Summary: We have several repos whose names contain various non-alphanumeric/underscore/hyphen characters, so we need to be more permissive about accepting repo names.

Reviewed By: quark-zju

Differential Revision: D22554846

fbshipit-source-id: e7bb030e0b8fb6aa275c119ba0aa540405b29186
2020-07-15 15:12:49 -07:00
Arun Kulshreshtha
8cc3939f35 revisionstore: do not swallow errors from EdenAPI stores
Summary:
Previously, the EdenAPI stores would not report errors returned from the remote store. The intention behind this pattern in other stores is to prevent `KeyError`s from aborting the operation since the local store might still have the key.

However, in the case of the EdenAPI store, EdenAPI will simply omit missing keys in its response rather than returning an error. Instead, any error returned by the EdenAPI store indicates a more fundamental problem (e.g., unable to reach the server, connection reset, etc) which should cause an abort and return the error.

Reviewed By: quark-zju

Differential Revision: D22544031

fbshipit-source-id: e01e8d88b75e46dcebd2eef5203e3a0edde69fc7
2020-07-15 15:07:51 -07:00
svcscm
5a4e1bff22 Updating submodules
Summary:
GitHub commits:

873fb1d94d
31ef361635
b502f5b111
f4a5b0ee76
afb6bb1df2
1c8df22836
1eca20eb12
f960548674
8b18350bb5
c2658021b2
fd40920428
0eac1e4860

Reviewed By: yns88

fbshipit-source-id: e92d2602a352cef1d1dd4f53728e1d96958bb46d
2020-07-15 13:38:31 -07:00