Commit Graph

66031 Commits

Author SHA1 Message Date
Yan Soares Couto
24081bcf9b Sync redaction thrift files
Summary:
Syncing thrift files from D28931534

Will use it in following diffs

Reviewed By: farnz

Differential Revision: D28937805

fbshipit-source-id: d3ea22ae2c402aa244f3972d9a70516776f77a11
2021-06-08 07:16:45 -07:00
Mateusz Kwapich
98f21e7cb2 add support for syncing merge commits
Reviewed By: StanislavGlebik

Differential Revision: D28887334

fbshipit-source-id: 909a3948df75312767dda8d2f184c0a885a56962
2021-06-08 05:49:01 -07:00
Mateusz Kwapich
59fc317881 add support for copyfiles in test util
Summary: I need it for test in next diff

Reviewed By: StanislavGlebik

Differential Revision: D28959433

fbshipit-source-id: c67ca7eec03f94425332e446f6f97038edff598d
2021-06-08 05:49:01 -07:00
Mateusz Kwapich
eb0290d82a extract last_synced_commit to method
Summary:
Summar:
I'll be using it more in the next diff, so why not have it in it's own method.

Reviewed By: StanislavGlebik

Differential Revision: D28887333

fbshipit-source-id: 35accb495a577e1c01ec8114fc60acf38ed11fee
2021-06-08 05:49:01 -07:00
Mateusz Kwapich
f29792433d add a way to reorder parents during rewrite
Summary:
When syncing merge commits with two parents it would be nice if it was the first parent that comes from the unified branch. In **case of octopus merges** we really don't want
the parent in unified branch to be third (that would turn the sync into
non-forward move!). Let's add a way to tell the commit rewriter which parent
needs to be first.

Reviewed By: farnz

Differential Revision: D28885488

fbshipit-source-id: 57a081ce2d285ba2b6d6d98110cd1c64a241548e
2021-06-08 05:49:01 -07:00
Mateusz Kwapich
fed6a478a8 move create_single_move_commit to common
Summary: I'm planning to reuse it in syncing merge commits.

Reviewed By: farnz

Differential Revision: D28885489

fbshipit-source-id: 6035c0e7290f137b723b73e656b73d4f78e2da9d
2021-06-08 05:49:01 -07:00
Thomas Orozco
0a633f9bf8 eden: pass path to overlay test data via Buck
Summary:
Like it says in the title. Right now this dependency is invisible to Buck so
we rely on reading it from the checkout. However, while this works on Buck 1
(I guess we run the tests from the repo root), it doesn't work Buck 2, and it
won't work if we try to run those tests remotely.

Let's make the dependency explicit!

Reviewed By: xavierd

Differential Revision: D28936482

fbshipit-source-id: 71c4a492c33f586abe6b721b90898f5424c06e94
2021-06-08 04:21:08 -07:00
CodemodService Bot
8cddb36cf2 Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D28957848

fbshipit-source-id: 80ce3c197a09bc924a8920aedb7c7fb093760dd3
2021-06-08 03:55:06 -07:00
Stanislau Hlebik
5c1c803ffd mononoke: add method to mononoke admin to count underived ancestors
Summary: It can be useful to understand how many ancestors are not derived yet.

Reviewed By: Croohand

Differential Revision: D28902194

fbshipit-source-id: 87c11b3e35ba7f67122990318ff07408c47d4d6c
2021-06-08 00:03:51 -07:00
Chad Austin
bb1cccac89 introduce a variable-width RootId type that identifies the root of an EdenFS checkout's contents
Summary:
Backing stores differentiate between individual tree objects and the
root of a checkout. For example, Git and Mercurial roots are commit
hashes. Allow EdenFS to track variable-width roots to better support
arbitrary backing stores.

Reviewed By: genevievehelsel

Differential Revision: D28619584

fbshipit-source-id: d94f1ecd21a0c416c1b4933341c70deabf386496
2021-06-07 17:25:31 -07:00
Xavier Deguillard
6fef47388c cli: default to using NFS on Apple Silicon
Summary:
Making it the default should make cloning using EdenFS easier and will remove
the need to manually pass the `--nfs` command line to `eden clone`.

Reviewed By: kmancini

Differential Revision: D28913818

