sapling/eden/mononoke
Rajiv Sharma 11982fe8da Log create_bookmark error in gitimport
Summary:
In D41769964, we decided not to stop `gitimport` simply because `create-bookmark` fails cause that could be due to the fact that the bookmark being created already exists. If that is indeed the case, we try to resolve the bookmark and move it to the new value. However, there could be other unrelated reasons for `create_bookmark` to fail in which case we would still try to resolve the bookmark and end up in unexpected situations (e.g. Luibov trying to import `paws` repo faced this problem). This diff does two things:
- Performs an early check to determine if the bookmark exists by resolving it. If it does exist, it executes the move bookmark branch of code
- If the bookmark doesn't exist, then it creates it.

If there are any errors during bookmark creation or movement, they get logged for the user.

Reviewed By: mitrandir77

Differential Revision: D46071703

fbshipit-source-id: 446b0bc720d13b9e9314feccdb147b2bab0b7cd9
2023-06-02 06:52:56 -07:00
..
acl_regions commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
admin derived_data_manager: add CommitGraph to DerivedDataManager 2023-04-28 10:24:20 -07:00
aliasverify Move sharding_lib_ext under cmdlib 2023-04-27 08:18:19 -07:00
backfill_derived_data replace slice_repository with CommitGraph::slice_ancestors and delete commit_traversal directory 2023-05-23 11:26:11 -07:00
benchmarks test_repo_factory: add method for building warm bookmarks cache 2023-04-25 12:45:33 -07:00
blobimport derived_data/filenodes_derivation: reorganise file layout 2023-04-13 06:39:07 -07:00
blobimport_lib Remove everything about ContentMetadata 2023-05-04 03:59:59 -07:00
blobrepo Using BonsaiTagMapping in GitImport and RemoteGitImport 2023-05-30 12:20:40 -07:00
blobrepo_utils Remove unused raw-api feature from dashmap crate 2023-05-22 10:38:20 -07:00
blobstore Upgrade rustls to 0.21 across all third party packages 2023-05-19 12:39:46 -07:00
blobstore_healer Update clap from 4.1.11 to 4.2.4 2023-04-25 12:13:11 -07:00
blobstore_sync_queue (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
bonsai_git_mapping commit_graph: replace RangeNodeStream usages with new commit graph range_stream (conditional on a tunable for critical ones) 2023-04-28 10:24:20 -07:00
bonsai_globalrev_mapping test_repo_factory: add method for building warm bookmarks cache 2023-04-25 12:45:33 -07:00
bonsai_hg_mapping Update ref-cast from 1.0.12 to 1.0.16 2023-04-25 12:08:03 -07:00
bonsai_svnrev_mapping Update ref-cast from 1.0.12 to 1.0.16 2023-04-25 12:08:03 -07:00
bonsai_tag_mapping Unit tests for bonsai_tag_mapping 2023-05-23 04:02:13 -07:00
bookmarks commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
bulkops bulkops: move benchmark to the benchmarks directory 2023-04-21 04:52:41 -07:00
cache_warmup derived_data/filenodes_derivation: reorganise file layout 2023-04-13 06:39:07 -07:00
cats bump version to 0.1.2 2022-10-20 12:08:11 -07:00
changesets Update ref-cast from 1.0.12 to 1.0.16 2023-04-25 12:08:03 -07:00
cmdlib Enable shard manager to load unredacted repos 2023-05-31 04:50:12 -07:00
cmds replace slice_repository with CommitGraph::slice_ancestors and delete commit_traversal directory 2023-05-23 11:26:11 -07:00
commit_rewriting commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
common remove dependency on MononokeApp 2023-05-26 04:22:23 -07:00
derived_data non-oss work 21/n 2023-05-11 07:19:09 -07:00
edenapi_service edenapi: gate streaming commit graph endpoint behind a tunable 2023-05-24 14:14:19 -07:00
features commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
filenodes Update ref-cast from 1.0.12 to 1.0.16 2023-04-25 12:08:03 -07:00
filestore Remove everything about ContentMetadata 2023-05-04 03:59:59 -07:00
git Log create_bookmark error in gitimport 2023-06-02 06:52:56 -07:00
gotham_ext Upgrade rustls to 0.21 across all third party packages 2023-05-19 12:39:46 -07:00
hgproto Fix clippy lints (1/N) 2023-03-10 09:41:25 -08:00
hooks Upgrade rustls to 0.21 across all third party packages 2023-05-19 12:39:46 -07:00
land_service mononoke: reject pushes and bookmark moves if they come outside of VPN 2023-04-25 13:47:11 -07:00
lfs_import_lib Clippy fixes 2023-05-09 06:49:45 -07:00
lfs_protocol update to rust 1.64.0 2022-09-27 15:18:58 -07:00
lfs_server Upgrade rustls to 0.21 across all third party packages 2023-05-19 12:39:46 -07:00
manifest (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
megarepo_api add retries to move_bookmark call 2023-05-23 07:33:20 -07:00
mercurial non-oss work 46/n 2023-05-22 04:31:14 -07:00
metaconfig add repo config for specifying preloaded commit graph blobstore key 2023-05-22 15:15:01 -07:00
microwave Update clap from 4.1.11 to 4.2.4 2023-04-25 12:13:11 -07:00
mononoke_api Using BonsaiTagMapping in GitImport and RemoteGitImport 2023-05-30 12:20:40 -07:00
mononoke_api_hg used cached version of API 2023-05-25 06:40:27 -07:00
mononoke_configs (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
mononoke_hg_sync_job commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
mononoke_repos Worker per repo 2023-01-23 07:52:47 -08:00
mononoke_types non-oss work 50 2023-05-22 04:31:14 -07:00
mutable_counters Log mutable counters to ODS 2022-12-09 09:24:56 -08:00
mutable_renames Update ref-cast from 1.0.12 to 1.0.16 2023-04-25 12:08:03 -07:00
newfilenodes (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
observability update regex to 1.6.0 2022-10-31 21:28:04 -07:00
permission_checker (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
phases add new ods logging for bookmark fetching from phases crate 2023-05-31 13:57:24 -07:00
pushrebase commit_graph: replace RangeNodeStream usages with new commit graph range_stream (conditional on a tunable for critical ones) 2023-04-28 10:24:20 -07:00
pushrebase_mutation_mapping test_repo_factory: add method for building warm bookmarks cache 2023-04-25 12:45:33 -07:00
quiet_stream (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
rate_limiting bump version to 0.1.2 2022-10-20 12:08:11 -07:00
reachabilityindex Remove unused raw-api feature from dashmap crate 2023-05-22 10:38:20 -07:00
repo_attributes non-oss work 67/n 2023-06-02 02:52:32 -07:00
repo_authorization test_repo_factory: add method for building warm bookmarks cache 2023-04-25 12:45:33 -07:00
repo_client commit_graph: replace usages of LeastCommonAncestorsHint::is_ancestor and ReachabilityIndex::query_reachability (conditional on a tunable) (except in ChangesetPathContext) 2023-05-23 11:26:11 -07:00
repo_factory Add facet to interact with deletion log db 2023-05-30 02:01:31 -07:00
repo_import Refactor of gitimport codebase 2023-05-05 02:01:07 -07:00
revset (reland) rust/third-party: update to futures 0.3.28 2023-04-04 10:14:43 -07:00
scs Implement endpoint for creating tagged changeset 2023-05-16 14:27:05 -07:00
scs_server Using BonsaiTagMapping in GitImport and RemoteGitImport 2023-05-30 12:20:40 -07:00
segmented_changelog sql: add sqlite callbacks 2023-04-13 06:39:07 -07:00
server Upgrade rustls to 0.21 across all third party packages 2023-05-19 12:39:46 -07:00
sshrelay third-party/rust: add experimental feature to zstd 2023-02-23 09:28:19 -08:00
statistics_collector derived_data/mercurial_derivation: reorganise file layout 2023-04-13 06:39:07 -07:00
streaming_clone Update clap from 4.1.11 to 4.2.4 2023-04-25 12:13:11 -07:00
tests Log create_bookmark error in gitimport 2023-06-02 06:52:56 -07:00
time_window_counter bump version to 0.1.2 2022-10-20 12:08:11 -07:00
tools non-oss work 61/n 2023-05-31 04:50:12 -07:00
tunables mononoke_api: implement an alternative to ChangesetPathHistoryContext::history using the new commit graph 2023-05-30 11:47:19 -07:00
walker Remove unused raw-api feature from dashmap crate 2023-05-22 10:38:20 -07:00
wireproto_handler backsyncer: remove connections from TargetRepoDbs 2023-04-12 01:48:40 -07:00
Cargo.toml third-party/rust: update text_placeholder with https://github.com/bernardoamc/text-placeholder/pull/7 2023-06-02 03:29:24 -07:00
README.md mononoke: README.md update 2022-02-21 02:23:21 -08:00

Mononoke

Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.

Caveat Emptor

Mononoke is still in development. We are making it available now because we plan to start making references to it from our other open source projects.

The version that we provide on GitHub is omitting some functions.

This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:

  • Support for running thrift based apis.
  • Production metadata SQL support (e.g. something like a MySQL backend). We provide sqlite in OSS for now.
  • Production blobstore storage backends (e.g. something like S3). We provide SQL (on sqlite) and File System backends currently in OSS.

Linux is Mononoke's primary target plaform with OSS CI also running on MacOS. Other Unix-like OSes may be supported in the future.

Subsystem Docs

Most of our documentation is in internal systems, however a few subsystems have in-repo markdown docs available: