Commit Graph

61061 Commits

Author SHA1 Message Date
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
Alex Hornby
7a65b60841 mononoke: add --blobstore-put-behaviour argument
Summary: Add --blobstore-put-behaviour argument so we can try running some workloads with modified behaviour, firstly with logging on overwrites to gather metrics,  and then not able to overwrite at all.

Reviewed By: StanislavGlebik

Differential Revision: D24109292

fbshipit-source-id: bbea31eb40604fdedc3a0db7a84e99b5b1fe7a23
2020-10-13 03:09:38 -07:00
Alex Hornby
a13cbcf12f mononoke: remove BlobstorePutOps::put_behaviour
Summary:
Remove BlobstorePutOps::put_behaviour and the default implementation of BlobstorePutOps::put_with_status as they did not make sense for multiplexed stores

This resolves the corresponding TODO in multiplexblob/base.rs

Reviewed By: StanislavGlebik

Differential Revision: D24162629

fbshipit-source-id: aa175bbedac473093dd1862226e910dea15c1299
2020-10-13 03:09:38 -07:00
Alex Hornby
570cd79b3a mononoke: make multiplex blobstore a BlobstorePutOps
Summary:
Implement BlobstorePutOps for multiplex blobstores, so restoring the ability to have multiplexes of multiplexes.

Note that this makes BlobstorePutOps::put_behaviour accessor problematic as the inner stores could have different put_behaviour, will remove it in next diff so as to keep this diff reasonable size.

Reviewed By: StanislavGlebik

Differential Revision: D24162235

fbshipit-source-id: 2ace3af5f60607996e449451316c5c0720351f82
2020-10-13 03:09:38 -07:00
Alex Hornby
011f3ffa76 mononoke: add overwrite status logging to multiplexblob puts
Summary:
Add overwrite status logging to multiplexblob puts now that the inner types held all implement BlobstorePutOps

This has the effect of making any configuration that specifies a multiplex of multiplexes invalid, which is addressed in next diff in stack.

Reviewed By: StanislavGlebik

Differential Revision: D24159958

fbshipit-source-id: dd1f70a636dfb36686d796af7afd8d5da8797a23
2020-10-13 03:09:38 -07:00
Alex Hornby
d9777a38fa mononoke: delegate put to put_with_status for logblob
Summary: Delegate put to put_with_status for logblob now that the blobstore factory can provide right inner type.

Reviewed By: StanislavGlebik

Differential Revision: D24109296

fbshipit-source-id: 1493421f632708d8ec24bd9f7c5cd5745f17ae68
2020-10-13 03:09:37 -07:00
Alex Hornby
05e62f0a26 mononoke: delegate put to put_with_status for packblob
Summary: Delegate put to put_with_status for packblob now that the blobstore factory can provide right inner type

Reviewed By: StanislavGlebik

Differential Revision: D24109288

fbshipit-source-id: 745fe3f6398833c9ac51e70f4d1c2959fceba0d5
2020-10-13 03:09:37 -07:00
Alex Hornby
934a491ed3 mononoke: make blobstore_factory PutBehaviour aware
Summary:
Make blobstore_factory PutBehaviour aware by layering all except the final multiplex as BlobstorePutOps

This makes it so all the components that go into a multiplex are BlobstorePutOps,  which is a prerequisite for making the multiplex logging include the Overwrite status.

Reviewed By: StanislavGlebik

Differential Revision: D24109289

fbshipit-source-id: 23f4cedbaebadae194e41cfbff9ef46b651e3fd4
2020-10-13 03:09:37 -07:00
Alex Hornby
4acca67600 mononoke: make logblob PutBehaviour aware
Summary:
log whether puts overwrite keys by implementing BlobstoreWithPutBehaviour for Logblob.

It logs a count of type of overwrite per put so we can sum them up.

Reviewed By: StanislavGlebik

Differential Revision: D24079272

fbshipit-source-id: 81944d92a56b0d3349ef390eb83f9e5bf4ee3d39
2020-10-13 03:09:37 -07:00
Alex Hornby
8df59b224b mononoke: make throttleblob PutBehaviour aware
Summary: Make throttleblob PutBehaviour aware

Reviewed By: StanislavGlebik

Differential Revision: D24109295

fbshipit-source-id: 9d5f712946ba3089facaa8f8c36b48f54338972f
2020-10-13 03:09:37 -07:00
Adam Simpkins
25cb27f395 handle timeouts reading from phabricator
Summary:
If Phabricator takes more than 10 seconds to respond, a `socket.timeout`
exception may be thrown.  Treat this like other networking errors, and simply
report the diff phabricator status as `Error`.  Previously this exception was
unhandled, causing the entire command to abort.