fbshipit-source-id: 742c35c950cb5edf34fd9769fb78bf26095af0d5
2021-06-07 16:52:16 -07:00
Durham Goode
9aa2e6a7bf make: remove 'make local'
Summary:
Now that we don't publish any Python 2 packages, let's drop make local.
Once we've confirmed that nothing was using make local, we can rename make
local3 to be make local.

Reviewed By: kulshrax

Differential Revision: D28647154

fbshipit-source-id: de277887e93a6dbc0324a30f592198ef7c83f818
2021-06-07 16:46:18 -07:00
Durham Goode
40f304d428 run-tests: more Python 3 fixes
Summary:
More things needing fixing to be python 3 compatible. Caught when
trying to remove the Python 2 build.

Reviewed By: quark-zju

Differential Revision: D28880028

fbshipit-source-id: d162c78237f330f1f931c3581b25ead24e3ea375
2021-06-07 16:46:18 -07:00
Durham Goode
8a679138dd windows: fix local clones
Summary:
The combination of metalog and the new clone pattern of first creating
the repo causes local copy clones to fail on Windows because the initial metalog
files are held open and the copy can't overwrite them.

Let's drop the destrepo before we do the local copy.

Reviewed By: quark-zju

Differential Revision: D28880029

fbshipit-source-id: 2a4ef52675eebf16afa528e645acd927a6110cb4
2021-06-07 16:46:18 -07:00
Mateusz Kwapich
4468f88fad grep out the unstable output
Summary:
The position the the lines with "count:" is undeterministic. Let's skip
matching them for now to unblock test.

Reviewed By: mzr

Differential Revision: D28940741

fbshipit-source-id: c05521722f838e7b72572a0cf67d3ebbc3b26868
2021-06-07 13:51:50 -07:00
Jan Mazur
3054c4eb63 send additional data identifying client
Summary: This will be used for rate limiting decisions. Also, could be logged to scuba tables to get more info about clients.

Reviewed By: quark-zju

Differential Revision: D28750197

fbshipit-source-id: 83f54e38f998c9dd824ef2d3834c777a44d0ffed
2021-06-07 06:38:37 -07:00
Jan Mazur
b5c73dde5b x2pagentd for LFS
Summary: Let clients connect to lfs with HTTP through unix socket so we don't have to worry about certificates presence.

Reviewed By: johansglock

Differential Revision: D28683392

fbshipit-source-id: f6228b4099ef04fe584e320cb1892e6cb513e355
2021-06-07 04:57:49 -07:00
Alex Hornby
751be5de5c mononoke: set update_timestamp on updated walker checkpoints
Summary: The update timestamp field of the walker_checkpoints wasn't being set on updates.

Reviewed By: Croohand

Differential Revision: D28871609

fbshipit-source-id: b8873ec494f6671ef27b0243a8b2fb373a7313e8
2021-06-07 04:32:43 -07:00
CodemodService Bot
254d2a37ad Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D28928316

fbshipit-source-id: 6da6c9a5321d722a3dfd816b49f3994df98c7471
2021-06-07 02:19:59 -07:00
Simon Farnsworth
7837f85a21 Increase available CPU parallelism in Mercurial derived data
Summary: Code inspection of derived data shows several places that are already set up to be I/O parallel; by adding `spawn` calls and looking for performance changes, I found that these two also gain from being CPU parallel. The others are not helped (or hindered) by a `spawn`, so leave them alone for now.

Reviewed By: ahornby

Differential Revision: D28901878

fbshipit-source-id: f774bdf93a11e9c0f0370612968f4f32179f3eb1
2021-06-07 01:51:36 -07:00
Xavier Deguillard
e14dff2645 treeoverlay: enable WAL on the Sqlite database
Summary:
WAL is known to be significantly faster than the default DELETE journaling
mode, let's enable it.

Reviewed By: fanzeyi

Differential Revision: D28915718

fbshipit-source-id: 3ee10d10dbaf07a01a23101a6266874a41784cfc
2021-06-04 21:56:37 -07:00
Xavier Deguillard
413baab09d win32: remove some unecessary ifdef
Summary:
These appear to be unecessary, thus there is no need to keep them in place as
it makes the code harder to follow.

Reviewed By: chadaustin

Differential Revision: D28850241

fbshipit-source-id: 129b853e88f0291bb637c9d24de4872a222a5af4
2021-06-04 15:26:25 -07:00
Katie Mancini
405550c6fe thread ObjectFetchContext write, setattr, fallocate
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally, we generally should not be using these singletons
in our production code.

