Commit Graph

61081 Commits

Author SHA1 Message Date
Pavel Aslanov
7bbc5f6a23 add support for deriving all types at once
Summary: Add support for deriving all types of derived data for a given repository

Reviewed By: StanislavGlebik

Differential Revision: D23842909

fbshipit-source-id: 2fa5c4a9444169b26c5cf70d91a6cc707cca8022
2020-10-15 03:51:03 -07:00
Pavel Aslanov
d9e3abb105 batched derived data type generation
Summary: This change make it possible to find underived changesets for multiple derived data types at once, and then batch derive everything taking into account dependencies between derived data types.

Reviewed By: StanislavGlebik

Differential Revision: D23762152

fbshipit-source-id: 8112fc5deb86f3c55f2fa5079cf917a0506f045c
2020-10-15 03:51:03 -07:00
svcscm
f9834659e5 Updating submodules
Summary:
GitHub commits:

bc3b876fa0
fa2a8cda7b
66b29c065c
244c99eebc
9a855e4a30

Reviewed By: wittgenst

fbshipit-source-id: d40a8de29a3ac64252a72cb5ee6aefce3af5650f
2020-10-15 02:01:11 -07:00
Thomas Orozco
35ed8fe3dc revisionstore/lfs: retry 429
Summary:
When the server returns a 429, the intention is that the client will wait for a
little bit then try again later (there is no harm in that, as we haven't really
used many server resources for this). However, it turned out that right now we
just abort. Let's fix it!

Note that this changes the behavior a bit for the error cases, in the sense
that we no longer return `Ok(None)` but instead return an `Err`. Xavier noted
this should make sense here.

I've also had the client send its retry attempt via a header, because who
knows, that might be useful.

Reviewed By: kulshrax

Differential Revision: D24308127

fbshipit-source-id: 35639956f36342dfb0056b0d348dc4ad56bd576c
2020-10-15 01:11:32 -07:00
svcscm
d0f9faa040 Updating submodules
Summary:
GitHub commits:

2bf4a236d6
c5b0c39599

Reviewed By: wittgenst

fbshipit-source-id: 5c5a0df47f43a70c599b10344ca34cbbb9943adc
2020-10-15 00:34:32 -07:00
Stanislau Hlebik
79eaa32bf2 mononoke: remove copy-paste in megarepotool
Summary: CommitSyncer initialization was copy-pasted. Let's remove it.

Reviewed By: krallin

Differential Revision: D24301048

fbshipit-source-id: f49a0ee41fe46d9252f154e7882bf06f8f94f549
2020-10-14 23:54:42 -07:00
svcscm
222f524c69 Updating submodules
Summary:
GitHub commits:

6f3542cb04
7668fce8ac
1bcd16bdf5
ccbe5ac571
f515f08a87
66455cb5cc
8756f8ae05

Reviewed By: wittgenst

fbshipit-source-id: 9cbd8f09b9fe3e950e3faa8d2f69c5be423d251a
2020-10-14 23:54:42 -07:00
svcscm
69ebd60fbd Updating submodules
Summary:
GitHub commits:

aae3a91059
839670ed60

Reviewed By: wittgenst

fbshipit-source-id: 306a994400230f4349f2cb795559d670a67a0ccc
2020-10-14 20:35:30 -07:00
John Reese
737849c9dd apply black 20.8b1 formatting update
Summary:
allow-large-files

black_any_style

Reviewed By: zertosh

Differential Revision: D24325133

fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
2020-10-14 20:21:52 -07:00
svcscm
32b005fe93 Updating submodules
Summary:
GitHub commits:

4189ba00a1
7cc28784d1
6d69a8e7c7

Reviewed By: wittgenst

fbshipit-source-id: b3f4cbef25bafcadea054c912b03c664147b742a
2020-10-14 20:21:52 -07:00
svcscm
cd02191449 Updating submodules
Summary:
GitHub commits:

08500c9df4
05fba96927
3dcb3b5f73

Reviewed By: wittgenst

fbshipit-source-id: 7b14fb9fe485de0d4824b5b5d42607e8fa38a337
2020-10-14 16:04:15 -07:00
Jun Wu
0d7ae7e7cd util: move eachslice to util
Summary:
This is Ruby's `iter.each_slice(n)` or Rust's `slice.chunks(n)`.
It will be used by phabstatus to batch requests.

Reviewed By: singhsrb

Differential Revision: D24289050

fbshipit-source-id: 528b35d43874222f1b6783738e965d9a3b159deb
2020-10-14 15:09:12 -07:00
Jun Wu
2dd8aa33b0 smartset: add iterctx API
Summary: Make it easier to iterate contexes instead of revs.

Reviewed By: simpkins

Differential Revision: D24289053

fbshipit-source-id: deffdc4a5d4e7e3644a98f8112f5c8b8bdbd154d
2020-10-14 15:09:12 -07:00
Jun Wu
49dd754fa6 smartlog: do not use null as --master fallback
Summary:
Previously `--master` falls back to `null` if `-r` is provided for
compatibility. That could be surprising as smartlog's sorting does not work
well without a master branch.

Change `--master` to a consistent value regardless of `-r` is provided or not.

Reviewed By: simpkins

Differential Revision: D24297586

fbshipit-source-id: c6e695333ae17db11dcb98d9cdb57cc2f298ff64
2020-10-14 12:57:36 -07:00
svcscm
d89240fadc Updating submodules
Summary:
GitHub commits:

606ccc49a2
bf3004ae77
f66b3ee45c
729f6f58af
b99fe1ab74
b536a99946
eea3892865
c88bb4843c
2c633a560b
e10f7c8957

Reviewed By: wittgenst

fbshipit-source-id: 26b267d5470f1985d9901505941c605d46cbd39f
2020-10-14 11:49:34 -07:00
Meyer Jacobs
120fbd3280 trees: port SCS aux data request method to edenapi
Summary: Introduces fetching of child entry IDs, and child file metadata for a specified tree manifest ID. The aux data lookup will only be performed if `with_file_metadata` is set, which is actually kind of wrong. Instead `with_children` from the wire type should be exposed in the API request type, and `with_*_metadata` should be hidden or used for data other than the child entry `Key`s.

Reviewed By: kulshrax

Differential Revision: D23886678

fbshipit-source-id: 0cba72cea7be47ae3348a406d407a19b60976c0c
2020-10-14 11:12:59 -07:00
Arun Kulshreshtha
bd0b2a04a4 gotham_ext: use pin_project in SignalStream
Summary: This code predates the use of `pin_project`, which simplifies the implementation of pinned types using proc macros. We now use `pin_project` in most other places in this crate where we define custom `Future`s and `Stream`s, so let's use it in `SignalStream` as well. (This makes the code easier to modify and removes the need for `unsafe` code.)

Reviewed By: farnz

Differential Revision: D24285792

fbshipit-source-id: da018b9ed62c33d9d06ecf6caa4748969a057e66
2020-10-14 11:08:13 -07:00
Arun Kulshreshtha
5c1837e700 gotham_ext: add FuseOnErr stream combinator
Summary:
Add a stream combinator that causes a `TryStream` to end upon encountering the error. The resulting stream remains a `TryStream`, but will always terminate after yielding an error item.

Later in this stack, this will be used in the LFS server to cause mid-stream errors to always terminate the response.

Reviewed By: krallin

Differential Revision: D24301254

fbshipit-source-id: e71ddc16e79caeb195e23be7d6a93ee63a96a713
2020-10-14 11:08:13 -07:00
Stanislau Hlebik
7919c77c93 mononoke: fix backsyncing logging
Summary:
We had a small issue with our logging when pushredirection was enabled. See for
example https://fburl.com/scuba/mononoke_test_perf/orsld6yh. If you count the
number of "Start processing" and "Command processed" entries you'll notice that
there's one more instance of the former. That's wrong, and turned out this
additional "Start processing" line is coming from backsyncing.

