Commit Graph

64967 Commits

Author SHA1 Message Date
Jun Wu
f811df8575 edenapi: make Builder more flexible
Summary:
The `Builder` API is the main API used by external users to obtain an `EdenApi`
client.  In the future we want to support different kinds of `EdenApi`, like a
local repo serving it, if `paths.default` is set to something like
`myrepotype:path`. Make `Builder` more flexible to support non-HTTP `EdenApi`s,
by returning `EdenApi` trait objects.

The old builder that is coupled with HTTP is renamed to HttpClientBuilder.

Reviewed By: kulshrax

Differential Revision: D28018586

fbshipit-source-id: 1eff7bbb8f0e5521a9bcf5a225ac361ddf7c310f
2021-04-28 12:24:25 -07:00
Jun Wu
b4316da4c4 edenapi: move User-Agent to builder
Summary:
This ensures the User-Agent is always set. It also makes the `header` less
unnecessary.

Reviewed By: DurhamG

Differential Revision: D28018587

fbshipit-source-id: 1125d2122431579f127e81c4713de45135b1f972
2021-04-28 12:24:25 -07:00
Jun Wu
4103dc2cef edenapi: re-export more stuff
Summary:
Make it easier to use.

This makes it easier for other crates to use `edenapi::Result<T>`, which is
a bit shorter than `Result<T, EdenApiError>`. Also re-export `Metadata`
from revisionstore-types so callsite does not need to depend on
revisionstore-types explicitly.

Reviewed By: kulshrax

Differential Revision: D27926250

fbshipit-source-id: c85198b5c151e10a2d4d2567e23e32605a3e7c36
2021-04-28 12:24:25 -07:00
Johan Schuijt-Li
c66bd43f3f allow auth_proxy settings to come from local
Summary: Ensure these settings are available in mononokepeer.

Reviewed By: mitrandir77

Differential Revision: D28061520

fbshipit-source-id: 68cbe9f427d4a1528a4c9968b3f1f9dcd2541004
2021-04-28 12:12:47 -07:00
Aida Getoeva
54c4a17e16 mononoke: remove async on FbConstruct methods
Summary: The methods don't do anything async anymore, let's remove `async`.

Reviewed By: krallin

Differential Revision: D28026899

fbshipit-source-id: 571eb2a1ba499876042c6e89770c803ac731cfe3
2021-04-28 11:14:52 -07:00
Stefan Filip
35bdda2e88 handlers: add commit/hash_lookup
Summary:
New endpoint. This endpoint can be used for prefix lookup and the contains
check.

Reviewed By: quark-zju

Differential Revision: D28034533

fbshipit-source-id: d724b85c3816414475b142215e3052d0b555cf59
2021-04-28 10:21:52 -07:00
Stefan Filip
27b15bfa06 edenapi/types: add CommitHashLookup request/response structs
Summary:
These structures are going to be used to implement the `commit/hash_lookup`
endpoint in EdenApi.

Reviewed By: quark-zju

Differential Revision: D28034532

fbshipit-source-id: 7b00d0d97dd0593dfa43834cda9fc9e9ab9021c5
2021-04-28 10:21:51 -07:00
Stefan Filip
324668be85 edenapi/types: add Batch
Summary:
Generic container for a bunch of uniform objects. This is primarily intended
for requests and responses which can be difficult to evolve when the top level
object is an array.  For cases where evolution is required we would
probably replace the Batch wrapper with a specialized type. For example,
starting from `Batch<MyRequest>` we would change to:
  struct MyRequestBatch {
    pub batch: Vec<T>,
    pub evolution: Evolution,
  }

Reviewed By: quark-zju

Differential Revision: D28034534

fbshipit-source-id: d231c063eeacf3500b75ae76bcc101ccbcda8881
2021-04-28 10:21:51 -07:00
Stefan Filip
4d65afb5c2 bonsai_hg_mapping: add get_hg_in_range
Summary:
I want to add prefix lookup functionality to EdenApi.

