Commit Graph

63050 Commits

Author SHA1 Message Date
svcscm
f623a9d23c Updating submodules
Summary:
GitHub commits:

ed045172c2
a265f234e9
c16d5a4fda

Reviewed By: jurajh-fb

fbshipit-source-id: 0cd36a469e4506579d6c5ee1c0cadb77ef469824
2021-02-10 09:33:38 -08:00
Xavier Deguillard
c41bf98c58 test: type-check cli_test
Summary:
As I'm modifying the definition for CheckoutConfig, I'm heavily relying on
`pyre` to tell me about the places I need to fix, but this test not being type
checked means that pyre misses it.

Reviewed By: chadaustin

Differential Revision: D26356268

fbshipit-source-id: 2139c0053b182e656074de3117ee1950e519f19a
2021-02-10 08:49:51 -08:00
svcscm
a024f343ac Updating submodules
Summary:
GitHub commits:

070b4242fb
5e1e8c9337
2cfe5751fb

Reviewed By: jurajh-fb

fbshipit-source-id: bfba7d07c8764364dc31073bae38077082e53abf
2021-02-10 07:48:05 -08:00
Alex Hornby
3291f638bc mononoke: add a new test for bounded_traversal_stream's parents
Summary: New test to check that the path to each unfolded node is as expected

Differential Revision: D26319141

fbshipit-source-id: e67052fd8de3e2e8c6d9287a25f52f9511e9d6c8
2021-02-10 07:34:01 -08:00
Alex Hornby
8cb43ffde8 mononoke: extract bounded_traversal_stream tests in preparation for a new variant
Summary:
Split out the bounded_traversal_stream test in preparation for a new variant so we can be sure same expectations apply to both.

The code to build a test tree was common in a few places I touched, so extracted it to a function.

Differential Revision: D23757523

fbshipit-source-id: fbc7844d8445586b13de3a3ccf4f0fb0041bcd6f
2021-02-10 07:34:01 -08:00
svcscm
0ea67055f4 Updating submodules
Summary:
GitHub commits:

49926b98f5
5eb4f0b373

Reviewed By: jurajh-fb

fbshipit-source-id: 5d407abc664918bedd45d8679a38fcf6e14c393c
2021-02-10 06:52:10 -08:00
Thomas Orozco
2a92a037e0 mononoke: add more futures_watchdog
Summary: SCS is still having issues starting up. This might help.

Reviewed By: StanislavGlebik

Differential Revision: D26344057

fbshipit-source-id: 499cee9f28d55856dd156dd83307f72a63d5b30b
2021-02-10 04:02:09 -08:00
svcscm
9f99a9bbca Updating submodules
Summary:
GitHub commits:

7308b449c7
6b2ab4da23

Reviewed By: jurajh-fb

fbshipit-source-id: 5c83bde4867bb5d50fe26b566eb55b3bb032b71e
2021-02-10 04:02:09 -08:00
svcscm
df7ca6fb9a Updating submodules
Summary:
GitHub commits:

c832e926c8

Reviewed By: jurajh-fb

fbshipit-source-id: c7b6d8fd071ac98bdfb1bbd52290ffe1a0549bb5
2021-02-10 02:50:47 -08:00
Aida Getoeva
e90cfe98bb mononoke/hooks: resolve owners rule
Summary:
This diff adds a function that for a given path and a parsed path tree of owners files finds a rule that is going to be applied for the path to check permissions.

Because of how the owners files work, we care about the closest owners file rule to the path. So in the implementation I go from the bottom to up in the owners files path tree.

Reviewed By: StanislavGlebik

Differential Revision: D25379330

fbshipit-source-id: 43b95938c90fdd2e1ef4fe80ed400d171e1df459
2021-02-10 01:48:52 -08:00
Aida Getoeva
c104a929f3 mononoke/hooks: fetch owners files
Summary:
This diff introduces abstractions for the OWNERS files and the rules. For now rules don't have any acl checkers and just store the parsed user and group names as a lists of strings.

Now we find and fetch all the possible owners files using `FileContentFetcher` new API.

Reviewed By: StanislavGlebik

Differential Revision: D25379329