Turned out that the problem was two fold:
1) start_command() logs "Start processing" row and also it sets "Start
processing" as default message for every next scuba calls. That doesn't seem
intentional, so this diff clones scuba sample before logging "Start
processing" to avoid "poisoning" the "tag" field

2) Backsyncing weren't setting the log_tag at all. So this diff fixes it

Reviewed By: ikostia

Differential Revision: D24305167

fbshipit-source-id: 3448b88693e0c5c8f5a9b90f602bc2dfe99db15a
2020-10-14 10:37:07 -07:00
Durham Goode
0fed091abb py3: fix treemanifest server tests
Summary:
simplecache didn't support binary values, which treemanifest uses.
Let's fix that.

Reviewed By: quark-zju

Differential Revision: D24290634

fbshipit-source-id: 2fd5306e10c3354d87832eb6765baca5dbb26d3e
2020-10-14 10:30:32 -07:00
Durham Goode
bff14ff181 py3: fix more tests
Summary: Some of these tests were already passing. Some required minor fixes to pass.

Reviewed By: quark-zju

Differential Revision: D24290635

fbshipit-source-id: 789d3033142466c868057da8f9f23d27aede8ea4
2020-10-14 10:30:32 -07:00
Durham Goode
0cbe0887f6 py3: fix test-convert*
Summary:
They now pass. Didn't test the p4 tests since I don't have p4
available, but I don't think we use it anymore.

Reviewed By: quark-zju

Differential Revision: D24284643

fbshipit-source-id: 184697052c0b7000ad9765b4033964b4d382b811
2020-10-14 10:30:32 -07:00
svcscm
9b98c4a254 Updating submodules
Summary:
GitHub commits:

3f1e1ee8c7
0fff8da792
26c1f6f4af

Reviewed By: wittgenst

fbshipit-source-id: f625c59666572328ccb91d07020d02e6c4497750
2020-10-14 09:23:38 -07:00
Xavier Deguillard
bc351a5891 templater: decode the result of diff()
Summary:
Template filters are expecting the output of the template to be a unicode
string, not a byte string. Thus we need to ensure that diff return a unicode
string.

Reviewed By: DurhamG

Differential Revision: D24290908

fbshipit-source-id: 70899249c3e26edd1714fd901fa6af405b61e544
2020-10-14 09:00:53 -07:00
svcscm
5865190b1e Updating submodules
Summary:
GitHub commits:

ef6f757343
f039138fbb

Reviewed By: wittgenst

fbshipit-source-id: 30cf7bb58b584fa4071675e090b511faab10c5aa
2020-10-14 09:00:53 -07:00
svcscm
2e41da40b4 Updating submodules
Summary:
GitHub commits:

bf475c7432
846e1d87d6

Reviewed By: wittgenst

fbshipit-source-id: 10edbd6106d79ddd85dcbf919c581eec6bf1b3af
2020-10-14 06:24:26 -07:00
Adam Simpkins
a1c72ad436 revert phabstatus iterator changes from D24066918
Summary:
This reverts D24066918 (a684e53a31).  That diff changed the phabstatus code to use the last
created revset iterator rather than the first for peekahead purposes.

The first revset iterator does appear to be the correct one to wrap.  After
D24066918 (a684e53a31) I consistently see `hg log -r 'draft()' -T'{phabstatus}\n'` make
Phabricator queries for only one diff at a time.  Reverting the changes from
that diff fixes the issue.

Note that the revset argument passed to `hg log` appears to make a difference
in the behavior here.  When using simple revsets including just specific
commit ranges then the peekahead behavior works as expected both before and
after D24066918 (a684e53a31).  However, when using `draft()` in the revset specifier then
the behavior works before D24066918 (a684e53a31), but not after it.

