Commit Graph

61648 Commits

Author SHA1 Message Date
Stefan Filip
451d6758ec edenapi: add segmented changelog clone endpoints
Summary:
Transfers iddag flat segments along with the head_id that should be use to
rebuild a full fledged IdDag. It also transfers idmap details. In the current
version it only transfers universal commit mappings.

Reviewed By: krallin

Differential Revision: D24808329

fbshipit-source-id: 4de9edcab56b54b901df1ca4be5985af2539ae05
2020-11-11 22:53:38 -08:00
Stefan Filip
3ffb223968 config: add SegmentedChangelog that downloads dag for functionality
Summary:
Under this configuration SegmentedChangelog Dags (IdDag + IdMap) are always
downloaded from saves. There is no real state kept in memory.

It's a simple configuration and somewhat flexible with treaks to blobstore
caching.

Reviewed By: krallin

Differential Revision: D24808330

fbshipit-source-id: 450011657c4d384b5b42e881af8a1bd008d2e005
2020-11-11 22:53:38 -08:00
Stefan Filip
3446a65526 segmented_changelog: add SegmentedChangelog::clone_data
Summary:
Constructs and returns `CloneData<ChangesetId>`. This object can then be used
to bootstrap a client dag that speaks bonsai commits.
Short term we are going to be using this data in the Mercurial client which
doesn't use bonsai. Hg MononokeRepo will convert it.

Long term we may decide that we want to download cached artifacts for
CloneData.  I don't see an issue getting there, I see this as a valid path
forward that cuts down on the configuration required to get to the cached
artifacts.  All that said, I think that using whatever dag is available in
memory would be a viable production option.

Reviewed By: krallin

Differential Revision: D24717915

fbshipit-source-id: 656924abb4bbfa1a11431000b6ca6ed2491cdc74
2020-11-11 22:53:37 -08:00
Stefan Filip
59d8ccf690 segmented_changelog: add SegmentedChangelogManager
Summary: The SegmentedChangelogManager abstracts saving and loading Dags. This is currently used in the tailer and seeder processes. It will also be used to load dags while the server is running.

Reviewed By: krallin

Differential Revision: D24717925

fbshipit-source-id: 30dff7dfc957f455be6cf733b20449c804511b43
2020-11-11 22:53:37 -08:00
Stefan Filip
e5ada2f396 types: add WireCloneData
Summary: Serialization format for dag's CloneData.

Reviewed By: quark-zju

Differential Revision: D24717926

fbshipit-source-id: 51f3aa189260a4062cfd75e412b98defd2a8cf94
2020-11-11 22:53:37 -08:00
Xavier Deguillard
596d54adfe prjfs: properly format the placeholder warning
Summary:
The XLOG_EVERY_MS doesn't use the 3rd argument as a format string, it just
prints it verbatim. To format it, we need to use fmt::format.

Reviewed By: genevievehelsel

Differential Revision: D24906819

fbshipit-source-id: 7d45787301086fb87dd8f5d478af8007df82c0b6
2020-11-11 21:46:35 -08:00
svcscm
184bae8882 Updating submodules
Summary:
GitHub commits:

0ac734dd52

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 66943105b147fb5c46e379517095a0a5c6915015
2020-11-11 20:40:06 -08:00
Xavier Deguillard
41ed1bb0d2 prjfs: silence warning in Enumerator
Summary:
The move constructor needs to be noexcept and should also initialize the
members in the right order.

Reviewed By: genevievehelsel

Differential Revision: D24874304

fbshipit-source-id: a3db5dcdab1397b872b8f13ec5c7fd45baad5e6f
2020-11-11 20:00:39 -08:00
Xavier Deguillard
d2f78cafdf pathfuncs: silence warning
Summary:
The components iterator return pieces of the original path, using a reference
makes little sense and the compiler complains.

Reviewed By: genevievehelsel

Differential Revision: D24873851

fbshipit-source-id: 40d414dcb4a0539167ab4760dfc0095af8245b3a
2020-11-11 20:00:39 -08:00
Xavier Deguillard
018ce042c8 prjfs: fail when directory listing can't add a single entry
Summary:
The documentation for PrjFillDirEntryBuffer states that if no entries could be
added, then the ERROR_INSUFFICIENT_BUFFER errors need to be returned as is, the
code didn't do that.

