Commit Graph

64078 Commits

Author SHA1 Message Date
svcscm
0591dc947d Updating submodules
Summary:
GitHub commits:

da9d605903
a9ac1c3fe6

Reviewed By: bigfootjon

fbshipit-source-id: c8b977ee34c81e902f1fb196e89004a2f9b298be
2021-03-22 22:37:16 -07:00
Arun Kulshreshtha
9e251b0dce clidispatch: remove unused dispatch function
Reviewed By: quark-zju

Differential Revision: D27243030

fbshipit-source-id: 82fe0940658e760b96d0ce318415434003597d2e
2021-03-22 22:09:15 -07:00
Arun Kulshreshtha
c13c6cb4fd hg-http: tidy up imports and doc comment
Summary: Fix malformed module-level doc comment and rearrange import groups (based on the de facto Rust style conventions at FB).

Reviewed By: quark-zju

Differential Revision: D27243739

fbshipit-source-id: 21614d16e5fbfecd793939325ef52819db9a4cb8
2021-03-22 22:09:14 -07:00
svcscm
beae08540e Updating submodules
Summary:
GitHub commits:

18f15bf9be
4d87be598d
b801447eb8

Reviewed By: bigfootjon

fbshipit-source-id: 90a84e8e16413c297ec5f13f24ce3b1c8e6eeeba
2021-03-22 21:45:53 -07:00
Jun Wu
f269281622 help: hide private functions
Summary:
Hide private functions that might not have a stable interface guarantee in
`help`. For example, `help revset`:

Before:

    Predicates
    ==========

    The following predicates are supported:

    "_all()"
      All commits regardless of visibility

    "_destrestack(SRC)"
      restack destination for given single source
      revision

    "_localbranch"
      "_localbranch(changectx)" localbranch commits

After:

    Predicates
    ==========

    The following predicates are supported:

    "adds(pattern)"
      Changesets that add a file matching pattern.

      The pattern without explicit kind like "glob:" is expected to be
      relative to the current directory and match against a file or a
      directory.

Reviewed By: DurhamG

Differential Revision: D27130002

fbshipit-source-id: ee098489223c4033edeca2e5b6acab9475e63eb5
2021-03-22 20:48:58 -07:00
svcscm
10b9ca7853 Updating submodules
Summary:
GitHub commits:

023e454fff
c7fcc0ef05
46330b60f0
8ae2751679
6d7a5f0b7d
f522caa646
7f78584e76

Reviewed By: bigfootjon

fbshipit-source-id: 0925a6ac6a7e54417440d243e6fec20a0f2f6874
2021-03-22 20:38:47 -07:00
Meyer Jacobs
2e5bc61498 newstore: remove #[async_trait] use in new storage APIs
Summary:
Remove use of `#[async_trait]` in the new storage API, and eliminate the outer Future on the `fetch_stream` and `write_stream` methods, which was not used. The methods are now normal trait methods, which accept and return a stream.

It's possible we'll want to make these methods `async` again in the future, but until this this is more ergonomic, faster (one less layer of indirection), and avoids some of the type system limitations of `#[async_trait]`.

Reviewed By: andll

Differential Revision: D26695517

fbshipit-source-id: 2db60a3f37d594b0b9d1e1a2708532ef0ddaf585
2021-03-22 19:36:49 -07:00
Meyer Jacobs
bc28d0a94e newstore: Introduce FilterMapStore combinator
Summary:
Introduce `FilterMapStore` combinator to support cases like LFS, where values of the same type may or may not be supported by a given store implementation.

Use `FilterMapStore` in Python bindings to prevent LFS files from being accidentally written to the non-LFS indexedlog.

With this change, the new storage API should be safe to use without corrupting local storage.

Reviewed By: kulshrax

Differential Revision: D26651254