I considered adding some sort of prefix abstraction to Hg or our wire types.
so that I could use the method that was already implemented. I found the
serialization and conversion logic complicated to reason about.  It is easier
to transform the prefix query in a range query and add a range query endpoint.
No need to invent new fancy types and deal conversions.

This diff updates the prefix query implementation to rely on the range query.
The range query is functionality that is more general than prefix lookup.

Reviewed By: quark-zju

Differential Revision: D28034531

fbshipit-source-id: 491db2354e3804c4cea6db16fe7d056a962515f7
2021-04-28 10:21:51 -07:00
svcscm svcscm
b3eda3da6a Updating submodules
Summary:
GitHub commits:

fbe2103cd3
1e1087fd3c
a564f945c8
de829fb42f
7be6a0a173

Reviewed By: jurajh-fb

fbshipit-source-id: 65046678cf8ef54450891c178fa29bdbd7f413c0
2021-04-28 09:34:44 -07:00
Thomas Orozco
0f44a4f106 mononoke: update to tokio 1.x
Summary:
NOTE: there is one final pre-requisite here, which is that we should default all Mononoke binaries to `--use-mysql-client` because the other SQL client implementations will break once this lands. That said, this is probably the right time to start reviewing.

There's a lot going on here, but Tokio updates being what they are, it has to happen as just one diff (though I did try to minimize churn by modernizing a bunch of stuff in earlier diffs).

Here's a detailed list of what is going on:

- I had to add a number `cargo_toml_dir` for binaries in `eden/mononoke/TARGETS`, because we have to use 2 versions of Bytes concurrently at this time, and the two cannot co-exist in the same Cargo workspace.
- Lots of little Tokio changes:
  - Stream abstractions moving to `tokio-stream`
  - `tokio::time::delay_for` became `tokio::time::sleep`
  - `tokio::sync::Sender::send` became `tokio::sync::Sender::broadcast`
  - `tokio::sync::Semaphore::acquire` returns a `Result` now.
  - `tokio::runtime::Runtime::block_on` no longer takes a `&mut self` (just a `&self`).
  - `Notify` grew a few more methods with different semantics. We only use this in tests, I used what seemed logical given the use case.
- Runtime builders have changed quite a bit:
  - My `no_coop` patch is gone in Tokio 1.x, but it has a new `tokio::task::unconstrained` wrapper (also from me), which I included on  `MononokeApi::new`.
  - Tokio now detects your logical CPUs, not physical CPUs, so we no longer need to use `num_cpus::get()` to figure it out.
- Tokio 1.x now uses Bytes 1.x:
  - At the edges (i.e. streams returned to Hyper or emitted by RepoClient), we need to return Bytes 1.x. However, internally we still use Bytes 0.5 in some places (notably: Filestore).
  - In LFS, this means we make a copy. We used to do that a while ago anyway (in the other direction) and it was never a meaningful CPU cost, so I think this is fine.
  - In Mononoke Server it doesn't really matter because that still generates ... Bytes 0.1 anyway so there was a copy before from 0.1 to 0.5 and it's from 0.1 to 1.x.
  - In the very few places where we read stuff using Tokio from the outside world (historical import tools for LFS), we copy.
- tokio-tls changed a lot, they removed all the convenience methods around connecting. This resulted in updates to:
  - How we listen in Mononoke Server & LFS
  - How we connect in hgcli.
  - Note: all this stuff has test coverage.
