Commit Graph

64480 Commits

Author SHA1 Message Date
svcscm svcscm
f24bab3775 Updating submodules
Summary:
GitHub commits:

eeec4600b8
24161810c4

Reviewed By: wittgenst

fbshipit-source-id: 15b838083d951bae295b2065bff9cc608c7ff0e7
2021-04-08 04:47:13 -07:00
Aida Getoeva
1f0a3fb467 mononoke: log error if couldn't fetch repo lock status
Summary:
Currently if we failed to fetch the repo status we only see "Repo is marked as read-only: Failed to fetch repo lock status" error, which is not very informative. Example of the error in production: P385612782.

Let's log the error.

Reviewed By: krallin

Differential Revision: D27621996

fbshipit-source-id: 85d9f0fe39397759da1b51e197f9188761678715
2021-04-08 04:03:18 -07:00
Liubov Dmitrieva
781cd19f2d Add support for wantsunhydratedcommits in Mononke
Summary:
Add support for returning unhydrated draft commits if requested by the client using a config option 'wantsunhydratedcommits'

This is needed to support slow enabling it for some clients like OnDemand.

Reviewed By: StanislavGlebik

Differential Revision: D27621442

fbshipit-source-id: 672129c8bfcbcdb4cee3ba1b092dac16c0b1877d
2021-04-08 03:48:07 -07:00
svcscm svcscm
22ad28be00 Updating submodules
Summary:
GitHub commits:

72c64f551a
23727343c0
735ee1360b
94db9ddc1d

Reviewed By: wittgenst

fbshipit-source-id: a8c2014dedda59c9991bcddc096caee8b3f07a4b
2021-04-08 03:22:27 -07:00
svcscm svcscm
08c44215ad Updating submodules
Summary:
GitHub commits:

9678b5a3ff
66d32fe1a6

Reviewed By: wittgenst

fbshipit-source-id: f0a09c08b6af27ab32c221eb5856b3c7aef5a1b3
2021-04-08 02:35:40 -07:00
Stanislau Hlebik
47eee63dc2 mononoke: log file size to the post push scribe logging
Summary:
We already log file count, but file sizes is another useful piece of
information.

I evaluated two options - either do as I did in this diff or just change ScribeToScuba
logging python script to query scs to get file sizes. I opted for option #1
mainly because scs doesn't have a method to query file sizes for many files at once, and
querying one by one might be too expensive. We can add a method like that, but
that's a bit of a bigger change that I'd like.

Reviewed By: andll

Differential Revision: D27620507

fbshipit-source-id: 2618e60845bc293535b190d4da85df5667a7ab60
2021-04-07 23:34:40 -07:00
Durham Goode
22a8ddad44 py3: fix tweakdefaults Windows CreatePipe usage
Summary: This API has moved in Python 3. This is only used for util.popen4 calls, which aren't super frequent, so it escaped notice until now.

Reviewed By: sfilipco

Differential Revision: D27603246

fbshipit-source-id: 9ee6af4f66380480fe6c1c736287231464d0b21e
2021-04-07 22:07:28 -07:00
svcscm svcscm
23a77e1ff6 Updating submodules
Summary:
GitHub commits:

a893a0c0b4
7bbc4277f9
407df1a9b4
52af80066f

Reviewed By: wittgenst

fbshipit-source-id: 5831994cb7e4fb18a6d21b19b0c58685aab6eca2
2021-04-07 21:42:01 -07:00
svcscm svcscm
e870af3990 Updating submodules
Summary:
GitHub commits:

14b700a122
502534b4c1
19d684ddbc
27e325b643
09dcb95188
2c6be0c8a6
57718f8e26

Reviewed By: wittgenst

fbshipit-source-id: 5bf9ae0543c7214968d9eff1960a01d1aa1beeb8
2021-04-07 20:25:02 -07:00
Arun Kulshreshtha
e5b431b325 http-client: correctly set TLS key in CLI binary
Summary: We were accidentally not setting the TLS key here; this diff fixes it.

Reviewed By: quark-zju

Differential Revision: D27634276

fbshipit-source-id: 9aac3a34b6f6655059a8d3332eea8ba02d062651
2021-04-07 19:54:56 -07:00
Andrey Chursin
d0cf303e2a checkout: Use native rebase in merge.py
Summary:
Usage is hidden under config experimental.nativerebase
When config is set, we attempt to execute native rebase, and check if it has conflicts
If there are no conflicts, we convert native rebase result into Python actions
In case of conflicts, we currently just fallback to python merge