fbshipit-source-id: 0933ef4e5e960102b46af9ed2f3e0b12d9761000
2021-02-10 01:48:52 -08:00
Aida Getoeva
6c4de32589 mononoke/hooks: rename file content fetcher into manager
Summary: The `FileContentFetcher` trait with the new API like `find_content` or `file_changes` looks more like a "manager" rather than a "fetcher".

Reviewed By: StanislavGlebik

Differential Revision: D26040535

fbshipit-source-id: 20ab3b0730e4a2b1cbe2991c3c13a9d8a8ec8f35
2021-02-10 01:48:52 -08:00
svcscm
50cd4f1a69 Updating submodules
Summary:
GitHub commits:

ce1823065e
4cb97e5e01

Reviewed By: jurajh-fb

fbshipit-source-id: 5c80ebdedbb0c154ea32cdd49937f3de0aaaca14
2021-02-10 00:38:15 -08:00
Arun Kulshreshtha
9ddae21be2 edenapi: ensure url ends with slash
Summary: If a URL's path does not end in a trailing slash (e.g., https://example.com/foo/bar.html), `Url::join` will strip off the final path component under the assumption that it is a filename. This is problematic in the case of EdenAPI base URLs, since the endpoints might be under some base URL (e.g., https://example.com/edenapi/v1). This change ensures the final path component will not be stripped off in such cases.

Reviewed By: quark-zju

Differential Revision: D26353232

fbshipit-source-id: 2ec3dc56fd6d5a0ccaf522fcfc34e6741ec95c68
2021-02-09 23:34:54 -08:00
svcscm
61a9943671 Updating submodules
Summary:
GitHub commits:

a7bbceb93f

Reviewed By: jurajh-fb

fbshipit-source-id: 822facdb889cb0a31984ba93eabb837ff8c747ab
2021-02-09 23:03:51 -08:00
svcscm
61496d2cc7 Updating submodules
Summary:
GitHub commits:

5e22daa09d
1248d44095
65487da1f5

Reviewed By: jurajh-fb

fbshipit-source-id: 9621b3eefc48c289d11454d8bd5bfec2b77bb299
2021-02-09 23:03:50 -08:00
svcscm
d1b8476c20 Updating submodules
Summary:
GitHub commits:

1e63a88c83
45e51f7637

Reviewed By: jurajh-fb

fbshipit-source-id: 01e7c6c999d16427075003507961aa04504e6475
2021-02-09 20:31:38 -08:00
Durham Goode
465d10436a grep: fix biggrep integration again
Summary:
The biggrep revision string has changed again. Let's update our code to
handle the old and new format. Filed T84566856 to track why it changed and how
to prevent breakages.

Reviewed By: quark-zju

Differential Revision: D26351188

fbshipit-source-id: aeb53f54e6e23af47c5eedfa32268c043c02088d
2021-02-09 18:29:20 -08:00
Andrey Chursin
fc37800267 checkout: generalize CheckoutPlan::apply for testing
Summary: Allow different type of storages for CheckoutPlan::apply

Reviewed By: quark-zju

Differential Revision: D26291577

fbshipit-source-id: a1c9ba4dbef09e844727ae32eac25c37dd01358e
2021-02-09 17:04:30 -08:00
Andrey Chursin
713af03e97 checkout: track checkout stats
Reviewed By: quark-zju

Differential Revision: D26262590

fbshipit-source-id: fcf96070d167390b60c31392720344fd66732e77
2021-02-09 17:04:30 -08:00
Andrey Chursin
14064f8582 vfs: move conflict handling from pyworker to vfs write
Summary:
Previously, `write` can fail because the destination file exists as a
directory, or the parent directory is missing. pyworker handles those cases
by calling `clear_conflicts` to remove conflicted directories and create
missing parent directories and retry `write`. Practically, for all `write`
usecases (including checkout) we always want the `clear_conflicts` behavior.
Therefore, move `clear_conflicts` to vfs `write` and make it private.

Reviewed By: quark-zju

Differential Revision: D26257829

fbshipit-source-id: 03d1da0767202edba61c47ae5654847c0ea3b33e
2021-02-09 17:04:30 -08:00
Andrey Chursin
d9232f1db3 checkout: handle more complex flag changes
Summary: Currently we pick simple approach and just delete existing file before re-creating it if there is some non-trivial flag change