- The child process API changed a little bit. We used to have a ChildWrapper around the hg sync job to make a Tokio 0.2.x child look more like a Tokio 1.x Child, so now we can just remove this.
- Hyper changed their Websocket upgrade mechanism (you now need the whole `Request` to upgrade, whereas before that you needed just the `Body`, so I changed up our code a little bit in Mononoke's HTTP acceptor to defer splitting up the `Request` into parts until after we know whether we plan to upgrade it.
- I removed the MySQL tests that didn't use mysql client, because we're leaving that behind and don't intend to support it on Tokio 1.x.

Reviewed By: mitrandir77

Differential Revision: D26669620

fbshipit-source-id: acb6aff92e7f70a7a43f32cf758f252f330e60c9
2021-04-28 07:36:31 -07:00
svcscm svcscm
4c28847877 Updating submodules
Summary:
GitHub commits:

f1a7f1dc44
36bdedfa53
07c6d22382
52e8149e96

Reviewed By: jurajh-fb

fbshipit-source-id: eba43102b12acfa84a986996216841b5788c7205
2021-04-28 05:32:12 -07:00
CodemodService FBSourceClangFormatLinterBot
63c0e35bd7 Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D28053932

fbshipit-source-id: d2f903158c49a41a0a19df5cf1af540ba9f90a98
2021-04-28 04:38:27 -07:00
Aida Getoeva
bb3d207e33 mononoke: remove myrouter from Mononoke
Summary:
MyRouter is no longer used by Mononoke services, it is deprecated and will stop working when we upgrade the tokio.

This diff removes MyRouter support from Mononoke and simplifies the Mysql connection type struct.
Before we had `MysqlOptions` and `MysqlConnectionType` enum to represent what kind of a client we want to use. Now we use only MySQL FFI so I removed `MysqlConnectionType` completely and put everything into the options struct.

As setting up the connections (aka conn pool) is not an async operation, some of the methods don't need to be async anymore. Because this diff is already enormous, I'm refactoring this in the next one.

Reviewed By: StanislavGlebik

Differential Revision: D28007850

fbshipit-source-id: 32c3740f4bb132f06e1e256b0530ace755446cdd
2021-04-28 03:43:48 -07:00
svcscm svcscm
0410dd472e Updating submodules
Summary:
GitHub commits:

fd6fa02d90
5c6526f437
0332d73d41
2acf6bdad6
9549f4d434
dc69cf8b1f
b48fb95cf6
5bc9386b6d

Reviewed By: jurajh-fb

fbshipit-source-id: af15ec47da97aa3ac8160d084a5e13b5e8ce2149
2021-04-28 03:38:42 -07:00
Andrey Chursin
9c0304b1e1 checkout: introduce debugdryup command
Summary:
This command executes native checkout dry run code for updating between specificed revisions
Command tests network and storage perf, without actually affecting working copy

Examples of usages:
1) User reports that when updating between revisions multiple times, they see unexpected fetches, even though they expected that all data should already be in cache. Running this command shows that update between those revs fetches more data then a cache size, so repating fetches are not a surprise

2) People working on storage/network layer optimizations can utilize this command to test performance without messing with their working copy

This command understands nativecheckout.usescmstore config, same way it is used in actual native checkout

Differential Revision: D28040641

fbshipit-source-id: e5454f3110ade11f3227d6adc804a22176f530b9
2021-04-28 02:14:44 -07:00
Andrey Chursin
735da3f688 util: introduce util.formattime
Summary: This fn can be use to format time using human readable units.

Differential Revision: D28042138

fbshipit-source-id: 8b1eb6fa892754ee1008b529477fd555bd41c692
2021-04-28 02:14:44 -07:00
Andrey Chursin
c464f515b5 checkout: add methods for dry run checkout
Summary: Those methods only access store/network to fetch content but does not write to disk

Differential Revision: D28040640

fbshipit-source-id: e45dd08e12d128d54b3446e1137465981cde8f13
2021-04-28 02:14:44 -07:00
Alex Hornby
c77b388122 mononoke: add HgManifestFileNode steps to walker
Summary:
HgManifestFileNode is one of the last remaining types we don't walk ( other known one is the git derived data).

Its added as a separate NodeType from HgFileNode as HgManifestFileNode is used much less and users may want to see only the HgFileNodes.   Server side the manifest file node is only used to build the bundles returned to the client.

Differential Revision: D28010248

fbshipit-source-id: ce4c773b0f1996df308f1b271890f29947c2c304
2021-04-28 02:09:52 -07:00
Thomas Orozco
8e3f5419f6 mononoke: update Manifold client used by blobimport
Summary:
This uses code that depends on Tokio 0.x so let's get this removed. I think
I could have updated this to just use manifold-thrift, but while I'm at it,
might as well update to the new shiny client.

