Commit Graph

66203 Commits

Author SHA1 Message Date
Jun Wu
e396cab669 dag: include roots in pull data
Summary:
The roots data will be useful for the client to check if the pulled commits are
going to overlap with its existed DAG.

Reviewed By: andll

Differential Revision: D29363808

fbshipit-source-id: e09d924d65537f59fd4ea209b568265d07a80e46
2021-06-24 15:12:58 -07:00
Jun Wu
21e2bdd709 dag: sever => server
Summary: Minor spelling fix.

Reviewed By: andll

Differential Revision: D29363812

fbshipit-source-id: 58393ddac058e1e63182aa5bc4a85e5dcf04c599
2021-06-24 15:00:35 -07:00
Jun Wu
f8af66d7d2 dag: x..y+1 => x..=y
Summary: Minor change to make the code a little bit more straightforward.

Reviewed By: andll

Differential Revision: D29363801

fbshipit-source-id: 2c4bd6ece07282f044622227a3c077cb31db6d17
2021-06-24 15:00:35 -07:00
Jun Wu
77e8dcc21d dag: minor updates on iddag docstring
Summary: Make the docstring a bit more consistent.

Reviewed By: andll

Differential Revision: D29363798

fbshipit-source-id: 1b4e2a7a1af4c4cffe3693e437a831bab1b43fd7
2021-06-24 15:00:35 -07:00
Andrey Chursin
7ed94dde6a OnDemandUpdateSegmentedChangelog: build up master before generating pull data
Summary: This is required to make sure segmented changelog has all the data needed

Reviewed By: quark-zju

Differential Revision: D29347285

fbshipit-source-id: 82ee1ffca178492b7ad363c53cee7ec57058733f
2021-06-24 13:58:02 -07:00
Andrey Chursin
568237d11c eden_api: implementation for pull_fast_forward_master client request
Reviewed By: quark-zju

Differential Revision: D29342432

fbshipit-source-id: 1a371e707b2e75b155f5abdc343bfb42ba53df5a
2021-06-24 13:58:02 -07:00
Andrey Chursin
dc97c2544a edenapi_service: add fast forward pull handler
Reviewed By: quark-zju

Differential Revision: D29342138

fbshipit-source-id: 056dad3bb7c207b1f0e9d0ee50a95e96ad690254
2021-06-24 13:58:02 -07:00
Andrey Chursin
49bd00fe2c types: introduce fast forward pull wire types
Reviewed By: quark-zju

Differential Revision: D29342139

fbshipit-source-id: 848eceaf5d4a7e88e9830155c0763321ea275c82
2021-06-24 13:58:02 -07:00
Robin Håkanson
4056944213 Add git LFS support to gitimport and grepo branch_forest.
Summary:
Add git LFS support to gitimport and grepo branch_forest.

I did not want to add the parsing of .gitattributes and .lfsconfig to the gitimport library. This needs to be done by the users of gitimport before the import is started, And the GitImportLfs object needs to be configured accordingly. Currently we are extrating this data from the manifest files for the "g"repo imports.

I am not sure the simple git-lfs download client works with other git-lfs server back ends then Dewey. But it is a fairly simple implementation and it should be easy to extend to be more generic.

Reviewed By: farnz

Differential Revision: D29082867

fbshipit-source-id: a7b0272147b3d44a0b6b9782d2a1b8ec94653b8f
2021-06-24 13:49:20 -07:00
Jun Wu
03003242b0 debuginternals: new command to list or export internal states
Summary:
Sometimes we need repo internal states for deeper investigation. Right now
the process is quite adhoc - telling people to figure out where the "backing"
repo is, excluding unwanted files like 00changelog.d, etc. Let's just make
it easier so we have a dedicated command to tar up selected internal states.

Reviewed By: andll

Differential Revision: D29242716

fbshipit-source-id: 85604d0df5b3a12f1aed29e4f31fcd5c166f9066
2021-06-24 12:31:47 -07:00
Stanislau Hlebik
129d4fa88f mononoke: support multiple directories in mononoke_admin rsync
Summary: It's useful to be able to copy multiple dirs at once

Reviewed By: markbt

Differential Revision: D29358375

fbshipit-source-id: f1cc351195cc2c19de36a1b6936b598e314848c3
2021-06-24 11:44:34 -07:00
Stanislau Hlebik
1044dd545d mononoke: support mononoke admin convert for git
Summary:
Previously only conversion between bonsai and hg was supported. Let's add git
as well.

Obviously you can use `scsc lookup`, but mononoke_admin can be useful for repos
that are not on scs yet.