Reviewed By: quark-zju

Differential Revision: D26239977

fbshipit-source-id: 167efa1bf6018e7f967ef3a9e3c8c62781486ec9
2021-02-09 17:04:29 -08:00
svcscm
ca2be84ea4 Updating submodules
Summary:
GitHub commits:

dd8a44d2da
10537c365b

Reviewed By: jurajh-fb

fbshipit-source-id: 3eff0e3c65175461837455ccc20bb32da4f4a00c
2021-02-09 17:04:29 -08:00
svcscm
d0944e0107 Updating submodules
Summary:
GitHub commits:

a9871a5e47
48669be618

Reviewed By: jurajh-fb

fbshipit-source-id: c8d8f504bcdc6772dff1eb8ac6dec42ad7834012
2021-02-09 13:17:17 -08:00
Xavier Deguillard
c30d62253c nfs: implement PATHCONF
Summary: The PATHCONF call gather various POSIX attribute for the passed in file-handle.

Reviewed By: kmancini

Differential Revision: D26270239

fbshipit-source-id: 96a46c58402ce169cacc789c1df3f05f969dcd33
2021-02-09 12:47:14 -08:00
Xavier Deguillard
e28b909fa6 nfs: add various enums/structs for the PATHCONF call
Summary: This just adds them.

Reviewed By: kmancini

Differential Revision: D26270240

fbshipit-source-id: cae9ff0278ab9a542b5ad7a5c6c2e8c3cc26b1b0
2021-02-09 12:47:14 -08:00
Xavier Deguillard
578ceb1cf0 nfs: fill in the FSINFO procedure
Summary:
The FSINFO procedure is used to collect information about this mount point and
its limits. For now, I've just used random values for most of these, I'll come
back to it later to figure out the ones that makes sense.

Reviewed By: kmancini

Differential Revision: D26269947

fbshipit-source-id: e5fdd961ea7772926208916de0179721930daeab
2021-02-09 12:47:13 -08:00
Xavier Deguillard
25a1ebc16b nfs: store and use straceLogger
Summary: Instead of using a plan DBG7, let's use the strace logger to log the RPC calls.

Reviewed By: kmancini

Differential Revision: D26269946

fbshipit-source-id: e8ab7acc658463b9f0f1d4c420f63b2e0c88f46a
2021-02-09 12:47:13 -08:00
Xavier Deguillard
b8f628d344 nfs: add various enums/structs for the FSINFO call
Summary: These will be needed when implementing FSINFO.

Reviewed By: kmancini

Differential Revision: D26268588

fbshipit-source-id: 8160f00e988a088769ad682a6de062f6c0443c73
2021-02-09 12:47:12 -08:00
Xavier Deguillard
a7741ba0a3 nfs: add std::monostate to XdrVariant
Summary:
Variant are default constructed with the first variant alternative, which means
that when deserialization would not deserialize anything, the first variant
would be initialized. This would mean that deserialize(serialize(myVariant))
would be different from myVariant, which is unexpected.

Reviewed By: kmancini

Differential Revision: D26268586

fbshipit-source-id: ebfd7f9e473509b2a16acdbb6914e828c67c5005
2021-02-09 12:47:12 -08:00
Xavier Deguillard
2f754b2305 inodes: attempt to NFS mount
Summary:
With the PrivHelper now being able to try to NFS mount, we can just plug it in
the EdenMount code to actually attempt to mount EdenFS via NFS.

The mount will expectedly fail due to the FSINFO RPC not being implemented just
yet, but that will be the next step.

Reviewed By: kmancini

Differential Revision: D26266143

fbshipit-source-id: a44ae98af76b55a0c24c89e766c072c1a2e1b4fd
2021-02-09 12:47:11 -08:00
Xavier Deguillard
91336a090e nfs: add NfsServer class
Summary:
This will be the main entry point for everything related to the various NFS
programs. For now, it simply starts an nfsd program when registering a new
mount point and returns the ports that mount(2) should use to connect to it.

Reviewed By: kmancini

Differential Revision: D26204060

