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
Summary: New test to check that the path to each unfolded node is as expected
Differential Revision: D26319141
fbshipit-source-id: e67052fd8de3e2e8c6d9287a25f52f9511e9d6c8
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
Summary: SCS is still having issues starting up. This might help.
Reviewed By: StanislavGlebik
Differential Revision: D26344057
fbshipit-source-id: 499cee9f28d55856dd156dd83307f72a63d5b30b
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
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
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
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
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
Summary: Allow different type of storages for CheckoutPlan::apply
Reviewed By: quark-zju
Differential Revision: D26291577
fbshipit-source-id: a1c9ba4dbef09e844727ae32eac25c37dd01358e
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
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
Summary: The PATHCONF call gather various POSIX attribute for the passed in file-handle.
Reviewed By: kmancini
Differential Revision: D26270239
fbshipit-source-id: 96a46c58402ce169cacc789c1df3f05f969dcd33
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
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
Summary: These will be needed when implementing FSINFO.
Reviewed By: kmancini
Differential Revision: D26268588
fbshipit-source-id: 8160f00e988a088769ad682a6de062f6c0443c73
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
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
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
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
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
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
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
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
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
Summary: Used when the IdMap is lazy to fetch missing locations.
Reviewed By: quark-zju
Differential Revision: D26131617
fbshipit-source-id: cde0232b16afb961d9c9a18899ca78bd644f1b6b
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
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
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
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
Summary: Like it says in the title. This is useful.
Reviewed By: StanislavGlebik
Differential Revision: D26318916
fbshipit-source-id: 22160d1c9b01ace2e2e6e0cd2d41071465884325
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