Reviewed By: singhsrb

Differential Revision: D24269910

fbshipit-source-id: c2c2abf6360fe3129a1fc73b5b433b763bce1fd2
2020-10-14 00:31:30 -07:00
Stanislau Hlebik
b83be196e5 mononoke: make parameter name clearer
Reviewed By: krallin

Differential Revision: D24282032

fbshipit-source-id: d004f61fd6b13bc41d88e5659c428ab8ed1cb264
2020-10-13 23:45:22 -07:00
Stanislau Hlebik
3b956b35d0 mononoke: allow non-prefix free mapping
Summary:
In D19023924 (e9df42c192) ikostia allowed non-prefix free movers, however he left the
safeguard in just in case. Well, now we finally need to use non-prefix-free
mapping, so let's remove the safeguard.

Reviewed By: ikostia

Differential Revision: D24277040

fbshipit-source-id: 4d658ad813171ab0dcb23656e95e3e443ec9961a
2020-10-13 23:43:09 -07:00
Stanislau Hlebik
c63927a8b8 mononoke: add megarepo tool that fills NotSyncCandidate entry
Summary:
This is a tool that's handy to use right before the binding. It accepts a list
of large repo changesets, and for each commit does not yet have a mapping it
inserts a NotSyncCandidate. This is exactly what we want to do right before the
bind - we'd like large repo to have most of its commits marked as
NotSyncCandidate.

Reviewed By: ikostia

Differential Revision: D24276642

fbshipit-source-id: b040e5dee981c06da8a4c58dacbb8c2660f0917d
2020-10-13 23:40:08 -07:00
Durham Goode
fe6e10c024 infinitepush: convert sql results to string
Summary:
The infinitepush sqlindex was returning bytes instead of strings, which
caused various formatters to serialize as "b'sadf'" instead of "sadf". Let's fix
the type converter to produce strings on python 3. Note, this is the opposite to
what we do in the hgsql converter. hgsql works with binary data, so we default
to bytes there. The sqlindex doesn't deal with any binary data, so defaulting to
strings is better.

Also updates a comment on the hgsql converter to be accurate. I confirmed there
are no other customer converters in the code base that need updating.

Reviewed By: krallin

Differential Revision: D24282899

fbshipit-source-id: 708732c17626f6ebc2c3cbe7f00afa5771f31d7b
2020-10-13 21:21:12 -07:00
svcscm
866f11965f Updating submodules
Summary:
GitHub commits:

acc7047306

Reviewed By: wittgenst

fbshipit-source-id: eddea22179f7d1b32adbb94595103b1d457bdbb4
2020-10-13 21:21:12 -07:00
svcscm
38bd171dd0 Updating submodules
Summary:
GitHub commits:

241cbea138
c87c3a48af
a1b6eddc4c

Reviewed By: wittgenst

fbshipit-source-id: 0c725641542564687c0f881dca415c951baf3802
2020-10-13 18:49:56 -07:00
Kostia Balytskyi
ed21f74ceb hooks: cleanup weird conversions
Summary:
Likely `MPath` constructor got more clever since this was written. In any case
I am just happy that it builds.

Reviewed By: farnz

Differential Revision: D24278551

fbshipit-source-id: 2378a43bd01b1826b7f81d294a035053fba5322f
2020-10-13 15:25:39 -07:00
Mateusz Kwapich
33ef6204d8 move to facebook/
Summary:
Bookmark filler doesn't make much sense outside of FB. In fact the commit
filler is already in the `facebook/` dir.

D24253307 contains the fbpkg change that has to be landed in-sync with this one.

Reviewed By: lukaspiatkowski

Differential Revision: D24253070

