Summary:
Implement path ACL checks for basic read accesses to the repo. Attempts to access
a tree or file will fail if the user doesn't have access to that path. Attempts
to access arbitrary trees or files by their IDs will also fail if the user does not
have full repo read access, as the paths for these accesses cannot be checked.
In this initial version, we do not prevent queries that would allow users to
find out the names of paths that they do not have access to: for example
listing all files in a directory would still work.
Reviewed By: RajivTS
Differential Revision: D38129042
fbshipit-source-id: 1b2b6e5881712628c6d979d329447afac2050626
Summary:
We will need to add permission checks here, so first make these functions async
and fallible.
Reviewed By: yancouto
Differential Revision: D38129040
fbshipit-source-id: ff459fa0fcdd8bae63217caab16099e987233f70
Summary:
Add an initial test for path ACLs in the source control service. Currently
Path ACLs are not used, so the test user that is granted access cannot access
the file.
Reviewed By: RajivTS
Differential Revision: D38129041
fbshipit-source-id: 6ba37f9f2102429a7249b873987b1d94a23a7fe9
Summary:
Allow CI/CD builds to build and publish aarch64 builds alongside the existing x86_64 builds.
The published RPMs will have the same version number as the x86_64 RPMs allowing standard slowroll logic to push the packages to the fleet. This allows the aarch64 bringup team to stop special-casing slowroll.
This diff affects only the RPMs that are required for initial bringup. Subsequent activity will add more RPMs.
Context about the aarch64 effort: https://fb.workplace.com/groups/1858357931081326/posts/3670012916582476
Differential Revision: D38386331
fbshipit-source-id: 7a72da85868d0c0a488940cfff4285145ef114e7
Summary:
1. Migrated CLI flags and application setup to new framework.
2. Deprecated `--repo` flag in favor of `MultiRepoArgs` (`--repo-id` and `--repo-name` flags).
3. Refactored clone hints future stream so it can be used with `tokio::spawn()` which requires static lifetime of variables used in async scopes.
Reviewed By: mitrandir77
Differential Revision: D38282271
fbshipit-source-id: 77fc50662669d537059cb2297d0f4bfc27d8a07c
Summary:
Users are showing that tracebus fills up for inode events. for fs tacebuses we use a 25000 event limit, so lets bump to there.
we will also add a config so we can switch this off completely as needed.
Reviewed By: mshroyer, xavierd
Differential Revision: D38375093
fbshipit-source-id: 01156a1b1964ab4430a860f2e5e4c82cd86ec28e
Summary: This diff is part of a stack of diffs (D38276534 (464b402226), D38282758, D38287560, D38288599) for adding retroactive tracing support for the eden trace hg command. This diff specifically performs the logic within EdenFS to create an ActivityBuffer in each HgQueuedBackingStore and subscribe to the tracebus of this BackingStore to read and store hg events as they occur. In later diffs we will expose these events in a thrift interface, and then display them in the eden tracing CLI.
Reviewed By: MichaelCuevas
Differential Revision: D38282758
fbshipit-source-id: ef5a18482639ac6359a73ea255fe1035f97d103d
Summary:
Replaces the `thrift_*` flags in EdenServer with equivalent configurations in
EdenConfig, except for the CoDel flag which is removed.
Reviewed By: fanzeyi
Differential Revision: D38343465
fbshipit-source-id: 158fcd2a72a2f61923073d23aa8c4dfff7156ca9
Summary:
While before the ActivityBuffer only supported storing InodeTraceEvents, it is now time that we generalize this support by allowing the ActivityBuffer to store multiple types of trace events. This diff makes the transition with three main changes
1. Adding a template type to what event an ActivityBuffer can store
2. Modifying current uses of the ActivityBuffer to specify the InodeTraceEvent type (or int type in the ActivityBufferTest)
3. Moves the InodeTraceEvent type from ActivityBuffer.h to EdenMount.h and clarifies that the ActivityBuffer used in EdenMount is for Inode trace events.
Reviewed By: MichaelCuevas
Differential Revision: D38276534
fbshipit-source-id: ddfdae44b514a6e2066ebfbb7d843ef1280a6559
Summary:
This time, we're testing the behavior of replacing a directory by another
directory. This is achieved by doing a rename.
Reviewed By: genevievehelsel
Differential Revision: D38291941
fbshipit-source-id: 18a004800ca58d97fd8a4837bce5c8bc7c3b05fb
Summary:
When walking up the path that has been detected as not being present on disk,
EdenFS would assume that the returned path is a directory, but this assumption
doesn't hold true if the directory has been replaced by a file. Thus, instead
of walking up until finding a file/directory that is present on disk, the code
needs to walk up until a directory is found.
Reviewed By: kmancini
Differential Revision: D37927926
fbshipit-source-id: 5da55f503f4df8158c61435a1afa2cdd3f24d997
Summary:
Renaming of directories is handled in the same way that a directory was removed
and another one was created in a different location. Internally, EdenFS will
query the filesystem for whether the renamed directory exist, and remove the
entire inode hierarchy, at the same time, all the files in the destination
directory are added recursively in the inode hierarchy.
This model however breaks down if a new folder is then added on disk at the
location of the old directory. When that happens prior to the directory removal
described above, EdenFS will not removed the directory hierarchy, but it will
treat it as a directory creation, and will thus try to add all the on-disk
childrens of the created directory to the inode hierarchy. On completed, the
TreeInode corresponding to this directory will contain the old entries of the
renamed directory, thus a mismatch with what's on disk.
To solve this, we also need to make sure that all the entries in the TreeInode
are also consulted and recursed into. This will naturally remove the
files/directories that are no longer present on disk.
Reviewed By: kmancini
Differential Revision: D37764806
fbshipit-source-id: 249e2028cf419f837659d6813803b7a03c2a0163
Summary: Migrate repo import tool (the tool we use to ingest small git repos into our large monorepos) to new framework.
Reviewed By: mitrandir77
Differential Revision: D38285162
fbshipit-source-id: 165c96d5495d0fada0507d02af6ad4ff82baa91b
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
buck2 build times have been un-reliable, I have been trying `--local-only` and `buck clean` but the build times seem too goo for clean builds and are all over the place. Will try more throughly clearing caches. I think that folly/format.h is still being linked due to recursive dependencies, so I am looking into making sure it at least isn't being recursively included in any of our headers.
Reviewed By: xavierd
Differential Revision: D38250995
fbshipit-source-id: b02d8c458fe92a068426031cffd20ef01ae0edf7
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38251002
fbshipit-source-id: 41559edc44157f64950e764fb3bc941739dcbf40
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38250997
fbshipit-source-id: 64082155f573d94d6968bc58e6d6eb5594286c38
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38251005
fbshipit-source-id: 62f70896da0e852707ecf10198b1e14eaadb94a2
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38250998
fbshipit-source-id: b02fc4a2d656255460a642e98059dbe3129b5f0e
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38251003
fbshipit-source-id: eace8cee2a1c02ecf95cc386b16c3ae595a4f188
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38250999
fbshipit-source-id: bfa6debfb9cc9abb8634df69701658308645e6f1
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38251001
fbshipit-source-id: 0e6c4f7403a6962ef1e5fc6adba4a991dcdf6a5d
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: xavierd
Differential Revision: D38251000
fbshipit-source-id: a5aee79f7f0acbf969a351c3aa5ac32bb6c01b2a
Summary:
From the folly format docs
> Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format
eden build times have gotten a bit high, cutting out folly format will help reduce build time, so let's start
by banishing it from eden
see the last change in this group for the difference
Reviewed By: chadaustin
Differential Revision: D38250996
fbshipit-source-id: 7f1ffc4a13c2751b503c26792ae841090b119c9c
Summary:
Mononoke server on push (currently only wireproto) forwards cats that are supposed to contain extra identities used by verify integrity and stored in a db and logged to scuba here: https://fburl.com/scuba/commit_integrity/ibk4ysx5
Since remote pushrebase was rolled out, we lost these cats along the way. I'm forwarding them to SCS with this diff.
Reviewed By: markbt
Differential Revision: D38198880
fbshipit-source-id: c10973ac5f46a22b2c4b6f4de6d2ddb3b77630af
Summary:
As reported in https://github.com/markbt/streampager/issues/57,
we saw extra backslashes in the output of the `hyperlink()` function.
Changing the ANSI escape sequence appears to fix things,
at least in iTerm+streampager.
Reviewed By: markbt
Differential Revision: D38268807
fbshipit-source-id: d47e3cf5fa9e2f93485221bdc0cd4aa62a812ea5
Summary:
For some scenarios (e.g. mirroring commits) it may be necessary to bypass the
recently-added author write permissions checks. Add a `bypass_allowlist` option
to the hook config which lets us define identities of pushers who are allowed to
bypass this check.
Reviewed By: mzr
Differential Revision: D38350812
fbshipit-source-id: c4ddefd631cef1053573426b05e35481d999aa62
Summary:
The hook manager factory was used in a couple of places to make it
simpler to create a `HookManager`. However, `HookManager` is now a facet and
can therefore be created using the facet factory methods.
Remove the hook manager factory code and move its logic into `repo_factory`.
Further, update `mononoke_api::Repo`'s `new_test_common` method to create a
`HookManager` using `TestRepoFactory`. In the future, we should get rid of the
custom test methods inside of `Repo` and rely on `TestRepoFactory` instead.
Reviewed By: markbt
Differential Revision: D38352454
fbshipit-source-id: aa127ad3408a049576dafe6e21bc65f50203ead2
Summary:
Now that all of the components of `Repo` are facets, the struct can be
converted to a container. This means that the struct can be built using a
`RepoFactory` rather than calling `Repo::new()`.
In later diffs, we can remove the helper methods (e.g. `hook_manager()`,
`ephemeral_store()` etc) and update callers to import traits instead.
Reviewed By: yancouto
Differential Revision: D38349354
fbshipit-source-id: bd9ae8b3d1e6aa1d0230306860fcff852161fad0
Summary:
`mononoke_api::Repo` has logic to disable skiplists if there
`skiplist_enabled` isn't set in `MononokeEnvironment`. In order to migrate
`Repo` to be a container, this logic needs to live inside of the repo_factory.
Update the code to create a skiplist index to check the same environment
setting and disable skiplists if it's not set.
Reviewed By: yancouto
Differential Revision: D38349355
fbshipit-source-id: 0550607506b91e0a42a63bcec5995c20f12b03a0
Summary:
The Warm Bookmark Cache isn't a facet, which means that it can't be
built with `repo_factory`. Turn it into a facet and add code into
`repo_factory` to build it from the required components.
Reviewed By: yancouto
Differential Revision: D38349357
fbshipit-source-id: b89f73178a9be1b2811daae8614ff09cc80d1068