Reviewed By: farnz

Differential Revision: D28025165

fbshipit-source-id: 4b79c8a4bd0b8789e6827d2135d36245db4447d5
2021-04-28 01:03:19 -07:00
svcscm svcscm
ddc5bddff5 Updating submodules
Summary:
GitHub commits:

c1a5af8066
1e55b22e5d
eb545c54d8
76745a0265
38347b2703
2f30638435
fdeddcf36e
8996fd7d9d
63d18d7955
a2ff21fb3f
44fdf2f3fd

Reviewed By: jurajh-fb

fbshipit-source-id: d3e64afcf3f4fa18c8d9a0c89d4103a34991d723
2021-04-27 19:58:26 -07:00
svcscm svcscm
24b3f37677 Updating submodules
Summary:
GitHub commits:

d1f4e53fc5
4636310266
b8e49570b9
30afde3f3b
18b8275805
458c94d498
d2d1fb890f
c1e5547ad9
74ee67a5f6
375bebb3f4
7ca61f711c

Reviewed By: jurajh-fb

fbshipit-source-id: a9f33c9def654fcfaf5ce3eafa5f6ff5683d0445
2021-04-27 18:23:17 -07:00
Katie Mancini
7e37116aae report TreeCache stats
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

We collect some cache statistics already, lets expose them through thrift with
the rest of the stats.

Reviewed By: chadaustin

Differential Revision: D27052265

fbshipit-source-id: d7fdf70260599b8df43824e2442471e332c1b0cf
2021-04-27 17:38:40 -07:00
Katie Mancini
8a1a529fcc use custom in memory tree cache
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

Here we actually start to use the cache!

Reviewed By: chadaustin

Differential Revision: D27050310

fbshipit-source-id: e35db193fea0af7f387b6f44c49b5bcc2a902858
2021-04-27 17:38:40 -07:00
Katie Mancini
90072e0f4e add unit tests for TreeCache
Summary:
This introduces some basic unit tests to ensure correctness of the cache.
We are adding tests to cover the simple methods of the object cache since we
are using that code path here. And adding a few sanity check tests to make sure
the cache works with trees.

Reviewed By: chadaustin

Differential Revision: D27050296

fbshipit-source-id: b5f0577c1662483f732bb962c5b40bca8e1dcb40
2021-04-27 17:38:40 -07:00
Katie Mancini
1a02401df9 create a custom in memory tree cache
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

This introduces the class for the in memory cache and is based on the existing
BlobCache. note that we keep the minimum number of entries functionality from
the blob cache. This is unlikely to be needed as trees are much less likely
than blobs to exceed a reasonable cache size limit, but kept since we already
have it.

Reviewed By: chadaustin

Differential Revision: D27050285

fbshipit-source-id: 9dd46419761d32387b6f55ff508b60105edae3af
2021-04-27 17:38:39 -07:00
Katie Mancini
6461a7e1a8 ObjectCache use distributed lock
Summary:
On all the code paths that matter we always acquire the write lock. Since we are
basically just using a simple lock, distributed mutex is a more efficient implementation
that does fancy tricks with cachelines. This improves performance from testing
globs which cause many concurrent reads from the cache.

Reviewed By: chadaustin

Differential Revision: D27810990

fbshipit-source-id: d22470f3f39e2cd3895f5ea772955b62030d154a
2021-04-27 17:38:39 -07:00
Katie Mancini
1cbec32910 move BlobCacheTest to ObjectCacheTest
Summary:
Now that Object Cache actually does most the work, I am moving the
BlobCache tests to be ObjectCache tests. I am leaving a few blob cache
tests to sanity check that the cache works with blobs.

Reviewed By: chadaustin

Differential Revision: D27776113

fbshipit-source-id: ef58279d93035588beb162ee19173a42e3ca4e5b
2021-04-27 17:38:39 -07:00
Katie Mancini
53d3f1e6cd Templatize ObjectCache
Summary:
We would like to use a limited size LRU cache fore trees as well as blobs,
so I am templatizing this to allow us to use this cache for trees.