A few final write calls need to be threaded as well.

Reviewed By: xavierd

Differential Revision: D28844011

fbshipit-source-id: 214853eea7fa65263fe6415e1ae8b76ca21512d6
2021-06-04 14:57:47 -07:00
Katie Mancini
2e6ea72e9a thread ObjectFetchContext thrift applyToInodes
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally, we generally should not be using these singletons
in our production code.

Some thrift methods used by watchman to get metadata implicitly are not threaded.
These can cause fetches, so let's thread the fetch context here too.

Reviewed By: genevievehelsel

Differential Revision: D28842300

fbshipit-source-id: b1e4b3aea879d6ed7b92afa26184616dedad5935
2021-06-04 14:57:46 -07:00
Katie Mancini
96da8df402 thread ObjectFetchContext symlink
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally, we generally should not be using these singletons
in our production code.

This change is for symlink

Reviewed By: genevievehelsel

Differential Revision: D28841453

fbshipit-source-id: 080eb62f0b562f8e0995c34e9a8302238fc59ed8
2021-06-04 14:57:46 -07:00
Katie Mancini
f2133297b6 thread ObjectFetchContext remaining parts of rm
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally we generally should not be using these singletons
in our production code.

Most of rmdir is already threaded, not sure if this case can actuall cause
fetches in production, but might as well thread.

Reviewed By: genevievehelsel

Differential Revision: D28840211

fbshipit-source-id: 8dea08e775be470dd1730e2d32750a6912650ee0
2021-06-04 14:57:46 -07:00
Katie Mancini
526ced1f54 thread ObjectFetchContext rename
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally, we generally should not be using these singletons
in our production code.

this change is for rename

Reviewed By: genevievehelsel

Differential Revision: D23467437

fbshipit-source-id: e9d79c65fb5c4d686f0597550e43a0e87c4792cb
2021-06-04 14:57:46 -07:00
Katie Mancini
82a43119ba update eden doctor for macFUSE
Summary:
we now want macFUSE to be installed instead of osxfuse. eden doctor will spew
errors if osxfuse is not installed or loaded, so it perpetually complains.
Update these checks for macFUSE now.

Reviewed By: xavierd

Differential Revision: D28751766

fbshipit-source-id: 4bc61349e33492aebe888a4e869ef7620c74768e
2021-06-04 14:04:50 -07:00
Liubov Dmitrieva
f5007a93d9 implement filenode lookup and tree lookup in blobstore
Summary:
implement filenode and tree lookup in edenapi

simple lookup in blobstore without any additional validation of blob content

assuming all the validation will be inside upload logic

here, assuming if key is known that content of blob is valid

Reviewed By: markbt

Differential Revision: D28868028

fbshipit-source-id: 590cc404f33adbec69f8adafd33365a0249d3241
2021-06-04 10:11:25 -07:00
Liubov Dmitrieva
7fc42817cb edenapi: create a call to the lookup API for different types
Summary:
create end to end intergation for the lookup API on the client

Start prototyping of `hg cloud upload` command.

Currently, it just performs lookup for existing heads.

This way we can end to end test the new APIs.

Reviewed By: markbt

Differential Revision: D28848205

fbshipit-source-id: 730c1ed4a21c1559d5d9b54d533b0cf551c41b9c
2021-06-04 10:11:25 -07:00
Liubov Dmitrieva
e32102a1f1 skeleton lookup and upload API for files
Summary:
Files upload will be executed in 2 stages:

* check if content is already present
* upload missing files

The check api is generic, it could be used for any id type. Called 'lookup' API.

Reviewed By: markbt

Differential Revision: D28708934

fbshipit-source-id: 654c73b054790d5a4c6e76f7dac6c97091a4311f
2021-06-04 10:11:25 -07:00
Durham Goode
9d994c93aa build: set SDKROOT via make local as well
Summary:
Previously we set this in the rpm spec, but we need to set it in make
local as well since sometimes hgbuild invokes make local directly.

Ideally we'd put this in setup.py, since make and rpmspecs go through that, but
we need this environment also set for the dulwich build, which we don't really
control the setup.py for.

Reviewed By: singhsrb

Differential Revision: D28902015