fbshipit-source-id: 629cb43d85f43117a32b577777e13ff8fb801d57
2021-03-22 19:36:49 -07:00
Meyer Jacobs
6d20cd3b1e newstore: HashMap-based in-memory ReadStore / WriteStore implementations for testing
Summary:
Introduce `HashMapStore`, a HashMap-based, generic, in-memory `ReadStore` / `WriteStore` implementation for testing purposes (and perhaps other uses in the future).

Introduce a minimal `KeyedValue` trait so that `HashMapStore` can determine the key to be associated with a written value in a generic way.

Reviewed By: kulshrax

Differential Revision: D26859235

fbshipit-source-id: 66032f072148796bde7a3a176fb2bb6707b95287
2021-03-22 19:36:48 -07:00
Meyer Jacobs
b51e7a510f newstore: introduce WriteError error enum and ReadWriteStore store trait
Summary:
Introduce `WriteError` type (similar to `FetchError` for reads) to support strongly-typed write errors. Eventually we'll probably want this type to carry the value that we tried to write (to allow write fallbacks, retries, etc) and perhaps add more enum variants (rejects, unavailable, etc).

Introduce `ReadWriteStore` trait for stores that support both reading and writing. This trait is automatically implemented for types which implement `ReadStore` and `WriteStore` with the same key and value types. This trait is intended to be used via the `BoxedRWStore` trait object. This type will be used in the Python bindings when `FallbackCache` is extended to implement `WriteStore` (in a future change).

Reviewed By: kulshrax

Differential Revision: D26646393

fbshipit-source-id: 96058cf1e826fdb6076a4162389829b3fe053686
2021-03-22 19:36:48 -07:00
Meyer Jacobs
c4dd06e57d newstore: python bindings for constructing newstore objects
Summary:
Introduce newfilestore class in pyrevisionstore, which constructs a newfilestore (BoxedReadStore for files) and a corresponding `ContentStore` which share the underlying IndexedLog object and EdenApi client.

Modify remotefilelog to construct ContentStore via this new class.

Currently, no methods are provided for the newfilestore - it is meant to be passed back into Rust code, where you may call it's Rust methods as shown in the `test_newstore` method (which will be removed in the future).

Currently the `util` module is made public for access from pyrevisionstore. In the future, this will be replaced in favor of a `NewFileStoreBuilder` which handles these concerns internally.

Reviewed By: DurhamG

Differential Revision: D26526331