Trees will not need to use Interest handles, but in the future we could use
this cache for blob metadata, which might want to use interest handles.
Additionally if we at somepoint change the inode tree scheme that would remove
the tree content from the inodes itself, interest handle might be useful for
trees. We could also use this cache proxy hashes which may or may not use
interest handles. Since some caches may want interest handles and others will
not I am creating get/insert functions that work with and without interest
handles.

Reviewed By: chadaustin

Differential Revision: D27797025

fbshipit-source-id: 6db3e6ade56a9f65f851c01eeea5de734371d8f0
2021-04-27 17:38:39 -07:00
svcscm svcscm
4a2fbbba31 Updating submodules
Summary:
GitHub commits:

9a124fe609
c948546a2c
254c7ae54c
2798cd1b91
7de59cfc51
29d32025ff
19b07d4cc1
88764b5e2f
fda2a5a420
9b2f0074c4
0262be2e9b
2c7d89463a

Reviewed By: jurajh-fb

fbshipit-source-id: c7baa0e862b9622716c66d1247d154cbc4f4f0d4
2021-04-27 17:05:42 -07:00
svcscm svcscm
6fccfd5a87 Updating submodules
Summary:
GitHub commits:

287c42a604
1d5b79de49
e4448166b1
9eff0218ec
c9af2c415b
3949731de3
b6f679b560
02aa01e8e5
981e18145b
1b8dedc9bf
a16f502393

Reviewed By: jurajh-fb

fbshipit-source-id: 4f78e1fc5e2194c293f20662d7bf01511dfe518d
2021-04-27 15:44:49 -07:00
TJ Yin
0cafe52bdd Remove thrift setters
Summary:
Thrift setter API is deprecated since it doesn't bring any value over direct assignment. Removing it can reduce build-time and make our codebase more consistent.

If result of `s.set_foo(bar)` is unused, this diff replaces

    s.set_foo(bar);

with

    s.foo_ref() = bar;

Otherwise, it replaces

    s.set_foo(bar)

with

    s.foo_ref().emplace(bar)

Reviewed By: xavierd

Differential Revision: D27986185

fbshipit-source-id: d90aaf27f25f2ecfcbbbe7886e0c0d784f607a87
2021-04-27 15:16:06 -07:00
Andrey Chursin
efcc5d91a7 checkout: create CheckoutPlan from ActionMap
Summary:
This and following diff will refactor CheckoutPlan creation.

Right now we create CheckoutPlan from manifest diff and then manipulate it with methods like `with_sparse_profile` to adjust plan for different cases.
Those 'adjustment' do not work great with the structure of CheckoutPlan, for example `with_sparse_profile` has to create temporary HashSet just to index files in CheckoutPlan
We are going to add more adjustments in the future (for example, checkout --clean), and will run into same issues with current structure of CheckoutPlan

To avoid those issues, we are going to refactor this code, so that instead of Diff -> CheckoutPlan -> adjustments, we are going to have Diff -> ActionMap -> adjustments -> CheckoutPlan

The structure of CheckoutPlan is still good for it's direct purpose (execution), but all the 'changes' to the plan will be done in ActionMap instead.

Reviewed By: DurhamG

Differential Revision: D27980390

fbshipit-source-id: 403f371fd2fe7760984925a38429e1bfb88d8e3f
2021-04-27 13:33:25 -07:00
Andrey Chursin
3d01cbc5d9 checkout: use native checkout on dirty copy
Summary: For now this does not work with --clean flag(fallback to regular checkout in that case)

Reviewed By: quark-zju

Differential Revision: D27953967

fbshipit-source-id: 71c097cf1e395ff2cba2f4ee528145d3b2c83c23
2021-04-27 13:33:25 -07:00
Andrey Chursin
4d87e066ce checkout: add bindings for checking status conflicts
Reviewed By: quark-zju

Differential Revision: D27953966

fbshipit-source-id: 549796c0aa85c604d0b0d404929da4e371471e49
2021-04-27 13:33:25 -07:00
Andrey Chursin
3a0ed3f7ab checkout: separate native checkout code in merge.py into separate function
Reviewed By: quark-zju

Differential Revision: D27953968

fbshipit-source-id: 0bc80f0851d02795a02cc24344d878e4d4a6400c
2021-04-27 13:33:25 -07:00
Andrey Chursin
052685b356 status: introduce hg status bindings
Summary: This crate does not calculate status, but allows to convert python status into rust status, that can later be used by python code

Reviewed By: quark-zju

Differential Revision: D27953962

fbshipit-source-id: ab91d9d035140e43d8b17988b24bd030af77c96d
2021-04-27 13:33:24 -07:00
Andrey Chursin
cb550463d9 checkout: check status conflicts in native checkout
Summary: When checking out on dirty copy without --clean this function can be used to check if checkout operation conflicts with currently modified files

Reviewed By: quark-zju

Differential Revision: D27953965

fbshipit-source-id: 4096506e4cbf8b102e0afa1a929c066dfa474825
2021-04-27 13:33:24 -07:00
Andrey Chursin
9c1d0266af status: introduce status crate
Summary:
This crate introduces consumer API for status in rust
Currently the implementation will just take status from Python and convert it into this struct
But in the future we can get pure Rust implementation to get status

Reviewed By: quark-zju

Differential Revision: D27953963

fbshipit-source-id: 29c876400c82056eaf81fffa4adc814473853c1e
2021-04-27 13:33:24 -07:00
Andrey Chursin
2b781b75f9 types: introduce RepoPath:to_lowercase
Summary: This method can be used to 'normalize' path for case insentive use cases

Reviewed By: quark-zju

Differential Revision: D27953964

fbshipit-source-id: 421832af22af9a3b56eec0d045b9f983592ed192
2021-04-27 13:33:24 -07:00
svcscm svcscm
4fad2642ac Updating submodules
Summary:
GitHub commits:

a1f7eb3f51
2979dad951
cfea4897bb
f8fb198623
3a0dfb3c9b
4e65bc2b1b
592602c965
1688870298
37dbe99653
ca638bbfc3
d95cf7af38

Reviewed By: jurajh-fb

fbshipit-source-id: 07871b9bcdd57e8b09f0ac8d66cccc7f0a219519
2021-04-27 13:11:03 -07:00
svcscm svcscm
bed167d0a7 Updating submodules
Summary:
GitHub commits:

89a51b51b1
ab5d1a0b5b
796507d39f
81b6e4b8f9
65abb0cf71
b589bc0148
cbb5c79b9c
0a6578d072

Reviewed By: jurajh-fb

fbshipit-source-id: 2a93e2ff30541b9f1598f996f859b1aa2cbfffe0
2021-04-27 11:42:24 -07:00
Stefan Filip
bf14b9d5c7 edenapi_service: fix stats for bookmarks endpoint
Summary:
Fix missing stats for the bookmarks endpoint because we have the wrong name in
code.

Reviewed By: quark-zju

Differential Revision: D28008091

fbshipit-source-id: 128fe00e00a06ebe9b65fb11512cd03a042d55fe
2021-04-27 11:16:40 -07:00
Thomas Orozco
eb3f97b858 mononoke/gotham_ext: remove ForwardErr
Summary: This is not used anymore.

Reviewed By: sfilipco

Differential Revision: D27998038

fbshipit-source-id: 7f8de56897931d72e6bc3405b463a2302d5da6a3
2021-04-27 11:00:16 -07:00
Thomas Orozco
f8e523e74d mononoke/edenapi_service: stop using forward_err
Summary:
This doesn't link the errors into Scuba, which makes it not very useful for
debugging, since we're not routinely looking at stderr on our tasks, and makes
it impossible to e.g. look anywhere and find a count of failed requests.

Instead, update this to use `capture_first_err`, which will report both the
first error and the total error count to Scuba.