Reviewed By: DurhamG

Differential Revision: D27482909

fbshipit-source-id: 5705d372095f64ce0c6ee93c783e1c8dccf8b11a
2021-04-07 19:07:31 -07:00
Andrey Chursin
a540d6fc5c checkout: basic py binding for MergeResult
Reviewed By: DurhamG

Differential Revision: D27482908

fbshipit-source-id: c8c9ae3a48f5ba2ee18df056e556bd17da26ba7b
2021-04-07 19:07:31 -07:00
Andrey Chursin
d86bdb0106 checkout: impl Display for MergeState
Reviewed By: DurhamG

Differential Revision: D27482907

fbshipit-source-id: 7eccd9d9f73611369e708a5a1acbec950fcf03db
2021-04-07 19:07:31 -07:00
Andrey Chursin
fcfe9a451e checkout: basic rebase model
Summary:
This diff contains proposal for basic rebase model for new checkout.

This diff introduces two types of file changes - basic no conflict Actions(that will replace CheckoutPlan actions) and ConflictAction for actions that contain conflicts

No conflict actions are produced when comparing two manifests
Conflict actions can be produced when rebasing manifests.

Eventually we will adjust checkout code to take either list of Actions or Conflict actions and perform corresponding operations on the file.

Rebase::rebase is used to generate list of conflict actions when rebasing.
Currently `Rebase::rebase` produces list of actions on top of 'base' commit.