fbshipit-source-id: 115d2d206109499d5b49c529ebf1f739fc364c23
2021-02-09 12:47:11 -08:00
Xavier Deguillard
fcffed9226 nfs: explicitely pass the EventBase to run the RpcServer on
Summary:
Using the current EventBase can lead to unexpected behavior when the RpcServer
is created on the wrong thread. For instance, if it is created on a thread
pool, and another future is running on that same thread, the RpcServer won't be
able to accept and service new connections, potentially leading to deadlocks.

To avoid this, EdenFS's EventBase is excplicitely passed in, this will ensure
that the RpcServer is created on the proper thread.

Reviewed By: kmancini

Differential Revision: D26266145

fbshipit-source-id: 23211e3aa200c32d2f6fbbfd9ae6fb307896a873
2021-02-09 12:47:10 -08:00
svcscm
fc8c54f3ba Updating submodules
Summary:
GitHub commits:

35c058e4dd

Reviewed By: jurajh-fb

fbshipit-source-id: 23cea36bea96da8777a51b83ea9abc0fb339aabd
2021-02-09 12:25:38 -08:00
Simon Farnsworth
acd24deb41 Make it possible to only set initial generations in sqlblob_gc
Summary:
It looks like the load created by GC marking can cause setting the initial generation for new blobs to fail as the DB is loaded and cannot lock the `chunk_generation` table.

Make it possible to run that before starting the mark process, and to run the sweep without marking new blobs. This will allow the Chronos job to avoid running both the initial generation set *and* the sweep concurrently, while still ensuring that any manual runs outside Chronos do both by default.

Reviewed By: ahornby

Differential Revision: D26232760

fbshipit-source-id: 94122c7b72588201800a45e41b26fbd03c6656ad
2021-02-09 11:59:00 -08:00
Simon Farnsworth
c0f4bf846a Use replication delays in sqlblob_gc
Summary: Having these bypass the normal delay mechanism means that our lag protection is not complete. Fill in the gap

Reviewed By: ahornby

Differential Revision: D26226896

fbshipit-source-id: bd907eff79c9b0387145c637c515525609214c76
2021-02-09 11:58:59 -08:00
svcscm
f2cf7f5c35 Updating submodules
Summary:
GitHub commits:

a290661b92
53e75a680c
4e70630ac3
aa95ceb6a4
f0d32bfebc
ae722ce82f
875a552b23
0b593b1d46
b29f70853b
0a31f4693b
9704efcbda

Reviewed By: jurajh-fb

fbshipit-source-id: a1e4ebc9949146515512791b45b65f1730fdf07f
2021-02-09 11:34:56 -08:00
Stefan Filip
8117a681e8 segmented_changelog: add guardrail to location_to_changeset_id
Summary:
If `location_to_changeset_id` somehow does not get a vector with one element
it will panic and our server will stop immediately. Not great for a server.
Changes are low but we already return `anyhow::Result` so no big pain here.

Reviewed By: quark-zju

Differential Revision: D26180417

fbshipit-source-id: 6986f3fdd0b34f7c2606162bc35aacb9857ea04c
2021-02-09 11:31:31 -08:00
Stefan Filip
78bc732d5e segmented_changelog: use dag_types::Location for location
Summary:
We had individual fields for location components. This change will make it
easier for people to read through the code. This completes the integration
of the Location struct.

Reviewed By: quark-zju

Differential Revision: D26162272

fbshipit-source-id: 76259578430bac88317afb1935f63e06b6e8284e
2021-02-09 11:31:31 -08:00
Stefan Filip
fe4e0be42e commit: use dag_types::Location for location_to_hash
Summary:
This is removing `edenapi::CommitLocation` in order to use
`dag_types::Location`.

First, `edenapi::CommitLocation` has a `count` field and `dag_types::Location`
does not. I find `count` to be difficult to attach to a more general structure.
In practice `edenapi::CommitLocation` is replaced by `CommitLocationToHashRequest`.
On top of the request we have the batch object: `CommitLocationToHashRequestBatch`.

Second, `edenapi::CommitLocation` did not have Wire types, the new structures do.

Reviewed By: quark-zju

Differential Revision: D26159865

fbshipit-source-id: f2508e123e11988726868c7f439a2ed186afce5c
2021-02-09 11:31:30 -08:00
Stefan Filip
0cf36b82b4 edenapi_server: hg_id conversion utilities
Summary: Conversions between `HgChangsetId` and `HgId`.