fbshipit-source-id: 52734ae34779801b4cae4882a6d0880586ef505f
2020-10-13 13:48:51 -07:00
Arun Kulshreshtha
32c109d955 edenapi: send client correlator to server
Summary:
Include the client correlator string from the `clienttelemetry` extension in each EdenAPI HTTP request via the  `X-Client-Correlator` header.

The `ClientIdentityMiddleware` in `gotham_ext` already understands this header (as it is already used by the LFS server), and `gotham_ext`'s `ScubaMiddleware` will automatically include the provided correlator in the server's Scuba samples.

Reviewed By: farnz

Differential Revision: D24282244

fbshipit-source-id: 13d04e706eda38893cff6e740bd1d7bf104e43dd
2020-10-13 13:25:52 -07:00
Genevieve Helsel
82199a1818 add stderr option for eden rage
Summary: Add option to redirect the eden rage output to stderr

Reviewed By: chadaustin

Differential Revision: D24210031

fbshipit-source-id: 736af81de6a41e49c2459a1cd8124123d6928323
2020-10-13 12:15:43 -07:00
svcscm
7aab3c4f85 Updating submodules
Summary:
GitHub commits:

6767f42c32
c840e8c2bd
28871dac5f
e2ca83a807
bf342394b6
65699a6226
e6b9757f59
11ff740824
088c7dac38
964c81996c
e84f6199d2
7c85fd1864

Reviewed By: wittgenst

fbshipit-source-id: 1e6099b3cd050beddf44785d5396a3190352200e
2020-10-13 11:53:41 -07:00
Kostia Balytskyi
49c9c3e4f7 hooks: deny_files act upon cross-repo-push-origin
Summary: For the purposes of megarepo, we need to treat certain paths differently depending on whether the push is native to a large repo, or is push-redirected from a small repo. Let's add a separate patterns list to the `deny_files` hook. Of course, we can also add a list, specific for push-redirected pushes, but it seems unneeded atm.

Reviewed By: StanislavGlebik

Differential Revision: D24278409

fbshipit-source-id: 9fd815940bb656ceac6ab234f3a0647a5c57db06
2020-10-13 10:42:40 -07:00
Thomas Orozco
95635fb8e8 mononoke/warm_bookmarks_cache: don't hit MySQL harder if MySQL fails
Summary:
If we fail to read from MySQL, we immediately go back to attempting to read.
That's the exact opposite of what we should be doing. This fixes that by not
changing our poll schedule if we hit an error.

Reviewed By: farnz

Differential Revision: D24279086

fbshipit-source-id: 2c05ec9c33a1e0cbdfb63dda63a68f2a93615512
2020-10-13 10:39:54 -07:00
svcscm
96731f401a Updating submodules
Summary:
GitHub commits:

7b2be7d344
df0cd4f2d5
18572d2ca2
22ed347d0c
9c3f99b0c0
c04c08bd41
524254eb2d
0186ed6d36
14bf40704e
edc7c95ee2
996209ea2a
c9b544ef96

Reviewed By: wittgenst

fbshipit-source-id: 5109fdbb72dcbf650f4b2edfb92729ce7054416d
2020-10-13 10:15:37 -07:00
Lukas Piatkowski
04e75a6097 mononoke/integration tests: prepare dependencies for running tests by getdeps
Summary:
This diff adds all third party dependencies that are required by getdeps to be able to build and runn Mononoke's integration tests.

Also add a stub Makefile with no-op steps that will be filled in next diff.

Reviewed By: ahornby

Differential Revision: D24251894

fbshipit-source-id: 67384ecfd0ced6762dddc3c6e61feb1240b1162d
2020-10-13 09:50:52 -07:00
Lukas Piatkowski
d0eb47f856 mononoke/integration tests: fix for different curl version for test-remotefilelog-lfs-client-certs.t
Reviewed By: ahornby

Differential Revision: D24250984