fbshipit-source-id: bfc170c3027cc43b24c6a517512a63a71f433d23
2021-06-04 09:51:48 -07:00
Egor Tkachenko
47f7da159d Make copy_blobstore_keys tool copy keys between inner blobstores
Summary:
Recently we had an issue with `connectivity-lab` repo where 3 keys P416141335 had different values because of parent ordering P416094337.
Walker can detect difference between keys in the multiplex inner blobstores and repair them, however it doesn't have notion of the copy keys (there isn't concept of source and the target). We have a copy_blobstore_keys tool, which is used for restoring keys from the backup and with small modification it can handle copy between innerstore.

Reviewed By: StanislavGlebik

Differential Revision: D28707364

fbshipit-source-id: 3d5a4f39999623023539b9159fa7310d430f0ee4
2021-06-04 09:27:26 -07:00
Stanislau Hlebik
5394be2939 mononoke: fix typos
Reviewed By: HarveyHunt

Differential Revision: D28896946

fbshipit-source-id: 770671c5103bcab883b58bd96cdd8d1672c43c8f
2021-06-04 08:57:20 -07:00
Stanislau Hlebik
8f52b55042 mononoke: check if write is allowed before calling megarepo methods
Summary:
All megarepo methods write to a repository, so we need to check if write is
allowed to a given repo, and previously we weren't checking that.
Let's fix it and Let's start doing so now by trying to get RepoWriteContext
for the target repo. If writes are not allowed then RepoWriteContext fails.

Reviewed By: farnz

Differential Revision: D28838994

fbshipit-source-id: e45d4fe72603e7fe2755141874fc4125998bfed8
2021-06-04 08:28:08 -07:00
Katie Mancini
f1d0de859f thread ObjectFetchContext mkdir
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally, we generally should not be using these singletons
in our production code.

This change is for mkdir

Reviewed By: genevievehelsel

Differential Revision: D23458622

fbshipit-source-id: f3914a4f692490434882143664a5d5f1701e93ba
2021-06-03 16:33:35 -07:00
Katie Mancini
88cb4ec5ba thread ObjectFetchContext create
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally we generally should not be using these singletons
in our production code.

This change is for create

Reviewed By: genevievehelsel

Differential Revision: D23457862

fbshipit-source-id: d4c9cc658c26b3119b2b2a1da061e299eaf510c9
2021-06-03 16:33:35 -07:00
Katie Mancini
ee923324d2 thread ObjectFetchContext lookup
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally we generally should not be using these singletons
in our production code.

Most of lookup is already threaded. This finishes the threading for lookup.

Reviewed By: xavierd

Differential Revision: D23456910

fbshipit-source-id: fab7397caeee19f921d8fba1fb6528baa5cf2960
2021-06-03 16:33:35 -07:00
Durham Goode
ffa6c61481 run-tests: fix allow/deny list of tests with multiple cases
Summary:
The recent change to make run-tests work with Python 3 broke the
allow/deny list functionality because it started testing the full test name
instead of the base. This fixes that.

Reviewed By: quark-zju

Differential Revision: D28885125

fbshipit-source-id: 586a71e66e0f094b79e6a3e07e27813db6f662d3
2021-06-03 15:54:03 -07:00
Eric Chen (swe)
0ba2c44d90 uncopy: new command to mark files as not copied
Summary: create `uncopy` command to unmark files that were copied using `copy`.

Reviewed By: quark-zju

Differential Revision: D28821574

fbshipit-source-id: c1c15f6fb2837cec529860aba70b516ddd794f10
2021-06-03 13:54:48 -07:00
Jeremy Fitzhardinge
c652f9a11f third-party/rust: update time to 0.2
Summary:
Time 0.2 is current, and 0.1 is long obsolete. Unfortunately there's a
large 0.1 -> 0.2 API change, so I preserved 0.1 and updated the targets of its
users. Also unfortunate that `chrono` has `oldtime` as a default feature, which
makes it use `time-0.1`'s `Duration` type. Excluding it from the features
doesn't help because every other user is specifying it by default.

Reviewed By: dtolnay

Differential Revision: D28854148

fbshipit-source-id: 0c41ac6b998dfbdcddc85a22178aadb05e2b2f2b
2021-06-03 13:52:54 -07:00
Mateusz Kwapich
d2530263b3 obtain repo without doing ACL checks
Summary:
The worker should be able to process the requests from the queue no matter
which repo it is and what are it ACLs. It's during the request scheduling when
we should check the identity of the entity scheduling request.

Reviewed By: StanislavGlebik

