sapling/eden
Kostia Balytskyi e4ca9347b8 megarepo: impl config adding methods
Summary:
This diff wires up actual `scs_server` methods `megarepo_add_sync_target_config`, `megarepo_add_sync_target`, `megarepo_add_sync_target_poll` to the underlying logic in the `CfgrMononokeMegarepoConfigs`.

One of these is a synchronous method (`megarepo_add_sync_target_config`), so it is implemented properly. This method only allows adding new configs to an existing target.

The other two are a pair of async methods (create reqest + poll request) for target creation with an initial config. On the one hand, we don't yet have any infrastructure for async methods, so properly implementing this pair is not possible. What's more, target creation is a two-part operation: save a config + create an initial repo commit. Second part is not yet implemented at all (and is what requires async implementation, as it is going to be expensive). On the other hand, I would like to expose the concept of target creation for the client to test, that's why I add `FAKE_ADD_TARGET_TOKEN` to mask a so-far synchronous impl of this method as asynchronous.

Once I implement async methods, I will come back and work on a proper `megarepo_add_sync_target` impl (this is the first method to be implemented).

Important: any use of these methods now should be considered experimental, and we'll have to delete all of these configs later (because all of the targets won't have any corresponding bookmarks in the real repos, which makes them invalid).

Reviewed By: StanislavGlebik

Differential Revision: D27885979

fbshipit-source-id: 9e2a914af1a7db2ec00ffa11a832ddd71fd19d0f
2021-04-26 09:43:42 -07:00
..
fs utils: expand AbsolutePathBase to provide some filesystem related methods via Boost 2021-04-23 15:22:09 -07:00
hg-server hg-server: fix autocargo lints 2021-04-23 01:58:57 -07:00
integration nfs: run most integration tests on edenfs 2021-04-23 13:30:17 -07:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke megarepo: impl config adding methods 2021-04-26 09:43:42 -07:00
scm py3: fix conflict resolution case handling 2021-04-23 18:04:11 -07:00
test_support test_support: fix rmtree error function 2021-04-08 19:00:42 -07:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00