Reviewed By: farnz

Differential Revision: D29360793

fbshipit-source-id: eb2b71eab192b3456ba3d580f7eb8c4a85b2fd1d
2021-06-24 07:32:51 -07:00
Yan Soares Couto
a3e0290fe1 Move CoreContext creation in repo_factory to a new function
Summary: Very simple refactor. This logic was already used twice and I will use it another time in following diffs.

Reviewed By: markbt

Differential Revision: D29033594

fbshipit-source-id: 96040a2eee2b58f6851646e51b67c46c6bf334fe
2021-06-24 06:33:04 -07:00
Mark Juggurnauth-Thomas
728f145e78 ephemeral_blobstore: add ephemeral blobstore
Summary:
Implement get and put for the ephemeral blobstore.  This allows blobs to
be stored and retrieved in bubbles.

Ephemeral bubbles always have a repo associated with them when they are opened,
to simplify blob prefixing.  It is valid for a bubble id to have multiple repos
associated with it, but they must be accessed separately, and in practice this
won't be used.

Reviewed By: StanislavGlebik

Differential Revision: D29067722

fbshipit-source-id: d870f695fc1d0c825fdaec9337c82a13209165ce
2021-06-24 04:13:58 -07:00
Mark Juggurnauth-Thomas
3c9bf458be metaconfig: add ephemeral blobstore config
Summary:
Extend metaconfig to include configuration for the ephemeral blobstore.

An ephemeral blobstore is optional: repos without an ephemeral blobstore cannot
store ephemeral commits or snapshots.

Reviewed By: StanislavGlebik

Differential Revision: D29067719

fbshipit-source-id: fe7d42173d5c34a937c99c72f4b2bd08af503889
2021-06-24 04:13:58 -07:00
Mark Juggurnauth-Thomas
b001dd9ea1 sync repos.thrift from configerator
Reviewed By: StanislavGlebik

Differential Revision: D29067721

fbshipit-source-id: f7d792205d0dfa9ad6b2b1ce0845f978f5f3f008
2021-06-24 04:13:58 -07:00
Mark Juggurnauth-Thomas
5716174f8f packblob: generalise key prefixes
Summary:
Packblob currently expects key prefixes of the form `repoNNNN.` to be stripped , but also allows keys without this prefix. For the ephemeral blobstore we want to allow prefixes of the form `ephXXX.repoNNNN.` as well.

Generalise packblob so that we can have multiple key prefixes.

Packblob will enforce that none of the blobs in the packblob have a prefix that matches any of the patterns - this will prevent us from accidentally storing `repoNNNN.`-prefixed blobs in an ephemeral blobstore that requires `ephXXX.repoNNNN.` prefixes, for example.

Reviewed By: liubov-dmitrieva

Differential Revision: D29067720

fbshipit-source-id: 953909d47c9c4af91b529bcc684340d26411463d
2021-06-24 04:13:58 -07:00
Alex Hornby
196ade1c06 mononoke: extract chunking params in walker
Summary: Make it clearer which of the TailParams are only required when chunking, removing parallel Option<> so that all items that should be set together are inside one optional item.

Reviewed By: farnz

Differential Revision: D29264647

fbshipit-source-id: d64cddf94b35e62d6e50cd8afe906eef2444c730
2021-06-24 01:49:39 -07:00
Alex Hornby
3d59baacd5 mononoke: check if chunking in walker defer_visit()
Summary: Makes defer_visit return result, so we can detect if it is called when not chunking.

Reviewed By: farnz

Differential Revision: D29268346

fbshipit-source-id: b8ea503c2848adb5d7ca3fb0e61399be2930c3de
2021-06-24 01:49:39 -07:00
Xavier Deguillard
b73322e5ea service: increase timeout for DaemonStartupLoggerTest.daemonClosesStandardFileDescriptors
Summary:
It looks like 20s might not be sufficient anymore as the test is failing too
frequently with `wait` completing without the process having completed:

```
eden/fs/service/test/StartupLoggerTest.cpp:352: Failure
Expected equality of these values:
  "exited with status 0"
  returnCode.str()
    Which is: "running"
eden/fs/service/test/StartupLoggerTest.cpp:363: Failure
Value of: isWritablePipeBroken(fd)
  Actual: false
Expected: true
```

Reviewed By: kmancini

Differential Revision: D29342002

fbshipit-source-id: d457b632a2666356e9053d2da66a3227e6524b68
2021-06-23 22:04:52 -07:00
Meyer Jacobs
bbe46dcf06 scmstore: avoid empty remote requests in TreeStore
Summary: Verify we actually have pending keys to fetch before attempting a remote request in scmstore TreeStore.

Reviewed By: kulshrax

Differential Revision: D29345214

fbshipit-source-id: 328bdcbc41429e59de6ceb488533bafa97518fcc
2021-06-23 19:27:26 -07:00
Arun Kulshreshtha
7ffa37c5e9 pyedenapi: use block_unless_interrupted instead of block_on_future
Summary: Previously, it was not possible to interrupt `hg` during EdenAPI fetch operations. This made it impossible to interrupt long-running fetches, which is very frustating to users. This can be simply fixed by using `block_unless_interrupted` in place of `block_on`.

Reviewed By: quark-zju

Differential Revision: D29344670

fbshipit-source-id: 3b0d36dda28f5f7cc812a07981f295f8d0fbdd8a
2021-06-23 19:01:22 -07:00
Andrey Chursin
fc47068389 debugsementpull: introduce debug command to pull using segmented chanelog
Summary:
This is simple command mostly to be used by testing before we fully integrate with hg pull

This command does not perform discovery and requires from/to revision to be passed in cmd line

Reviewed By: quark-zju

Differential Revision: D29315647

fbshipit-source-id: 26d67031e566b7c99af1e2a5ab287f02b52f7db0
2021-06-23 17:58:26 -07:00
Xavier Deguillard
27b55303ee Back out "Enable fb dynamicconfig loading inside eden backingstore"
Summary: This is breaking the Windows release, reverting.

Reviewed By: fanzeyi

Differential Revision: D29339787

fbshipit-source-id: 22d8ff5db5619194e4597754dc37343cf0bc3286
2021-06-23 16:45:43 -07:00
Meyer Jacobs
5e9a33e11e tests: fix test-fb-hgext-treemanifest-peertopeer.t on mactest
Summary: `|&` apparently fails on mactest, so I've replaced it with `2>/dev/stdout | ` which works on my devserver and macbook.

Reviewed By: andll

Differential Revision: D29337621

fbshipit-source-id: eaac2592f4c7bfda6696c2500f3b08441b596c39
2021-06-23 16:11:41 -07:00
Meyer Jacobs
640767d414 scmstore: track contentstore fallbacks
Summary:
Introduce basic contentstore fallback tracking to help monitor the scmstore shim rollout.

This will be expanded to a general fetch metrics system for scmstore in a future change.

Reviewed By: kulshrax

Differential Revision: D29305839

fbshipit-source-id: c6cc3ea15a3bb7b90f4ec298febc911ec4e2af91
2021-06-23 15:26:26 -07:00
Andrey Chursin
ea95fbdee8 api: introduce segmented_changelog_pull_fast_forward_master
Reviewed By: quark-zju

Differential Revision: D29319057

fbshipit-source-id: 88ff9e1f4acc0109c8a1e4978914f84832ebeb36
2021-06-23 14:51:39 -07:00
Andrey Chursin
f9b85a5a93 segmented_changelog: impl for ReadOnlySegmentedChangelog::pull_fast_forward_master
Summary: This is rougly similar to algorithm in NameDag

Reviewed By: quark-zju

Differential Revision: D29318721

fbshipit-source-id: 51a9123daa2b4cf0fbe2346a8a0c7e75172d9afb
2021-06-23 14:51:39 -07:00
Andrey Chursin
b13454d54b segmented_changelog: introduce SegmentedChangelog::pull_fast_forward_master
Summary: The naming is used in other parts of dag crate - this introduce mononoke side binding for corresponding functions on dag side

Reviewed By: quark-zju

Differential Revision: D29318722

fbshipit-source-id: e9eea5536b041b6ab2ce578914817bca43a10d48
2021-06-23 14:51:39 -07:00
Andrey Chursin
c37c61cc0d pydag: add importpulldata binding
Reviewed By: quark-zju

Differential Revision: D29317065

fbshipit-source-id: 19597b72cd3c210f43425df30fbe7e2312e33370
2021-06-23 14:51:39 -07:00
Zhengchao Liu
1f9541251f utils: add ImmediateFuture::ensure
Summary:
We are adding tracing to nfs. To record the elapsed time of a call, we need to invoke a callback when future is ready (has value or exception). For fuse, this is done with `Future::ensure`. Nfs is using `ImmediateFuture`, so I am adding `ImmediateFuture::ensure` accordingly.

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/fbcode/eden/fs/fuse/FuseChannel.cpp?commit=64091acc4e2905bfb58b4795e705fa6b554c487c&lines=1733-1735

Reviewed By: chadaustin

Differential Revision: D29278838

fbshipit-source-id: 176d6361a0ef1dd4a89db470acbb36b4868e04ef
2021-06-23 14:23:40 -07:00
Xavier Deguillard
864ead9e24 glob: fix ** glob take 2
Summary:
In D29079762 (ea2e2f8bbd), globbing was fixed to not match the recursive glob (**) against
the entire path, as this would lead some paths to be matched while they
shouldn't. It however introduced another bug: in some cases, recursive globs
would no longer match paths that should be matched.

To fix both, a partial revert of the original diff is done with a small tweak:
the path that is matched against no longer starts at the root of the
repository. This will prevent `a/b/**/b/c.txt` to match `a/b/c.txt` as
`**/b/c.txt` would only be matched against `c.txt`, and not `a/b/c.txt` like it
was previously.

Reviewed By: fanzeyi

Differential Revision: D29175333

fbshipit-source-id: 1a4137d6f64f6cb77c4be09bd143f72630aa58d5
2021-06-23 14:11:32 -07:00
Chad Austin
2e86fbbb02 move watchman includes into their own directory
Summary:
Bring Watchman closer to the EdenFS file name convention by moving
source files and includes into watchman/.

Reviewed By: fanzeyi

Differential Revision: D29242789

fbshipit-source-id: 6e29a4a50e7202dbf6b603ccc7e4c8184afeb115
2021-06-23 12:14:35 -07:00
Katie Mancini
6147429197 cli: do not block eden rm on aux process
Summary:
When buck kill fails, eden rm will also fail. This has caused some checkouts
to not be removed when they could be. Stopping aux processes is a nice thing
to do before we unmount. It ensures these processes close file handles in the
mount, but we force unmount anyways so open file handles should not be able to
block the umount call.

Reviewed By: xavierd

Differential Revision: D29205962

fbshipit-source-id: a899940efa5cc1d960cd14a775b7053c34f5d6f2
2021-06-23 10:50:50 -07:00
Stanislau Hlebik
3c14f3c20b mononoke: fix symlink handling in megarepo_api
Summary:
Path should be relative to the symlink path, not to the repo root. This diff
fixes it

Reviewed By: farnz

Differential Revision: D29327682

fbshipit-source-id: a51161a8039a88263fe941562f2c2134aa5d4fef
2021-06-23 04:20:33 -07:00
Xavier Deguillard
f6ecfb8909 cli: remove "Removing buck-out" message on unmount
Summary: This is more confusing than really helpful, thus let's remove the log.

Reviewed By: rkjfb

Differential Revision: D29317007

fbshipit-source-id: 3aba1ab8de7906e193946938aa69b32a09b8e5de
2021-06-22 20:22:41 -07:00
Andrey Chursin
7f54775d00 dag: tests for pull protocol
Reviewed By: quark-zju

Differential Revision: D29177851

fbshipit-source-id: 8c2b35306cc68d9c4d18449fd80e5504bd650031
2021-06-22 18:14:41 -07:00
Andrey Chursin
8c12f1f786 dag: implementation for import_pull_data
Reviewed By: quark-zju

Differential Revision: D29147359

fbshipit-source-id: 0508b48656fda99f37e9e3377a6ac08149bc1dcf
2021-06-22 18:14:41 -07:00
Pyre Bot Jr
ca842ced69 suppress errors in fbcode/eden - batch 1
Differential Revision: D29301094

fbshipit-source-id: 2b0c3dc44295341efb68ae15403cd2df4e837db7
2021-06-22 13:31:57 -07:00
Meyer Jacobs
b5858adee1 scmstore: update remaining tests
Summary: Update the remaining tests for scmstore. In each of these cases we're just disabling scmstore for various reasons. I think `test-lfs-bundle.t` and `test-lfs.t`'s failures represents a legitimate issue with scmstore's contentstore fallback, but I don't think it should block the rollout

Reviewed By: kulshrax

Differential Revision: D29289515

fbshipit-source-id: 10d055bf679db8efdeb16ac96b7ed597d7b6d82c
2021-06-22 13:14:58 -07:00
Meyer Jacobs
015f5864d2 scmstore: fix deadlock in write
Summary:
Prevent `FileStore` from deadlocking when a write falls back to contentstore and attempts to write to the same indexedlog_local which is held lock for the batch.

Note: this shouldn't need to block release, we current expect writing raw LFS pointers to only happen with non-remotefilelog LFS.