Differential Revision: D28866807

fbshipit-source-id: 5d57eb9ba86e10d477be5cfc51dfb8f62ea16b9e
2021-06-03 12:32:54 -07:00
Chad Austin
8a44512e1f remove FakeBackingStore::getTreeForManifest
Summary:
BackingStore and LocalStore are no longer tied at the hip, so decouple
FakeBackingStore from LocalStore.

Reviewed By: kmancini

Differential Revision: D28615431

fbshipit-source-id: ee6bc807da6de4ed8fba8ab6d52ff5aeff34e8ae
2021-06-03 11:07:14 -07:00
Chad Austin
894eaa9840 move root ID parsing and rendering into BackingStore
Summary:
The meaning of the root ID is defined by the BackingStore, so move
parsing and rendering into the BackingStore interface.

Reviewed By: xavierd

Differential Revision: D28560426

fbshipit-source-id: 7cfed4870d48016811b604348742754f6cdbd842
2021-06-03 11:07:14 -07:00
Chad Austin
ebbcef7605 start writing the v2 SNAPSHOT
Summary:
Start writing the v2 format (single, variable-width parent) into the
SNAPSHOT file.

Reviewed By: xavierd

Differential Revision: D28528419

fbshipit-source-id: 245bd4f749c45f4de2912b0406fc0d1b52278987
2021-06-03 11:07:14 -07:00
Yan Soares Couto
f005f37d74 Use InnerRepo on WarmBookmarksCache instead of BlobRepo
Summary:
Currently bookmark warmers receives a `BlobRepo`. This diff makes it receive an `InnerRepo`, but does no logic changes.

This will be useful as fields are moved from `BlobRepo` to `InnerRepo`, and will also be useful for accessing skiplists from warmers, as I plan to do on the next diff.

Reviewed By: StanislavGlebik

Differential Revision: D28796543

fbshipit-source-id: dbe5bec9fc34da3ae51e645ea09b03e2bb620445
2021-06-03 10:53:24 -07:00
Yan Soares Couto
c5666c4db8 Move InnerRepo to different target
Summary:
This diff simply extracts `InnerRepo` object type to a separate target.

This will be used on the next diff where we need to access `InnerRepo` from `BookmarkWarmer`, which needed to be split to a different target in order to not create a circular dependency in buck.

Reviewed By: StanislavGlebik

Differential Revision: D28796406

fbshipit-source-id: 4fdadbbde31719b809abb6b8a9ba8fa24b426299
2021-06-03 10:53:24 -07:00
Yan Soares Couto
e4b6fd3751 Create InnerRepo container
Summary:
This diff creates a new `InnerRepo` container, that contains `BlobRepo` as well as the skiplist index.

The plan here is:
- As of code organisation, `InnerRepo` will eventually contain most of the fields currently in `Repo`, as well as the fields of `BlobRepo` that are only used in binaries that use `Repo`. This way each binary will only build the "attribute fields" it needs to, but the code to build them can still be neatly shared.
- As for `SkiplistIndex`, the plan is to be able to modify it inside `WarmBookmarksCache`, that's why I'm moving it to `InnerRepo` as well. I'll make bookmark warmers receive `InnerRepo` instead of `BlobRepo`, so they can access the skiplist index if wanted, and then modify it (this is an attempt to try to make skiplists faster on bookmarks).

Reviewed By: StanislavGlebik

Differential Revision: D28748221

fbshipit-source-id: bca31c14a6789a715a215cc69ad0a69b5e73404c
2021-06-03 10:53:24 -07:00
Katie Mancini
5a16819fb8 thread ObjectFetchContext mknod
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally we generally should not be using these singletons
in our production code.

this change is for mknod

Reviewed By: chadaustin

Differential Revision: D23452153

fbshipit-source-id: 7b9bc6b624fbe81b91770bc65a0d27bc9d397032
2021-06-03 09:46:25 -07:00
Katie Mancini
4594776ada thread ObjectFetchContext getxattr
Summary:
There are a few remaining holes where we are not passing a full fetch context.
We will need a full fetch context to do all data fetch logging needed for the
intern project. Additionally we generally should not be using these singletons
in our production code.

this change is for getxattr

Reviewed By: chadaustin

Differential Revision: D23451954

fbshipit-source-id: bae73878754d59661cddf7c0b001e506bbc88d13
2021-06-03 09:46:25 -07:00