Reviewed By: sfilipco

Differential Revision: D27998037

fbshipit-source-id: b941d44a2ac21bbf640b9bc977de749207f12d9a
2021-04-27 11:00:16 -07:00
Thomas Orozco
f1a4c3e615 mononoke/gotham_ext: introduce CaptureFirstError
Summary:
In EdenAPI, most endpoints don't raise errors when they fail, and instead just take items out of the response stream (though there are some exceptions: D24315399 (0ccae1cef9).

Right now, this just gets logged to stderr, which isn't great. This diff introduces a CaptureFirstError wrapper we can use to capture those errors and expose them in post-response callbacks (i.e. Scuba).

Reviewed By: sfilipco

Differential Revision: D27998036

fbshipit-source-id: 960d0e09a82ca79adfafe22e2eeef2e0294d27dc
2021-04-27 11:00:16 -07:00
Jun Wu
c85640bfef distutils_rust: prefer lld as the linker
Summary:
`lld` is faster than `ld.gold`.

To compare, `make local3`, then add a blank line in `hgmain`, then run `make
local3` again.

Using `lld`:

  building 'hgmain' binary
     Compiling hgmain v0.1.0 (/home/quark/fbsource-lazy/fbcode/eden/scm/exec/hgmain)
      Finished release [optimized + debuginfo] target(s) in 3.73s
  building 'mkscratch' binary
      Finished release [optimized] target(s) in 0.37s
  building 'scm_daemon' binary
      Finished release [optimized] target(s) in 0.42s

Using `ld.gold`:

  building 'hgmain' binary
     Compiling hgmain v0.1.0 (/home/quark/fbsource-lazy/fbcode/eden/scm/exec/hgmain)
      Finished release [optimized + debuginfo] target(s) in 10.15s
  building 'mkscratch' binary
      Finished release [optimized] target(s) in 0.39s
  building 'scm_daemon' binary
      Finished release [optimized] target(s) in 0.46s

Reviewed By: ikostia

Differential Revision: D28006551

fbshipit-source-id: 55b19be93d8152634d79ed92c9cd53237f91b820
2021-04-27 10:30:48 -07:00
Aida Getoeva
eeb7c00c7f mononoke/mysql: move raw xdb API to shed/sql:sql_facebook
Summary:
This raw XDB connections API is not used in Mononoke although there are projects depending on it.

The API creates connection objects based on shed/sql crate.
This diff moves `SqlConnections` into `shed/sql:sql_common`, closer to the `Connection` definition, and moves `create_raw_xdb_connections` API into the `shed/sql:sql_facebook::raw`.

Reviewed By: krallin

Differential Revision: D28003638

fbshipit-source-id: ea4a29b6e239a89c97237877e2dfde4c7c7ff89b
2021-04-27 10:20:33 -07:00
Jun Wu
ad6b424474 config: enable selectivepull by default
Summary:
It turns out during the initial clone, we're not using selectivepull for some
tiers that do not have the non-repo selectivepull config.

We've been using selectivepull for devservers and corp (and it's effective
during clone) for a long time. Let's just enable it by default so even if
dynamicconfig does not set it properly, we can still use selectivepull clone
to avoid pulling 10k+ remote bookmarks (which triggers auto bookmark cleanups
as logged in hgfeatures).

There are too many incompatible tests so I'm not migrating them for now.

Reviewed By: DurhamG

Differential Revision: D28006488

fbshipit-source-id: f0dc000156abde530fd8881bd26b4642a36167be
2021-04-27 10:10:07 -07:00
Ilia Medianikov
2df2d3c678 mononoke/pushrebase: remove re-exporting of hook definitions from the crate
Summary:
As I split the pushrebase crate in D27968029 (93b8cf116b) it makes sense to stop re-exporting hook definitions from it.
This change will also make dependencies more accurate.

Reviewed By: krallin

Differential Revision: D28028045

fbshipit-source-id: 622ef5d7db737e19153109f4d2dcefe54fba2bb4
2021-04-27 09:53:36 -07:00