Reviewed By: kulshrax

Differential Revision: D29299050

fbshipit-source-id: bf39f87b9956165a558f3a19960d3d055685db9a
2021-06-22 13:14:58 -07:00
Stanislau Hlebik
56c926297f mononoke: reuse hg manifest from parents if they are identical
Summary:
This is a followup from D28903515 (9a3fbfe311). In D28903515 (9a3fbfe311) we've added support for reusing
hg filenodes if parent has the same filenode. However we weren't reusing
manifests even if parent has an identical manifest, and this diff adds a
support to do so.

There's one caveat - we try to reuse parent manifests only if there are more
than one parent manifest. See explanation in the comments.

Reviewed By: farnz

Differential Revision: D29098908

fbshipit-source-id: 5ecfdc4b022ffc7620501cc024e7a659fb82f768
2021-06-22 11:50:02 -07:00
Andrey Chursin
70857500c7 sparse: fix size calculation on the file outside of sparse profile
Summary:
When user runs hg diff between revision and working copy, and if the diff contains file that is not present in working copy because of it's sparse profile, then hg diff fails

Failure happens because hg diff tries to compare file sizes and calculating file size on workingfilectx fails, because file does not exists.

This diff overwrites size function for workingfilectx in the sparse extension to protect against that, similarly how it is already done for data function

Differential Revision: D29279691

fbshipit-source-id: 55d7843d23370c31693a32a0e1df8b882db0d89d
2021-06-22 11:22:30 -07:00
Thomas Orozco
f747bef553 eden: allow buck v2-compatible log category in log test
Summary:
Buck v2 builds from the root of the repo, not the current cell. This means that
the inferred logger name ends up being different.

We're going to need to fix this generally because otherwise it'll change logger
names for everyone (I'm tracking this in T93776519), but in the interest of not
having one Eden test arbitrarily failing on Buck v2 let's update this
with a workaround for now.

Reviewed By: genevievehelsel

Differential Revision: D29270388

fbshipit-source-id: 6968d9b6195a5eed7bd4018b161e12d88f78a421
2021-06-22 04:43:31 -07:00
Thomas Orozco
7cf93a723f eden: update start_test to pass path to edenfs binary
Summary:
Like in many of the other cases, this needs to be told where the Eden binary
is instead of assuming it's right next to the edenfsctl binary, because on Buck
2 it's not.

Reviewed By: xavierd

Differential Revision: D29265845

fbshipit-source-id: 756bd863dc7d18eaf25a9ee209a9fd59345e6b5d
2021-06-22 04:43:31 -07:00
Andres Suarez
fc37fea20c Update itertools 0.8.2 to 0.10.1
Reviewed By: dtolnay

Differential Revision: D29286012

fbshipit-source-id: 6923c0b750692e6932e85fd539b076b172ff43b7
2021-06-22 04:09:00 -07:00
Jan Mazur
5830589a71 Enable fb dynamicconfig loading inside eden backingstore
Summary: Enable fb dynamicconfig loading inside eden backingstore

Reviewed By: fanzeyi, xavierd

Differential Revision: D29212009

fbshipit-source-id: 79f3ab1a5764101c37dcf3e4676c0c0394d88d40
2021-06-22 02:17:32 -07:00
Alex Hornby
4c94a2bfc3 mononoke: no need to revisit deferred nodes in OldestFirst mode
Summary:
In the walker, an Option<NodeData> value of None is used to indicate that no data could be found for a node, and that for derived data mappings we should try again to load it later, when it may have been derived.

When a node is outside the chunk boundary this isn't appropriate,  we should just mark as visited and move on, which is what this change does.

Reviewed By: farnz

Differential Revision: D29230223

fbshipit-source-id: c2afdee9b914af89c7954c8e6a7d17a174df7ed1
2021-06-22 01:41:39 -07:00
Xavier Deguillard
5bcd1c5a39 Back out "pool eden thrift connections"
Summary:
I'm suspecting that it is causing some broken pipe errors that aren't
resolving themself.

Reviewed By: kmancini

Differential Revision: D29279304

fbshipit-source-id: cfbf2261f2ac7dd7ec8b3311d1e27a0b9e160de4
2021-06-21 20:52:57 -07:00
Meyer Jacobs
43a75431bb scmstore: update additional test
Summary: Only four tests remaining after this.

Reviewed By: kulshrax

Differential Revision: D29229656

fbshipit-source-id: 56c0a17f6585263e983ce8bc3c345b1f266422e0
2021-06-21 20:32:50 -07:00