Summary: Its useful to be able to set the repo bounds used for a walk so that issues can be reproduced with the same inputs as a failing chunk.
Differential Revision: D26342439
fbshipit-source-id: b486387be59a3f4d21e3d3dc407420fc339c150d
Summary:
Instead of having one "Dispatcher" type that the various backend overload,
let's simply have a per-mount type dispatcher type. The previous model worked
fine when EdenFS supported only one way of mounting a repository, but with NFS
coming, unix platform will support both FUSE and NFS, making the Dispatcher
overload nonsensical.
As a behavioral change, the dispatcher lifetime and ownership is changed a bit.
It used to live for the duration of the EdenMount object, but is now tied to
the channel lifetime, as it is now owned by it.
Reviewed By: kmancini
Differential Revision: D26329477
fbshipit-source-id: 3959b90a4909e3ab0898caa308f54686f59a943c
Summary: The requirement for boxing is in tail.rs so do the boxing there.
Reviewed By: StanislavGlebik
Differential Revision: D26365153
fbshipit-source-id: 65974fd1e90ca9709ba58200a319ffc6b0fae5db
Summary:
This endpoint is used by the lazy Segmented Changelog to understand the
location of commit described by hashes. For example users may say that they
want to check out an older commit by hash. The client would then call this
endpoint to understand the relationship of the destination commit relative to
the graph.
Reviewed By: quark-zju
Differential Revision: D26289622
fbshipit-source-id: 4bbfd4bd4f91c984384fff5a6480b8d9d77cf8d3
Summary:
Exposes Segmented Changelog changeset to location translation functionality.
This is going to be used by EdenApi endpoints. Those endpoints will be used
by "lazy" Segmented Changelogs on client repositories.
Reviewed By: quark-zju
Differential Revision: D26289620
fbshipit-source-id: 6fb78abab465efd34e2768c8648f438647e9b91c
Summary:
Get the graph location of a given commit identifier.
The client using segmented changelog will have only a set of identifiers for
the commits in the graph. The client needs a way to translate user input to
data that it has locally. For example, when checking out an older commit by
hash the client will have to retrieve a location to understand the place in the
graph of the commit.
Reviewed By: quark-zju
Differential Revision: D26289623
fbshipit-source-id: 4192d91a4cce707419fb52168c5fdff53ac3a9d0
Summary:
Couldn't reproduce this race locally, but the check for age in tail.rs is ```Duration::from_secs(age_secs as u64) > tail_params.state_max_age`` so the tests existing sleep of 1 second isn't quite enough
```sleep 2``` should make sure that check is at least 2>1 and thus the checkpoint too old logic will run as expected.
Reviewed By: farnz
Differential Revision: D26369058
fbshipit-source-id: 6660c20697bb8e06e693ea1eba048400ee414513
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