Reviewed By: chadaustin

Differential Revision: D24764566

fbshipit-source-id: d6411822eac71b2f9aa7cf07858d09115767cc59
2020-11-11 18:32:19 -08:00
svcscm
d70284270c Updating submodules
Summary:
GitHub commits:

44abfd79b2

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 09c8d7bf9f91fcec3ba110c66906fbdffe62a294
2020-11-11 16:36:25 -08:00
Katie Mancini
be0cd8da1e enable skipping Metadata prefetches during eden prefetches
Summary:
This is the plumbing to allow us to skip Metadata prefetching during eden
prefetches. These can trigger  a bunch of wasted network requests
when we are fetching files anyways. (These network requests are wasted since we
fetch the file contents and most of them are being throttled on sandcastle anyways.)

We won't necessarily want to skip metadata prefetching always, we will still want it
for the watchman queries, but for `eden prefetch` will probably want to skip it. This
is why we are making it an option in the GlobParams.

Reviewed By: chadaustin

Differential Revision: D24640754

fbshipit-source-id: 20db62d4c0e59fe17cb6535c86ac8f1e3877879c
2020-11-11 16:30:02 -08:00
svcscm
6c2343b1bc Updating submodules
Summary:
GitHub commits:

13f5b53466
29eab7541f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 3c715163348d78267cdf9c65e3adf51ec5eeed5a
2020-11-11 15:11:22 -08:00
Katie Mancini
7dccb8a49f Implement kill switch for prefetch profiles
Summary:
We will start opting-in and rolling prefetch profiles mvp out to users soon.

This is a switch to allow users to opt-in, us to gradually rollout, and to
quickly turn prefetch profiles off if this causes issues for users.

Reviewed By: genevievehelsel

Differential Revision: D24803728

fbshipit-source-id: 0456f2a733958b495e5d84f7177c99f3ef481f57
2020-11-11 13:44:53 -08:00
Mark Juggurnauth-Thomas
bfc7614037 skeleton_manifest: implement skeleton manifest derivation
Summary: Implement derivation of skeleton manifests.

Differential Revision: D24787534

fbshipit-source-id: e55d053a717fe052fc4da69bd9034784b356b7cc
2020-11-11 13:23:48 -08:00
Mark Juggurnauth-Thomas
89957422b8 tests_utils: allow all MPaths in created commits
Summary:
Allow users of `tests_utils` to create paths that are not `String`, by supporting any type
that can be converted into `MPath`.

Reviewed By: StanislavGlebik

Differential Revision: D24887002

fbshipit-source-id: 47ad567507185863c1cfa3c6738f30aa9266901a
2020-11-11 13:23:48 -08:00
Mark Juggurnauth-Thomas
491f15430b mononoke_types: add skeleton manifests
Summary:
Add type definitions for skeleton manifests.

Skeleton manifests are manifests that correspond to the shape of the repository (which directories and files exist), but do not include anything relating to the content.  This means they only change when files are added or deleted.

They are used for two purposes:

* To record the count of descendant directories for each directory.  This will be useful for limiting parallelism when doing an ordered traversal of a manifest.  The descendant directory count is a good estimate of the amount of work required to process a directory.
* To record whether a directory, or any of its subdirectories, contains a case conflict.  This will be used to enforce case-conflict requirements in repos.

Differential Revision: D24787535

fbshipit-source-id: 7cb92546ed80687d5b98a6c00f9cd10896359b8d
2020-11-11 13:23:48 -08:00
svcscm
d3d62feeb1 Updating submodules
Summary:
GitHub commits:

5fc5dfd8a6

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 088529f490158b81401400678690bb03870053fb
2020-11-11 12:48:57 -08:00
Kostia Balytskyi
9a127ec87d scuba: don't require static keys in log_with_msg
Summary: No need to be so strict.

Reviewed By: ahornby

Differential Revision: D24868465

fbshipit-source-id: f7b18d1d1848d8580c9c56e42f3e5f43874b5273
2020-11-11 12:40:13 -08:00
svcscm
e869c8e654 Updating submodules
Summary:
GitHub commits:

cab91eb2e0

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 928d68a9d051b0a1b5ec9ead2843490a1b17f348
2020-11-11 11:37:46 -08:00
Xavier Deguillard
a810f38e6b notifications: support Windows
Summary:
On Windows, /bin/sh doesn't exist. To spawn a command in a shell, we need to
use Powershell.

Reviewed By: genevievehelsel

Differential Revision: D24864355

fbshipit-source-id: 3bcf630a90e644a31ff9db8fea9891476cad641d
2020-11-11 09:37:56 -08:00
Xavier Deguillard
6190da15f6 eden-config: update the default etc directory on Windows
Summary:
On Windows, we've stored the configs in C:/ProgramData/Facebook/eden for a
while now, let's make sure the compiled in values reflect that.

Reviewed By: genevievehelsel

Differential Revision: D24864358

fbshipit-source-id: 2ff27554b36713d31a89b4d1802e6d7c8707cde5
2020-11-11 09:37:56 -08:00
Xavier Deguillard
adcc8f07ea utils: add a quoting test for SpawnedProcess
Summary:
While doing notifications, I struggled a bit to get them working and thought
the special quoting on Windows didn't work as expected. It turns out the error
was cmd related and using a modern shell (PowerShell) fixed it.

Having a test for the quoting is a good idea nonetheless, so let's have one.

Reviewed By: genevievehelsel

Differential Revision: D24864357

fbshipit-source-id: 6b1ac50f3b7b1ef469378d5de21f56c24c0945f9
2020-11-11 09:37:56 -08:00
Mark Juggurnauth-Thomas
0eb32649a6 segmented_changelog: resync autocargo
Summary: The `dag` dependency now generates a `for-tests` feature requirement.

Reviewed By: sfilipco, krallin

Differential Revision: D24888944

fbshipit-source-id: 6da646d71ae99118dcdc33673565056462a4c8ad
2020-11-11 09:31:42 -08:00
Liubov Dmitrieva
b83f4e3243 remove old subscription
Summary:
BE: remove old subscription to save resources in IceBreaker. The client code will recreate it anyway if missing but cleaning up will help us to reduce number of unused subscriptions.

Classic example: repo opsfiles or configerator maybe needed once and then a user don't use

Another example: switching workspaces failed and it could be result in subscriptions are not cleaned up properly

Reviewed By: markbt

Differential Revision: D24859931

fbshipit-source-id: 6df6c7e5f95859946726e04bce8bc8f3ac2d03df
2020-11-11 05:17:47 -08:00
Mateusz Kwapich
bbe73967c4 tweaks to aid with bundle debugging
Summary:
Those are the tweaks I've made to make `--config devel.bundle2.debug` more
verbose to aid with my investigation. This might help somebody else in the
future so let's comit it:

 * added "params" decoding to debugsendbundle
 * added "message" to  `error:unsupportedcontent` part (we already send it with
   some other error parts)

Reviewed By: sfilipco

Differential Revision: D24840405

fbshipit-source-id: b25d5823d05f3d50230c078e8db459dc66256707
2020-11-11 04:57:31 -08:00
Alex Hornby
966f34bba8 mononoke: generate walker EdgeType::outgoing_type()
Summary:
Generate walker EdgeType::outgoing_type() to reduce boilerplate

When defining edges if the edge variant and destination node at the same no extra parameters needed.  If they are different then the node type of destination is passed in parens, e.g. BonsaiParent(BonsaiChangeset)

Reviewed By: StanislavGlebik

Differential Revision: D24687828

fbshipit-source-id: 1616c786d78242c2b3a8c7a1ba58cc1433ea0a26
2020-11-11 02:27:53 -08:00
Alex Hornby
37487f8361 mononoke: generate walker EdgeType::incoming_type()
Summary: Generate walker EdgeType::incoming_type() to reduce boilerplate

Differential Revision: D24687829

fbshipit-source-id: 6de421e5a8acd2b06fee2c54d1c3586c28bc5be4
2020-11-11 02:27:53 -08:00
svcscm
edc12fb257 Updating submodules
Summary:
GitHub commits:

f396a2eed4
e9bc931d31
237e1435ac
b6e388493b
da31db4596
361e5b0165
bc70833dbe
ecfbc51dee
6c6767f6b1
4a8789df88
810d1bb1f1

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a6d3c2564e17a4a4564bb8d8ba527a8716aeb609
2020-11-11 02:27:53 -08:00
svcscm
e9d27bfb99 Updating submodules
Summary:
GitHub commits:

2dcdbf3de3
7868fb0187
033338eeac
14ff318b03
e5d1dee791
9b9e5c46c4
6fc7297a29
8afdae5b36
3c47bd49f5
82256f200a
17e396fef5
1d3755ca7f

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 46717413c7292a01beac19a70d1a4c04f848dae5
2020-11-10 21:49:54 -08:00
John Reese
d13e0b137f apply pyfmt with usort to opted-in sources
Reviewed By: zertosh

Differential Revision: D24880203

fbshipit-source-id: 2034cdfc2712209e86d3d05c119c58f979b05c52
2020-11-10 21:25:54 -08:00
Stefan Filip
4f70ffdff8 dag: update IdDag::universal_id visibility to public
Summary:
This function is useful in the mononoke to compute the universal commit idmap
that is required for clone.

Reviewed By: quark-zju

Differential Revision: D24808327

fbshipit-source-id: 0cccd59bd7982dd0bc024d5fc85fb5aa5eafb831
2020-11-10 16:47:23 -08:00
Stefan Filip
d00281f8dc dag: add IdDag::flat_segments
Summary:
`flat_segments` are going to be used to generate CloneData. These segments will
be sent to a client repository and are going to bootstrap the iddag.

Reviewed By: quark-zju

Differential Revision: D24808331

fbshipit-source-id: 00bf9723a43bb159cd98304c2c4c6583988d75aa
2020-11-10 16:47:23 -08:00
Stefan Filip
bff5a9ba29 dag: add CloneData
Summary: This is the object that will be used to bootstrap a Dag after a clone.

Reviewed By: quark-zju

Differential Revision: D24808328

fbshipit-source-id: 2c7e97c027c84a11e8716f2e288500474990169b
2020-11-10 16:47:23 -08:00
Stefan Filip
40333a545f dag: rename AssignHeadOutcome to PreparedFlatSegments
Summary:
The goal is to reused the functionality provided by AssignHeadOutcome for clone
purposes.

Reviewed By: quark-zju

Differential Revision: D24717924

fbshipit-source-id: e88f21ee0d8210e805e9d6896bc8992009bd7975
2020-11-10 16:47:23 -08:00
svcscm
45f28a2ff7 Updating submodules
Summary:
GitHub commits:

2fc1da363d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a43492ccbe730c9c606764408562636b5f0edd70
2020-11-10 16:34:34 -08:00
Xavier Deguillard
34598d4337 remove dependency on glog
Summary:
The EdenFS codebase uses folly/logging/xlog to log, but we were still relying
on glog for the various CHECK macros. Since xlog also contains equivalent CHECK
macros, let's just rely on them instead.

This is mostly codemodded + arc lint + various fixes to get it compile.

Reviewed By: chadaustin

Differential Revision: D24871174

fbshipit-source-id: 4d2a691df235d6dbd0fbd8f7c19d5a956e86b31c
2020-11-10 16:31:15 -08:00
Katie Mancini
6e3d9d272e fix eden top on mac
Summary:
There were `eden top` issues on MacOS that I thought had been fixed a while ago,
but it doesn't look like we caught them all. This should catch the remaining bug
in `eden top`.

Reviewed By: genevievehelsel

Differential Revision: D23743199

fbshipit-source-id: ca66748c7a8a26062caf934c8f2c1fd13d9ae69e
2020-11-10 15:30:29 -08:00
svcscm
7a96a69462 Updating submodules
Summary:
GitHub commits:

d7cb04b59a
fbf1598f67
f22f5eca53
60bbd9d607
18aee7db7e
2285b72dfa
83487e179c
670f2083ac
4145bfd224
15628b1a43
4d2c46c53c
e790448d27
179d90d340

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7f5d8935d1e0d3613663c1d0cb7dd15906942f99
2020-11-10 15:30:29 -08:00
svcscm
a96bf7c5d0 Updating submodules
Summary:
GitHub commits:

45b5683e05
3b51ff7ed3
14939ab06e
bfe27697d9
8004d46cfc
3b9754fc4c
e0f575e3c1
899cf5c9fb
051053b945
f5ea61d2a1
c65e09b50c
4ba18b2c6c

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7f14c3861decde0745d9b567dd4d79cdd5a2c833
2020-11-10 14:45:31 -08:00
Davide Cavalca
22a5690f3a proxygen: fix shared libs build
Summary:
Right now proxygen hardcodes a static build when using cmake  and
ignores BUILD_SHARED_LIBS. Fix that, and enable PIE on the shared libs so they
can be linked properly

Closes: https://github.com/facebook/proxygen/issues/335

Reviewed By: mjoras, lnicco

Differential Revision: D24787944

fbshipit-source-id: 7a654af7cb43227ca913a1bed67f2432703a343d
2020-11-10 14:25:15 -08:00
svcscm
e7efbbab02 Updating submodules
Summary:
GitHub commits:

8579152b77
6cd0c17dbe
f05becd783
03fdf51619
27f1e770b7
345e67782e
89636c57f7
ceb88b987c

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f08b3186321f2a637ab5a3c3da9c27e8f374431c
2020-11-10 14:25:15 -08:00
svcscm
1b978c7b3d Updating submodules
Summary:
GitHub commits:

6153577ecb
510ccc8411
16d103d35b
2c9a17b29b
92c5f37b43

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 623420fb9cb7f38c9e4764988b88a7f9daf383a8
2020-11-10 12:18:10 -08:00
Xavier Deguillard
f3b0124f01 prjfs: use a shared_ptr for the context
Summary:
In order to allow request to timeout to display notifications to the user, the
`within` future method will need to be called on the various callback futures.
Unfortunately, once the timeout expires, the underlying future isn't cancelled
and stopped, but the unique pointer holding the context will be reclaimed.
Whenever the future actually completes, it will try to use an invalid pointer,
crashing EdenFS.

To solve this, switch to using a shared_ptr and copy it in the right places so
it will only be freed once all futures holding a reference to it will be gone.

I also took the opportunity to reduce the nesting a bit to make the code more
readable.

Reviewed By: kmancini

Differential Revision: D24809647

fbshipit-source-id: 987d6e5763106fabc6bed3ea00d28b129b5285a1
2020-11-10 09:59:25 -08:00
Xavier Deguillard
4626f30206 utils: actually return an HRESULT from exceptionToHResult
Summary: These errors are Win32 errors, we need to wrap them into a HRESULT.

Reviewed By: chadaustin

Differential Revision: D24809646

fbshipit-source-id: 9f42b9d0c43474967dc26cb2c14cbee463768b79
2020-11-10 09:59:25 -08:00
Robin Håkanson
64523f39c1 Convinience access functions for BonsaiDiffFileChange
Summary: Convinience access functions for BonsaiDiffFileChange

Reviewed By: krallin

Differential Revision: D24715052

fbshipit-source-id: 6eac5dd8ff4ec21a59c82ebe5d3b39386f57baea
2020-11-10 09:39:29 -08:00
Egor Tkachenko
99643e0409 Added verification of generated bonsai changeset between backup and prod repos during blobimport
Summary: It is possible that hash of newly created bonsai_changeset will be different from what is in prod repo. In this case let's fetch bonsai from the prod, to make backup repo consistent with prod.

Reviewed By: StanislavGlebik

Differential Revision: D24593003

fbshipit-source-id: 70496c59927dae190a8508d67f0e3d5bf8d32e5c
2020-11-10 08:46:16 -08:00
Alex Hornby
7c33ddab42 mononoke: use create_graph to generate EdgeType enum in walker
Summary: Use create_graph to generate EdgeType enum in walker to reduce boiler plate needed when adding new derived node and edge types to the walker

Differential Revision: D24687827

fbshipit-source-id: 63337f4136c649948e0d3039529965c296c6d67e
2020-11-10 08:26:54 -08:00
Alex Hornby
72006da99d mononoke: add edge support to create_graph macro
Summary: Prepare for populating edge types programmatically from create_graph

Differential Revision: D24687830

fbshipit-source-id: be109b1dd45ef6cc398b0f7658d9168e8286699c
2020-11-10 08:26:54 -08:00
svcscm
e9495c19d4 Updating submodules
Summary:
GitHub commits:

d46040f952

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 62aa8e43a2f22bdcff99e19d8fefc5b422e626a5
2020-11-10 08:23:27 -08:00