fbshipit-source-id: d971510063b74d8245670a921002f1d78d3a0b74
2020-10-13 09:50:52 -07:00
Alex Hornby
3cb1aec731 mononoke: reorder scrub walk expansion to reduce queue depth
Summary: Reorder scrub walk expansion to reduce queue depth. The bounded_traversal_stream  inserts to its unscheduled queue at the front, therefore reversing the order of the children, so we want to add the easiest to complete Nodes to the list of edges last.

Reviewed By: farnz

Differential Revision: D24247625

fbshipit-source-id: 59caa5898e7f38f41cc04a15723370de38f8474f
2020-10-13 09:05:00 -07:00
Alex Hornby
c2bb337653 mononoke: delegate chaosblob put to put_impl
Summary:
Delegate chaosblob put to put_impl to remove some duplication.

This is possible as all chaosblob construction has an inner BlobstorePutOps.

Reviewed By: StanislavGlebik

Differential Revision: D24258401

fbshipit-source-id: dee9fce888e5ef9c2f34865c97921b9cc87ac3bf
2020-10-13 06:25:58 -07:00
Kostia Balytskyi
660937cf9d hooks: be aware of native vs push-redirected pushes
Summary:
This change adds some wiring to allow the hooks to treat native vs push-redirected pushes differently. This is needed because `deny-files` needs to block native pushes to `.ovrsource-rest` and `arvr-legacy`, while it needs to allow push-redirection into these directories.

The plan further is to change the actual hook body for `deny_files` to have different handling of the two cases.

Reviewed By: StanislavGlebik

Differential Revision: D24257454

fbshipit-source-id: 2f5931149115210aeeeebb3294a6512effd36350
2020-10-13 05:46:56 -07:00
Lukas Piatkowski
715351d576 mononoke/integration tests: fix test-clienttelemetry.t by disabling features
Summary:
The logic inside `eden/scm/tests/features.py` script enables certain
features of HG on tests based on the name of the test. Mononoke's integration
tests suit reuses eden/scm's tests suit and as a consequence it triggers the
same `features.py` logic. It was fine until D24201934 (f5988c415c) introduced a feature for
test that is named in the same way as one of the Mononoke tests - the
`test-clienttelemetry.t`.

In order to fix this problem Mononoke will pass a `--nofeatures` flag to the
`eden/scm/run-tests.py` invocations that will turn off the usage of
`features.py`.

Reviewed By: farnz

Differential Revision: D24276294

fbshipit-source-id: eb28ed55a05de3b012e37407603c2370adaaad16
2020-10-13 05:28:27 -07:00
Mateusz Kwapich
5b81fe32d0 add a method to create repo object without ACL check.
Summary:
mononoke_api crate which provides high-level abstraction over most of mononoke
has been used in externally facing scs_server so far. That's why all of it's entry
points are validating user identity first.

In D24136239 (42a783999d) I've started using it for iternal sync job. In this world all
operations are authorized and there's no need for extra ACL checks.

I could just add additional arg to the new method but I don't want to make it
easy to accidentally skip ACL checks - that's why I went for separate method
with descriptive namea.

Reviewed By: krallin

Differential Revision: D24261117

fbshipit-source-id: 32f601d970d286cd383ba5c488596d64d09a535e
2020-10-13 03:59:03 -07:00
Alex Hornby
c52f1faba0 mononoke: add put overwrite counters to CountedBlobstore
Summary: Add put overwrite counters to CountedBlobstore.

Reviewed By: StanislavGlebik

Differential Revision: D24254922

fbshipit-source-id: 8de56cee17ebe411e92d1d0e7c4ff2addca6308c
2020-10-13 03:09:39 -07:00
Alex Hornby
1fed539319 mononoke: factor out common code in throttledblob
Summary: Factor out common async limit code in throttledblob to throttled_access function.

Reviewed By: StanislavGlebik

Differential Revision: D24254357

fbshipit-source-id: 8f3277ccc065e3eb93f089edb2f3bd12e80ef352
2020-10-13 03:09:38 -07:00