Before doing actual checkout we will need to take into account what current commit is and adjust this list of actions accordingly (however, this adjustment will be trivial, it won't produce more conflicts)
After getting adjusted list of actions, checkout code can roll it out to fs and call merge drivers if needed.

In the future, if we will want to allow check in conflicts, we will need to adjust `Rebase::resolve_conflict` to take `ConflictAction` as input, instead of an Action.

Reviewed By: DurhamG

Differential Revision: D27028001

fbshipit-source-id: b02b7ad8030fcf146b53639d69e66fdc8f38a62d
2021-04-07 19:07:31 -07:00
svcscm svcscm
1d85817e24 Updating submodules
Summary:
GitHub commits:

7cb1c45b3e
3bdc561672
d658fffb62
be09fb4894
0be89e87fd
cb0ff4d20b
be64769b06

Reviewed By: wittgenst

fbshipit-source-id: 79949e48008f0933e15b839bb79232beea21bb3f
2021-04-07 19:04:42 -07:00
Jun Wu
51821b16b2 smartset: disable nameset.{fastasc,fastdesc} if it has prefetch fields set
Summary:
The nameset._set.iter() used by nameset.{fastdesc,fastdesc} do not know how to
prefetch. Just make them return `None` in this case. This addresses issues
where `log` can trigger one-by-one fetching.

  hg log -r "limit(all(), 100000, 100000) & date('2021-04-01')"

The stack is a bit deep, it is:

  # cmdutil.getlogrevs
  if not revs:
      ...

  # smartset.filteredset.__nonzero__
  fast = None
  candidates = [self.fastasc, self.fastdesc]
  ...
  if fast is not None:
      it = fast()

Basically filteredset calls into its _subset (nameset)'s fast{asc,desc},
which does not do prefetch properly and that cause filteredset.__nonzero__
to be slow.

Reviewed By: sfilipco

Differential Revision: D27634020

fbshipit-source-id: c3a44a1eb81c32f4dccb319ce42a15c56121c2ec
2021-04-07 17:51:50 -07:00
svcscm svcscm
939f263e28 Updating submodules
Summary:
GitHub commits:

6b4ee04fcc
6195a89b48
066eae84c3
38b71d1762
d836f2ac17
c2907d1960
7c7ec0ba7e
9ede9112ad
f66b14632b

Reviewed By: wittgenst

fbshipit-source-id: 5ffa0ade8811dd47d835776600d0b89c4816a681
2021-04-07 17:47:09 -07:00
svcscm svcscm
263919ba7e Updating submodules
Summary:
GitHub commits:

d4a3163ca7
090681f0e8
c87184af30
c72863821e
d63ab64824
aa6a011179
6fa9f81f52
872f039207
54cff673a5
4ee9812c6f
d865aff341

Reviewed By: wittgenst

fbshipit-source-id: fd4cf213a0099751a175cedb30a4ade19f8fc465
2021-04-07 17:03:38 -07:00
Stefan Filip
0517c58e93 segmented_changelog: update SqlIdMap to avoid query on empty request
Summary:
Fixes MySQL syntax errors we've seen in some cases.  No reason to call to the
database if we have no items to query for. It seems that empty queries can come
from the caching layer under certain configurations.

Reviewed By: krallin

Differential Revision: D27624798

fbshipit-source-id: 2febeff127f2fbdc739368ff1d1065c8f64723f8
2021-04-07 16:27:43 -07:00
svcscm svcscm
43e0622f35 Updating submodules
Summary:
GitHub commits:

3fa8cbf34e
26d0baefe0
b1ddf627be
eb3f0d209c
6fc3bb995b
fa95296ea2
b09796e81d
364539d111
59fc3f1d1c
4b5e997c70

Reviewed By: wittgenst

fbshipit-source-id: cc90ea8a08a19187e89cef91929caa6cb861ad2f
2021-04-07 16:20:16 -07:00
svcscm svcscm
347459544b Updating submodules
Summary:
GitHub commits:

c0e239feff
b3da44dcec
9d2c410b69
d52b520d51

Reviewed By: wittgenst

fbshipit-source-id: 2da90dc6a911494663a86a1e3a4a6d939409e64d
2021-04-07 14:13:26 -07:00
Mark Juggurnauth-Thomas
ef11de4fed blobrepo_override: remove overrides for bookmarks and config
Summary:
Remove the `DangerousOverride` mechanism for bookmarks traits and config.

Bookmarks overrides were only used to make unit test bookmarks use the same
metadata database as `SqlCounters`, which can now be done safely by getting the
metadata database from the factory.

Config overrides can be performed by the factory at repo construction.

Reviewed By: krallin

Differential Revision: D27424695

fbshipit-source-id: 0259da3abedb7ed4944fe945ba89800eea76ebff
2021-04-07 14:01:49 -07:00
Mark Juggurnauth-Thomas
c80d5c9149 repo_import: remove dangerous_override
Summary:
This dangerous override was being used to override
derived data config.  Replace it with customizing the
config in the factory.

Reviewed By: krallin

Differential Revision: D27424696

fbshipit-source-id: 6dcf0c1397e217f09c0b82cf4700743c943f506f
2021-04-07 14:01:49 -07:00
Mark Juggurnauth-Thomas
53550b9f10 blobrepo_factory: remove blobrepo_factory
Summary: This has been superseded by `RepoFactory`.

Reviewed By: krallin

Differential Revision: D27400617

fbshipit-source-id: e029df8be6cd2b7f3a5917050520b83bce5630e9
2021-04-07 14:01:49 -07:00
Mark Juggurnauth-Thomas
af31abce47 walker: use RepoFactory to construct repositories
Summary:
Use `RepoFactory` to construct repositories in the walker.

The walker previously had special handling to allow repositories to
share metadata database and blobstore connections.  This is now
implemented in `RepoFactory` itself.

Reviewed By: krallin

Differential Revision: D27400616

fbshipit-source-id: e16b6bdba624727977f4e58be64f8741b91500da
2021-04-07 14:01:49 -07:00
Mark Juggurnauth-Thomas
6677ea9c14 repo_factory: add blobstore_override
Summary: Add a way for users of `RepoFactory` to customize the blobstore that repos use.

Reviewed By: krallin

Differential Revision: D27400615

fbshipit-source-id: e3e515756c56dc78b8de8cf7b929109d05cec243
2021-04-07 14:01:48 -07:00
Mark Juggurnauth-Thomas
a5f7cccc38 benchmark: remove dependency on blobrepo_factory
Summary:
Remove the dependency on blobrepo factory by defining a custom facet factory
for benchmark repositories.

Reviewed By: krallin

Differential Revision: D27400618

fbshipit-source-id: 626e19f09914545fb72053d91635635b2bfb6e51
2021-04-07 14:01:48 -07:00
Mark Juggurnauth-Thomas
8f8d92dec1 lfs_server: use RepoFactory to construct repositories
Summary: Use `RepoFactory` to construct repositories in the LFS server.

Reviewed By: krallin

Differential Revision: D27363465

fbshipit-source-id: 09d5d32a133f166c6f308d56b2fb02f00031a179
2021-04-07 14:01:48 -07:00
Mark Juggurnauth-Thomas
cb96e2c7e0 microwave: use RepoFactory to construct repositories
Summary: Use `RepoFactory` to construct repositories in the microwave builder.

Reviewed By: krallin

Differential Revision: D27363468

fbshipit-source-id: 25bf2f7ee1ac0e52e1c6d4bda0c50ba67bc03110
2021-04-07 14:01:48 -07:00
Mark Juggurnauth-Thomas
9b8007e2f7 unbundle_replay: use RepoFactory to construct repositories
Summary: Use `RepoFactory` to construct repositories in unbundle_replay.

Reviewed By: krallin

Differential Revision: D27363469

fbshipit-source-id: d735e5e0bfd4522c25b6748234e107c2184b5bcf
2021-04-07 14:01:48 -07:00
Mark Juggurnauth-Thomas
3b9817b5d8 benchmark_storage_config: remove dependency on blobrepo_factory
Summary: Use the equivalent function from `repo_factory`.

Reviewed By: krallin

Differential Revision: D27363470

fbshipit-source-id: dce3cf843174caa2f9ef7083409e7935749be4cd
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
e709f4fc73 commit_rewriting: remove dependency on blobrepo_factory
Summary:
This import is only used for the `ReadOnlyStorage` type, which is canonically
defined in `blobstore_factory`.

Reviewed By: krallin

Differential Revision: D27363474

fbshipit-source-id: 78fb1866d8a1223564357eea27ec0cdbe54fb5db
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
94ea52cdd4 repo_client/mononoke_repo: remove dependency on blobrepo_factory
Summary:
This import is only used for the `ReadOnlyStorage` type, which is canonically
defined in `blobstore_factory`.

Reviewed By: krallin

Differential Revision: D27363466

fbshipit-source-id: 7cb1effcee6d39de92b471fecfde56724d24a6a4
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
20bd1ac245 hook_tailer: use RepoFactory to construct repositories
Summary: Use `RepoFactory` to construct repositories for the hook tailer.

Reviewed By: krallin

Differential Revision: D27363472

fbshipit-source-id: 337664d7be317d2cfc35c7cd0f1f1230e39b6b43
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
23e065fe0e repo_listener: remove dependency on blobrepo_factory
Summary:
This import is only used for the `ReadOnlyStorage` type, which is canonically
defined in `blobstore_factory`.

Reviewed By: krallin

Differential Revision: D27363467

fbshipit-source-id: ed1388e661453e1b434c83af63c76da1eea1bce1
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
ceb9497d00 cmdlib: use RepoFactory to construct repositories
Summary: Use `RepoFactory` to construct repositories for all users of `cmdlib`.

Reviewed By: krallin

Differential Revision: D27363471

fbshipit-source-id: c9a483b41709fd90406c6600936671bf9ba61625
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
117398d820 mononoke_api: use RepoFactory to construct repositories
Summary:
Switch from `blobrepo_factory` to the new `RepoFactory` to construct `BlobRepo`
in `mononoke_api`.

The factory is part of the `MononokeEnvironment`, and is used to build all of the repos.

Reviewed By: krallin

Differential Revision: D27363473

fbshipit-source-id: 81345969e5899467f01d285c232a510b8edddb17
2021-04-07 14:01:47 -07:00
Mark Juggurnauth-Thomas
3ef58dda72 blobrepo_factory: re-export common types from repo_factory
Summary:
To facilitate migration from `blobrepo_factory` to `repo_factory`, make common
types the same by re-exporting them from `repo_factory` in `blobrepo_factory`.

Reviewed By: ahornby

Differential Revision: D27323371

fbshipit-source-id: 9b0d98fe067de7905fc923d173ba8ae24eaa0d75
2021-04-07 14:01:46 -07:00
Mark Juggurnauth-Thomas
f902acfcd1 repo_factory: add main repo factory
Summary:
Add a factory for building development and production repositories.

This factory can be re-used to build many repositories, and they will share
metadata database factories and blobstores if their configs match.

Similarly, the factory will only load redacted blobs once per metadata
database config, rather than once per repo.

Reviewed By: krallin

Differential Revision: D27323369

fbshipit-source-id: 951f7343af97f5e507b76fb822ad2e66f4d8f3bd
2021-04-07 14:01:46 -07:00
Ilia Medianikov
ffade38f3d mononoke: tests: filter pycrypto SyntaxWarning when starting Mononoke in integration tests
Reviewed By: krallin

Differential Revision: D27591736

fbshipit-source-id: 311f84847c365916b76a7b718d9e347bd151d8b2
2021-04-07 12:40:28 -07:00
Alex Hornby
e422630c5d mononoke: speed up packblob put by using Compressor
Summary: I found the Writer based zstd::Encoder api was doing a lot more allocations than the buffer based Compressor api, so switched as its both faster and better fit to the usecase.

Differential Revision: D27588448

fbshipit-source-id: ee8f72180045308a2e16709b9b5aa7bcf3b5cafd
2021-04-07 10:52:03 -07:00
Alex Hornby
1e98362120 mononoke: add checkpoint for input to manual_scrub
Summary: Reduce amount of manual steps needed to restart a manual scrub by checkpointing  where it has got to to a file.

Differential Revision: D27588450

fbshipit-source-id: cb0eda7d6ff57f3bb18a6669d38f5114ca9196b0
2021-04-07 09:30:51 -07:00
Morgan Newman
7ed6627c6b add --prefetch-metadata flag to prefetch profiles CLI
Summary: Here we further add prefetch-metadata support to prefetching profiles

Reviewed By: genevievehelsel

Differential Revision: D27568542

fbshipit-source-id: 64507125f47cf093c0133c82fcab941ed6495f32
2021-04-07 09:17:11 -07:00
Thomas Orozco
3f710ee216 mononoke/repo_client: spawn check_lock_repo
Summary:
This is ... a stopgap :( There is probably some slow polling happening in
unbundle_future, and this causes us to fail to use our connection in time in
check_lock_repo...

Reviewed By: ahornby, StanislavGlebik

Differential Revision: D27620728

fbshipit-source-id: b747011405328b60419a99f0e5dbbaf64d53196a
2021-04-07 08:37:28 -07:00
Robin Håkanson
ff2efb6a74 Make fn convert_time_to_datetime public.
Summary: Make fn convert_time_to_datetime public.

Reviewed By: ahornby

Differential Revision: D27583010

fbshipit-source-id: 9c6ff178cc54a6fd0696e7ac5036e2b8474bd10c
2021-04-07 07:55:02 -07:00
Thomas Orozco
cb16c08e95 mononoke: remove remaining usage of async-unit
Summary:
This one is a little bit trickier since we want to use Tokio inside a
Quickcheck function. That said, this is basically the expansion `tokio::main`
does, so we can simply use it.

Reviewed By: farnz

Differential Revision: D27619146

fbshipit-source-id: 1e3ea2d119913900d9b55c0a6d33de8a6ed5781c
2021-04-07 07:26:57 -07:00
Thomas Orozco
c934b67e5b mononoke: remove all trivial usage of async-unit
Summary:
I'd like to just get rid of that library since it's one more place where we
specify the Tokio version and that's a little annoying with the Tokio 1.x
update. Besides, this library is largely obsoleted by `#[fbinit::test]` and
`#[tokio::test]`.

Reviewed By: farnz

Differential Revision: D27619147

fbshipit-source-id: 4a316b81d882ea83c43bed05e873cabd2100b758
2021-04-07 07:26:57 -07:00
Simon Farnsworth
14d3488a26 Make PackBlob have a useable interface for packers
Summary:
The intention is that the packer decides what to pack and in what order, PackBlob provides the methods needed to do the packing as requested by a packer.

Change the API so that a packer cannot make mistakes

Reviewed By: ahornby

Differential Revision: D27476427

fbshipit-source-id: 7dd534302c62b2432a2aca474f49da8ab9cbef1a
2021-04-07 06:32:28 -07:00
svcscm svcscm
4115bcb562 Updating submodules
Summary:
GitHub commits:

ecf2c4c188

Reviewed By: wittgenst

fbshipit-source-id: 559c61c4f822094f32344989ff15369eafdc71d2
2021-04-07 06:17:48 -07:00
Aida Getoeva
01b38dfa5e mononoke/mysql: log connection/query ODS counters by the shardmap and label
Summary:
It is useful to have latency stats grouped by the shardmap and label to easily identify where the problem comes from if something is broken.

This diff switches a single histogram used for all the MySQL use-cases into a set of histograms: one per `shardmap:label`. Ans also makes the histograms a bit smaller as we don't actually have such big numbers as 10s per conn/query.

There is only one case when the histogram is created per shard instead of a shardmap, it is `xdb.hgsql` DB with 9 shards. The reason why it happens it's because we connect to each shard as to an individual tier: https://fburl.com/diffusion/um8lt7cr.

{F582699426}

Reviewed By: farnz

Differential Revision: D27503833

fbshipit-source-id: 40c7eb64df7ae0694f63d3644231f240df8212ec
2021-04-07 05:14:03 -07:00