Reviewed By: singhsrb

Differential Revision: D24272274

fbshipit-source-id: f646d111a91f901e09d9f94a1e0102d6dd4d0952
2020-10-13 03:04:02 -07:00
svcscm
38ffab8b0f Updating submodules
Summary:
GitHub commits:

87687b28ca

Reviewed By: wittgenst

fbshipit-source-id: 36067072cad6d2797d03d1b9ee111f01ffd2618e
2020-10-13 03:04:02 -07:00
svcscm
0657ef5563 Updating submodules
Summary:
GitHub commits:

6658dedab3
1e74b9031f

Reviewed By: wittgenst

fbshipit-source-id: 6f04acfed7870089b6a56cc6c83508f74ec48b3c
2020-10-12 18:14:01 -07:00
Meyer Jacobs
f9958ca35a taggederror: introduce category and transience metadata and precedence
Summary:
This change introduces two new metadata types, Category and Transience, and a mechanism for Category to provide a default Fault and Transience, which can be overriden by the user.

Also introduces a mechanism for attempting to log exceptions which occur during exception logging, falling back to the previous behavior of just swallowing the exception on failure.

Reviewed By: DurhamG

Differential Revision: D22677565

fbshipit-source-id: 1cf75ca1e2a65964a0ede1f072439378a46bd391
2020-10-12 17:17:34 -07:00
svcscm
414daf9190 Updating submodules
Summary:
GitHub commits:

929c233bf1
f45a28847c
a71e8b1d0f
6f93817377
a9897f8bcf

Reviewed By: wittgenst

fbshipit-source-id: f174c140c0bd6f6c2ae6a2574421a0b86186ec0c
2020-10-12 17:12:12 -07:00
Xavier Deguillard
001c399d6f tests: enable remaining update_tests on Windows
Summary: Only 2 tests aren't passing on Windows.

Reviewed By: genevievehelsel

Differential Revision: D24257788

fbshipit-source-id: 42a0169955bbff6e05e02374c3b3e434bf849ba0
2020-10-12 17:09:41 -07:00
Jun Wu
bd5cfe49b2 commitstore: remove it
Summary:
It only has benchmark code that led to the use of mincode. Now hgcommits is the
main crate for commit storage. `commitstore` without `hg` in its name was
initially planned to support other kinds of commits including git and bonsai.
However we don't have immediate goal for that at present. So let's just remove
the commitstore directory.

Reviewed By: singhsrb

Differential Revision: D24263618

fbshipit-source-id: 84b4861ae490817377e69d8c2006c63331e3db1f
2020-10-12 16:42:58 -07:00
svcscm
2d3ca71ca4 Updating submodules
Summary:
GitHub commits:

f7002cd5b4
4b5a16a481
276b40abf9
861e544335
4bc9dee4c1
4a093ba4f7
3703aa8c6d
b9ca79c813

Reviewed By: wittgenst

fbshipit-source-id: a5f1b249cb9595fff6694fed4bc340d3e04b559c
2020-10-12 16:30:47 -07:00
Xavier Deguillard
437031872f fix test-import-t.py take 2
Summary: Whitespaces are needed.

Reviewed By: quark-zju

Differential Revision: D24264452

fbshipit-source-id: a7ecfbe1bba7d14f92d5218f18d55361a3f4319e
2020-10-12 15:43:57 -07:00
Durham Goode
b0e341c311 signals: move signal registering to be behind ui.threaded
Summary:
On the hg servers we're seeing crashes due to signals during syscalls.
Rolling back to prior to the signal changes seems to have fixed it, though we
haven't bisected enough to be sure this is the cause.

The ui.threaded option is already used to opt-out of running on a background
thread, let's also use it to opt-out of the custom signal registering in hopes
that it fixes the server issue, until they can be deprecated.

Reviewed By: quark-zju

Differential Revision: D24254804

fbshipit-source-id: 50e4fc8c7e3a88b5baa49394f6f1edffc946187d
2020-10-12 14:36:47 -07:00
Xavier Deguillard
aec38c3d61 remove .clang-format
Summary:
Since D23247941, .clang-format is no longer behind a symlink, which means that
we can get clang-format niceness on Windows without having our own
.clang-format file.

Thus, let's just remove eden/scm/.clang-format

Reviewed By: ahornby

Differential Revision: D24255987

fbshipit-source-id: 8bbb966949cf0d1c0ad76053f699dd524700183e
2020-10-12 14:34:20 -07:00