A Scalable, User-Friendly Source Control System.
Go to file
Stanislau Hlebik 79dda5ed04 mononoke: log public commits to scribe from scs move/create_bookmark method
Summary:
The goal of this stack is to start logging commits to scribe even if a commit was
introduced by scs create_commit/move_bookmark api.  Currently we don't do that.

Initially I had bigger plans and I wanted to log to scribe only from bookmarks_movement and remove scribe logging from unbundle/processing.rs, but it turned out to be trickier to implement. In general, the approach we use right now where in order to log to scribe we need to put `log_commit_to_scribe` call in all the places that can possibly create commits/move bookmarks seems wrong, but changing it is a bit hard. So for now I decided to solve the main problem we have, which is the fact that we don't get scribe logs from repos where bookmarks is moved via scs methods.

To fix that I added an additional option to CreateBookmark/UpdateBookmark structs. If this option is set to true then before moving/creating the bookmark it finds all draft commits that are going to be made public by the bookmark move i.e. all draft ancestors of new bookmark destinationl. This is unfortunate that we have to do this traversal on the critical path of the move_bookmark call, but in practice I hope it won't be too bad since we do similar traversal to record bonsai<->git mappings. In case my hopes are wrong we have scuba logging which should make it clear that this is an expensive operation and also we have a tunable to disable this behavioiur.

Also note that we don't use PushParams::commit_scribe_category. This is intentional - PushParams::commit_scribe_category doesn't seem useful at all, and I plan to deprecate it later in the stack. Even later it would make sense to deprecate PushrebaseParams::commit_scribe_category as well, and put commit_scribe_category optoin in another place in the config.

Reviewed By: markbt

Differential Revision: D25558248

fbshipit-source-id: f7dedea8d6f72ad40c006693d4f1a265977f843f
2020-12-17 00:19:00 -08:00
.github/workflows simplify env setting for all steps using GITHUB_ENV (#70) 2020-12-11 05:00:20 -08:00
build Updating submodules 2020-12-17 00:19:00 -08:00
CMake eden-config: update the default etc directory on Windows 2020-11-11 09:37:56 -08:00
common getting rid of Time.h 2020-04-14 09:53:10 -07:00
configerator/structs/scm/mononoke Remove optional backup source name string field 2020-12-16 05:30:37 -08:00
eden mononoke: log public commits to scribe from scs move/create_bookmark method 2020-12-17 00:19:00 -08:00
.gitignore mononoke: add README.md and the missing pieces for supporting cargo (#13) 2020-02-13 00:12:36 -08:00
.projectid replace the old getdeps.py script with a build.sh script 2020-03-30 19:27:54 -07:00
.travis.yml Remove sudo: required from .travis.yml (#37) 2019-07-24 08:55:03 -07:00
build.bat add a build.bat file for building on Windows 2020-03-30 19:27:54 -07:00
build.sh replace the old getdeps.py script with a build.sh script 2020-03-30 19:27:54 -07:00
CMakeLists.txt store: replace use of ctreemanifest with small manifest parser 2020-12-09 08:40:38 -08:00
CODE_OF_CONDUCT.md Adopt Contributor Covenant 2019-08-29 23:23:31 -07:00
CONTRIBUTING.md relicense to GPLv2 2019-06-19 17:02:45 -07:00
LICENSE relicense to GPLv2 2019-06-19 17:02:45 -07:00
make-client.py apply black 20.8b1 formatting update 2020-10-14 20:21:52 -07:00
README.md include oss installation instructions for ubuntu 2020-07-24 11:34:17 -07:00
requirements_ubuntu.txt include oss installation instructions for ubuntu 2020-07-24 11:34:17 -07:00
rustfmt.toml rustfmt: Use use_try_shorthand default 2020-06-10 19:29:15 -07:00

EdenSCM

EdenSCM is a cross-platform, highly scalable source control management system.

It aims to provide both user-friendly and powerful interfaces for users, as well as extreme scalability to deal with repositories containing many millions of files and many millions of commits.

EdenSCM is comprised of three main components:

  • The eden CLI: The client-side command line interface for users to interact with EdenSCM.
  • Mononoke: The server-side part of EdenSCM.
  • EdenFS: A virtual filesystem for efficiently checking out large repositories.

EdenSCM's scalability goals are to ensure that all source control operations scale with the number of files in use by a developer, and not with the size of the repository itself. This enables fast, performant developer experiences even in massive repositories with many long files and very long commit histories.

The eden CLI

The eden CLI was originally based on Mercurial, and shares many aspects of the UI and features of Mercurial.

The CLI code can be found in the eden/scm subdirectory.

Building the eden CLI

The eden CLI currently builds and runs on Linux, Mac, and Windows. The setup.py script is the main interface for building the CLI.

Mononoke

Mononoke is the server-side component of EdenSCM.

Despite having originally evolved from Mercurial, EdenSCM is not a distributed source control system. In order to support massive repositories, not all repository data is downloaded to the client system when checking out a repository. Clients ideally only download the minimal amount of data necessary, and then fetch additional data from the server as it is needed.

Building Mononoke

The Mononoke code lives under eden/mononoke

Mononoke currently builds and runs only on Linux, and is not yet buildable outside of Facebook's internal environment. Work is still in progress to support building Mononoke with Rust's cargo build system.

EdenFS

EdenFS is a virtual file system for managing EdenSCM checkouts.

EdenFS speeds up operations in large repositories by only populating working directory files on demand, as they are accessed. This makes operations like checkout much faster, in exchange for a small performance hit when first accessing new files. This is quite beneficial in large repositories where developers often only work with a small subset of the repository at a time.

EdenFS has similar performance advantages to using sparse checkouts, but a much better user experience. Unlike with sparse checkouts, EdenFS does not require manually curating the list of files to check out, and users can transparently access any file without needing to update the profile.

EdenFS also keeps track of which files have been modified, allowing very efficient status queries that do not need to scan the working directory. The filesystem monitoring tool Watchman also integrates with EdenFS, allowing it to more efficiently track updates to the filesystem.

More detailed EdenFS design documentation can be found at eden/fs/docs/Overview.md.

Building EdenFS

EdenFS currently builds on Linux, Mac, and Windows.

The recommended way to build EdenFS is using the build.sh script in the top-level of the repository. This script will download and build all of the necessary dependencies for EdenFS, before building EdenFS itself. On Windows use the build.bat script instead of build.sh.

This build script will create an output directory outside of the repository where it will perform the build. You can control this output directory location by passing a --scratch-path argument to the build script.

On Ubuntu, install the requirements in requirements_ubuntu.txt. You will also need m4 and Rust installed.

Support

EdenSCM is the primary source control system used at Facebook, and is used for Facebook's main monorepo code base.

Support for using EdenSCM outside of Facebook is still highly experimental. While we would be interested to hear feedback if you run into issues, supporting external users is not currently a high priority for the development team, so we unfortunately cannot guarantee prompt support at this time.

License

See LICENSE.