fbshipit-source-id: c0f439fbee4c303db4a82171c866a3f3a5fc2324
2021-03-22 19:36:48 -07:00
Meyer Jacobs
c2366a0991 newstore: refactor FallbackStore to FallbackCache and Fallback
Summary:
Split `FallbackStore` (which supports writing fallback fetches) into `FallbackCache` (which behaves the same) and `Fallback` (which doesn't support writing fallback fetches). This eliminates the `From<>` bound on `Fallback` which is nonsensical in some cases where we don't want writing.

Replace `write_store` and `write` fields with a single `Option<>` `write_store` in `FallbackCache`, which cleans up the code a bit.

Separate the "fallback value type", "preferred value type", "write value type", and "output value type" separately control the output value type independent of the preferred store.

Reviewed By: kulshrax

Differential Revision: D26526149

fbshipit-source-id: aa9f25f5efb8a9ddab03a7d86a7a007f24d156ce
2021-03-22 19:36:47 -07:00
Xavier Deguillard
5a150e125a nfs: make XdrTrait<T>::serializedSize non constexpr
Summary:
While clang has no issue compiling this code, gcc appears to choke on it,
failing to compile. This is unfortunate as this means we need to hardcode the
size of the serialized datastructure and validate it with a test.

Reviewed By: fanzeyi

Differential Revision: D27243075

fbshipit-source-id: 5cd59921bbd5d5be4dfb22789942eb022dac5bbe
2021-03-22 19:27:38 -07:00
Stefan Filip
3094096af7 segmented_changelog: fix OverlayIdMap::get_last_entry
Summary:
The problem appears when we have shared idmap moving ahead of the memory idmap
before we ever write to the memory idmap. In that case we would incorrectly
fetch last shared from the shared idmap. When that shared last entry is larger
than the cutoff we would try to assign ids starting from the shared entry. When
updating the IdDag it would assume that it has to insert all ids above the
cutoff but it would fail to resolve all ids exactly above the cutoff.

For example, MemIdMap is empty, cutoff is 5, shared idmap last entry is 7. We
asign 8-10 then the IdDag tries to search for 5-10 and fails to resolve 5.

This function was not updated after adding cutoff to OverlayIdMap in an earlier
diff.

Reviewed By: quark-zju

Differential Revision: D27248367

fbshipit-source-id: 97fc1efe8cdfb446c4571196dcef7c2db9a43330
2021-03-22 18:54:23 -07:00
svcscm
55cc9bf41d Updating submodules
Summary:
GitHub commits:

810dd92300

Reviewed By: bigfootjon

fbshipit-source-id: 46fe0fe2797e97ea24e08cef3c1541abc9bef9a8
2021-03-22 16:39:45 -07:00
Stanislau Hlebik
78c1530354 mononoke: add a tunable to limit the number of commits in a push
Summary:
While Mononoke should support pushing large commits, it's not clear if we need
(or want) to support pushing a lot of commits. At the very least pushing lots of commits at the same
time can create problems with derivation, but there could be more places that might break.
Besides there's usually an easy way to work around that i.e. sqush commits or push in small batches.
If we ever need to import a lot of it we use tools like blobimport/repo_import,
so blocking pushing of lots of commits should be fine.

Reviewed By: farnz

Differential Revision: D27237798

fbshipit-source-id: 435e61110f145b06a177d6e492905fccd38d83da
2021-03-22 15:41:06 -07:00
svcscm
ff1332f773 Updating submodules
Summary:
GitHub commits:

fa8de2523a
0d800dadea

Reviewed By: bigfootjon

fbshipit-source-id: 822fac89d79829738b86dbc41a82035c9656b928
2021-03-22 15:41:06 -07:00
svcscm
87b565dc0e Updating submodules
Summary:
GitHub commits:

1021acb1de
f2d27cf4d6
4e3e01ef35
d6052d381e
f3abcb8b02

Reviewed By: bigfootjon

fbshipit-source-id: 14f4d8e5508f086c959eb5ae46648c5b8ed315d8
2021-03-22 14:40:45 -07:00
Arun Kulshreshtha
b06906d542 io: regenerate Cargo.toml
Summary: Ran autocargo on `eden/scm/lib`.

Reviewed By: quark-zju

Differential Revision: D27241613

fbshipit-source-id: 5dafc97fc104643d67368a05ced36f91ca582241
2021-03-22 14:09:45 -07:00
svcscm
f55b440d3f Updating submodules
Summary:
GitHub commits:

e6a01707cf
19f5ea0ca6
b8496fb300

Reviewed By: bigfootjon

fbshipit-source-id: 801ecf93dc02b08ff21add51546960427e4b076d
2021-03-22 12:04:09 -07:00
Arun Kulshreshtha
31d7561887 edenapi: add option to log requests
Summary:
Add an `edenapi.logdir` config option, which, when set, will cause the EdenAPI client to write a JSON version of every request it sends to the specified directory. This is intended for use when reproducing user issues (so that the developer can inspect and replay the requests that were sent).

The JSON request files can be directly given to the `edenapi_cli` or converted to CBOR using the `make_req` tool for manual testing with `curl`.

The approach right now is a bit simplistic, in that we just write a JSON file whenever the EdenAPI client makes a request. I'm open to suggestions on how to improve this. (For example, if there were a way for us to always have a record of the last N requests, that would be helpful for debugging user issues.)

Reviewed By: DurhamG

Differential Revision: D27145093

fbshipit-source-id: 3834c2052b0c5efa05d1d209962953b29f545a3f
2021-03-22 11:56:53 -07:00
Alex Hornby
9fce86450a fix rust warnings
Summary: noticed these in passing while working on previous diff

Reviewed By: mitrandir77

Differential Revision: D27227682

fbshipit-source-id: e7858c81951b780722b0836ecf6ee72aeb1ffa09
2021-03-22 11:47:55 -07:00
Jun Wu
e7ffe860c3 test-convert-git: fix test with latest git
Summary:
The latest git prints extra hints:

       $ git init repo
    +  hint: Using 'master' as the name for the initial branch. This default branch name
    +  hint: is subject to change. To configure the initial branch name to use in all
    +  hint: of your new repositories, which will suppress this warning, call:
    +  hint:
    +  hint: 	git config --global init.defaultBranch <name>
    +  hint:
    +  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
    +  hint: 'development'. The just-created branch can be renamed via this command:
    +  hint:
    +  hint: 	git branch -m <name>
       Initialized empty Git repository in $TESTTMP/repo/.git/

Silent it to make the test pass.

Reviewed By: akushner

Differential Revision: D27235547

fbshipit-source-id: 6f7c8da3ac1e01ee9f57730e1586fa2053f9ca98
2021-03-22 10:49:09 -07:00
svcscm
cb2d853c75 Updating submodules
Summary:
GitHub commits:

e9168b4f85
254a127c7f

Reviewed By: bigfootjon

fbshipit-source-id: 2933abd1379650a379e0ed8f89a24de13b702416
2021-03-22 10:18:29 -07:00
Jan Mazur
24d2aa1442 bump region2region QPS
Summary:
We need to bump SCS counters expressing Mononoke's QPS. They will look something like:
`requests:mononoke:oregon:carolina` for requests coming from proxygen in prn and mononoke in frc.

CSLB expects regions' full names.

We're getting src region from proxygen as a header.

Reviewed By: krallin

Differential Revision: D27082868

fbshipit-source-id: 12accb8a9df5cf6a80c2c281d2f61ac1e68176d1
2021-03-22 10:12:43 -07:00
svcscm
57acf98236 Updating submodules
Summary:
GitHub commits:

1687a0fd59

Reviewed By: jurajh-fb

fbshipit-source-id: a362a049e51a819986bdf685a1c1f78ed6815f77
2021-03-22 07:29:25 -07:00
Mark Juggurnauth-Thomas
46e3a31d10 repo_derived_data: add new repo attribute to encapsulate derived data
Summary:
Add `repo_derived_data`.  This is a new struct that encapsulates derived data
configuration and lease operations, and will be used in the facet-based
construction of repositories.

Reviewed By: ahornby

Differential Revision: D27169431

fbshipit-source-id: dee7c032deb93db8934736c111ba7238a6aaf935
2021-03-22 07:26:48 -07:00
Mark Juggurnauth-Thomas
3d6160f216 repo_identity: add new repo attribute to encapsulate identity
Summary:
Add `repo_identity`.  This is a new struct that encapsulates repository
identity and will be used in the facet-based construction of repositories.

Reviewed By: ahornby

Differential Revision: D27169445

fbshipit-source-id: 02a435bba54a633190c6d2e4316e86726aecfdf0
2021-03-22 07:26:48 -07:00
Mark Juggurnauth-Thomas
db324150a1 blobrepo: make attributes real members again
Summary:
In preparation for making `BlobRepo` buildable by facet factories, restore
`BlobRepo` members that had been converted to `TypeMap` attributes back into
real members.

This re-introduces some dependencies that were previously removed, but this
will be cleaned up when crates no longer have to depend on BlobRepo directly,
just the traits they are interested in.

Reviewed By: ahornby

Differential Revision: D27169422

fbshipit-source-id: 14354e6d984dfdd2be5c169f527e5f998f00db1e
2021-03-22 07:26:47 -07:00
Mark Juggurnauth-Thomas
c83baeb00d segmented_changelog: split trait to separate crate
Summary:
Resolve a circular dependency whereby `BlobRepo` needs to depend on
`Arc<dyn SegmentedChangelog>`, but the segmented changelog implementation
depends on `BlobRepo`, by moving the trait definition to its own crate.

Reviewed By: sfilipco

Differential Revision: D27169423

fbshipit-source-id: 5bf7c632607dc8baba40d7a9d65e96e265d58496
2021-03-22 07:26:47 -07:00
Liubov Dmitrieva
77a1beb917 improve output of hg cloud status command for a renamed current workspace
Summary:
a workspace could be renamed from a different machine

educate users that they need to switch to a valid workspace

Reviewed By: markbt

Differential Revision: D27155544

fbshipit-source-id: eed066f2f3e6ebf99732499fdb355f8aebb4c1df
2021-03-22 07:03:17 -07:00
Liubov Dmitrieva
029a5b5d5a improve output of hg cloud list command for a renamed current workspace
Summary:
this could happen if it has been removed from a different machine

In this case, we should educate the users about the '--force' option

Reviewed By: markbt

Differential Revision: D27155423

fbshipit-source-id: 41cc3ac769dfd4145031fef687e8069d0ef8f4c9
2021-03-22 07:03:17 -07:00
Liubov Dmitrieva
072dcd06a2 provide better ux for switching workspace if the current workspace has been renamed
Summary:
provide better ux for switching workspace if the current has been renamed from another machine

sometimes users rename a workspace but it's unclear for them how to switch other machines to the new one

we should educate them about '--force' option

Reviewed By: markbt

Differential Revision: D27117194

fbshipit-source-id: faef1cf9ce64f054f715ef3683a133d3088ddc72
2021-03-22 07:03:16 -07:00
svcscm
8669a10663 Updating submodules
Summary:
GitHub commits:

cc13f6cff5
edc68a125b

Reviewed By: jurajh-fb

fbshipit-source-id: 0749bfe35dfddd7212b8a8b9c87397e863a43743
2021-03-22 06:51:09 -07:00
Alex Hornby
c4c0ec57ee getdepsbuild: update to python3
Summary:
We've been seeing flaky test output due to python2 and python3 stdout being different

Bring getdeps builds unambiguously onto python3.

Reviewed By: mitrandir77

Differential Revision: D27190200

fbshipit-source-id: e53327fc3293a0ccdf88d8a199b66eddb4b9b8e4
2021-03-22 05:26:47 -07:00
Alex Hornby
567ab8ccd3 setup3: remove its remaining python2 parts
Summary: There were a few remaining python2 parts to remove and the error case from hgcommand.run() had wrong encoding

Reviewed By: mitrandir77

Differential Revision: D27194046

fbshipit-source-id: 8c154204991e5a587f70ae4b18c73c4f005880ab
2021-03-22 05:26:47 -07:00
svcscm
8feafcb4cb Updating submodules
Summary:
GitHub commits:

931eb57660
99751d4546

Reviewed By: jurajh-fb

fbshipit-source-id: dff91e1241b9b1d05a4430f82e96a7c0868e4082
2021-03-22 04:00:07 -07:00
Jan Mazur
e8444aadb7 add top-level-tier command line argument
Summary:
Before I use a new command line argument I need to add it first.
This one will be set to the top level smc tier which is mononoke, mononoke.experimental, etc.
It will be used to bump SCS counters consumed by CSLB.

I don't want this to be optional because I don't want people to accidentally turn off publishing SCS counters representing QPS. On the other hand I don't want people who run it locally to pollute prod counters (in the script that sets this up locally its set to some dommy tier).

Reviewed By: krallin

Differential Revision: D27190020

fbshipit-source-id: 472011f0584012b036efdd015565cda3b3c029e9
2021-03-22 03:13:54 -07:00
Emma Bruce
e12e245197 Allow re-enabling feature Prefetch Profiles
Summary: For the prefetch-profile feature, added a matching enable option to go with the existing disable option. Enable temporarily enables the prefetch-profile feature for cases where a user has already used disable.

Reviewed By: kmancini

Differential Revision: D27191711

fbshipit-source-id: cf9cb7d4054e9fcee66bdb5f205562ec79c2757e
2021-03-22 02:50:32 -07:00
svcscm
9798a249d6 Updating submodules
Summary:
GitHub commits:

1e4f54841d
9c2a117967
9312386414
5369c70c14
99f3034961

Reviewed By: jurajh-fb

fbshipit-source-id: d979a88c10291dd11baf742648534fe19ce5ea03
2021-03-22 02:50:32 -07:00
svcscm
7622506704 Updating submodules
Summary:
GitHub commits:

82fce98f1e

Reviewed By: jurajh-fb

fbshipit-source-id: d091894ae4c9119c2f8630980bc2ff6c5bf2993a
2021-03-21 10:57:27 -07:00
svcscm
a35c1fac2d Updating submodules
Summary:
GitHub commits:

710502cc0e

Reviewed By: jurajh-fb

fbshipit-source-id: 4df8b666921192053fba6da880e587dd066c8f3e
2021-03-21 10:57:27 -07:00
svcscm
060da529c8 Updating submodules
Summary:
GitHub commits:

c71193b9ff

Reviewed By: jurajh-fb

fbshipit-source-id: f5caf1accdbc2b1dbccd04fa469ad26326b934c5
2021-03-20 19:23:45 -07:00
svcscm
b54b92ce16 Updating submodules
Summary:
GitHub commits:

ac8760958a

Reviewed By: jurajh-fb

fbshipit-source-id: 8edbb2a699ebdba6fb49db9aff13d0e8f8af21cc
2021-03-19 18:54:13 -07:00
svcscm
040dc41846 Updating submodules
Summary:
GitHub commits:

3f2922955c

Reviewed By: jurajh-fb

fbshipit-source-id: 0a94f434c8645fc1022592ad90f42e8fd4ceaf8b
2021-03-19 18:54:13 -07:00
svcscm
0c59e901f6 Updating submodules
Summary:
GitHub commits:

cba4b506b3
89cfecc639
bb69631f62
03a0e2789d
a8155a02ca

Reviewed By: jurajh-fb

fbshipit-source-id: c04c14220b61b7b8721a49b1ac0d394dbc5e704b
2021-03-19 11:37:00 -07:00
Xavier Deguillard
a9a1b73418 fuse: allow Apple xattr
Summary:
When copying files from Finder to EdenFS, Finder appears to be issuing a couple
of getxattr calls to EdenFS, however having these being denied by osxfuse
causes the copy to fail, resulting in a subpar experience.

Reviewed By: fanzeyi

Differential Revision: D27137328

fbshipit-source-id: 66bcc2e316d832385da05f0768da9f82ab36a374
2021-03-19 10:23:16 -07:00
svcscm
e2f3a5a040 Updating submodules
Summary:
GitHub commits:

b9813d6446
cc95898a97
6659d8a280
cd4ffa0b0c
2d061aa464

Reviewed By: jurajh-fb

fbshipit-source-id: fb7440f58921c5dc67c8ed0c3b957f6a574ad259
2021-03-19 10:12:41 -07:00
Xavier Deguillard
0fb5fa7846 thrift: remove getManifestEntry
Summary:
This is unused, and the Thrift file mentions that it should be fine to remove
in July 2020. It's now March 2021, time to kill it.

Reviewed By: chadaustin

Differential Revision: D26852134

fbshipit-source-id: 2872185edd834f889b78802210071d16b881e14c
2021-03-19 09:25:05 -07:00
Xavier Deguillard
5f7b08b22a service: remove one use of FileInode::getMode
Summary: It's best to test for a regular file by comparing dtype_t, not mode_t directly.

Reviewed By: chadaustin

Differential Revision: D26851735

fbshipit-source-id: 62d3833a53748ea9b45794ec6390d158e888c241
2021-03-19 09:25:05 -07:00