Reviewed By: kulshrax

Differential Revision: D26289619

fbshipit-source-id: 3d973f48783c6d9baf213eeff65304a5f098934b
2021-02-09 11:31:30 -08:00
Stefan Filip
8266b7015f dag-types: add Location
Summary: Used when the IdMap is lazy to fetch missing locations.

Reviewed By: quark-zju

Differential Revision: D26131617

fbshipit-source-id: cde0232b16afb961d9c9a18899ca78bd644f1b6b
2021-02-09 11:31:30 -08:00
Stefan Filip
3676aa38ec dag-types: re-export submodules types
Summary:
I think that it makes sense to standardize on importing:
`dag_types::Id` rather than `dag::Id` now that this is a crate of its own.

I am not sure about re-exporting `minibytes::Bytes` but it makes sense to me.

Reviewed By: quark-zju

Differential Revision: D26131616

fbshipit-source-id: fefd0334cf188f247b1541be16421967e8340546
2021-02-09 11:31:29 -08:00
Stefan Filip
0a910c4182 dag: rename dag-wire-types to dag-types
Summary:
Wire types has it's own meaning in Edenapi. I don't see it necessary to
add the wire qualifier to this crate and overload the term.

Reviewed By: quark-zju

Differential Revision: D26129827

fbshipit-source-id: eea66eef2db609611d8ffa215ba63ae4f0b669c8
2021-02-09 11:31:29 -08:00
svcscm
4eb9cc4f02 Updating submodules
Summary:
GitHub commits:

7010fd2e8d
121adb163d
2473e60ca6
89d16506e2
51586d5ff5
0b8935f342
e258dfe5b6
a0fa522628
f3ef501577
7571ee6ae0
156b6d1f36
0cd87975c4

Reviewed By: jurajh-fb

fbshipit-source-id: 8a96f13e9e4eac38582014868ccdfcb404d2b6e5
2021-02-09 10:41:49 -08:00
Xavier Deguillard
5d9a42963e ninja: upgrade and build from source on macOS
Summary:
On macOS, ninja only provides prebuilt Intel binaries, not arm64 ones. Since we
need to have a native arm64 ninja to be able to build binaries for the M1,
let's compile it from scratch on macOS too. Compiling it takes less than 30s so
it shouldn't add any notable cost to any builds.

Reviewed By: genevievehelsel

Differential Revision: D26322029

fbshipit-source-id: 1bbeeac2a3f0ba07c477a2b33f8878a91ccaec0e
2021-02-09 09:42:07 -08:00
Thomas Orozco
8f5c58ed6c mononoke/redaction: remove convoluted & useless timestamp check
Summary:
So right now we get the last timestamp at which we logged, then do a compare
exchange and log only if that succeeds. So we're ... racing with another
thread being on the brink of logging too?

What is that possibly supposed to achieve? Let's remove it.

While in there, also clean up the imports a bit, fix up the i64 -> u64
conversion, and remove a useless borrow.

Reviewed By: ahornby

Differential Revision: D26337990

fbshipit-source-id: a17f6613f1fb5fa58e4131181c230006af06f003
2021-02-09 09:09:52 -08:00
Thomas Orozco
762ce0fe86 mononoke: redaction: set server data
Summary: Like it says in the title. This is useful.

Reviewed By: StanislavGlebik

Differential Revision: D26318916

fbshipit-source-id: 22160d1c9b01ace2e2e6e0cd2d41071465884325
2021-02-09 09:09:52 -08:00
Thomas Orozco
5ede778ca4 mononoke/hgcli: allow running without fbinit
Summary:
This updates hgcli to allow us to run without fbinit (and therefore no logging
to Scuba), with a 1% chance to enable it.

Reviewed By: mitrandir77

Differential Revision: D26339638

fbshipit-source-id: 5253fbfea6aa91bc25be7cb52022b43232dbe65a
2021-02-09 08:58:56 -08:00
Thomas Orozco
e2a595ed9d mononoke/scs_server: initialize Scuba server data once
Summary: This is actually 2% of our CPU. Heh.

Reviewed By: ikostia

Differential Revision: D26338939

fbshipit-source-id: 621c3791c9333b925d799e40f0ba74a870f8c427
2021-02-09 08:53:31 -08:00