Commit Graph

68026 Commits

Author SHA1 Message Date
Stanislau Hlebik
10084d12f0 mononoke: log reponame to derived data tailer scuba set
Summary:
It's useful to know the repo name (we can get it from tw handle name, but
that's less convenient).

Reviewed By: mitrandir77

Differential Revision: D31053458

fbshipit-source-id: fa7e92c510ea6160c52561d4a7a7c44776c528dc
2021-09-20 12:27:58 -07:00
Zeyi (Rice) Fan
18dbf379df ring: backport kSecRandomDefault is NULL to fix macOS build
Summary:
Backport: https://github.com/briansmith/ring/pull/1334

This will allow us to unpin Rust compiler to 1.53.0 and update to 1.55.0.

Reviewed By: xavierd

Differential Revision: D31039024

fbshipit-source-id: f6a9c918e836d93d03c34c77c12bbe63cf7cbe09
2021-09-20 11:22:49 -07:00
Durham Goode
05a2cdbc76 repo: separate peer and repo setup
Summary:
Previously repo and peer instantiation were in one unified path. This
allowed treating repo's and peers somewhat interchangably. We're moving to a
world where peers and local repos are quite different, so let's separate these
two paths.

This will be useful in the next diff where we remote the file peer, but want to
keep the ability to instantiate local file non-peer repos.

Reviewed By: quark-zju

Differential Revision: D30975887

fbshipit-source-id: 5e676b522c7cfdd5449aeb6a750947dcb023183f
2021-09-20 10:26:37 -07:00
Durham Goode
dc89f2c417 httppeer: remove httppeer
Summary:
We don't use this at Facebook, and most of the tests don't even touch
it anymore. Let's delete it. This will also help us remove our tests dependency
on hg having server logic, once we also delete sshpeer and filepeer.

This will mean we can't use FB hg to clone from http bitbucket though, which is
probably fine.

Differential Revision: D30970713

fbshipit-source-id: 76d96edfbcb7db2168b4b11bfaf8b487406d7f3d
2021-09-20 10:26:37 -07:00
svcscm svcscm
2aba2ad71b Updating submodules
Summary:
GitHub commits:

ba0a07921f
f31128f91f
96f659fe4d
c2313d53ad

Reviewed By: bigfootjon

fbshipit-source-id: abb956c5923541c86b2dcf579f2d0557155d19bb
2021-09-20 09:27:34 -07:00
svcscm svcscm
343f7b859a Updating submodules
Summary:
GitHub commits:

f1cf40bb90
9cc1e8158e
4038976e27
0d90b54890
f56dbcc84a
c4ff3cd961
ecded43f98

Reviewed By: bigfootjon

fbshipit-source-id: 352c0aebc547b3bd639dbe84f835e2ad437ac98a
2021-09-20 08:23:29 -07:00
Mark Juggurnauth-Thomas
91c4748c5b blame: switch to manager-based derivation
Summary:
Switch derivation of `blame` to the `DerivedDataManager`.

This is mostly the same as the existing derivation implementation.  The main difference is that `blame` derivation using the backfilling config
will use the backfilling config for the unodes that it depends on, too.

Reviewed By: mitrandir77

Differential Revision: D30974102

fbshipit-source-id: 5f69f8c218806bb7606b2af4b831e2104b8440d6
2021-09-20 06:26:21 -07:00
Mark Juggurnauth-Thomas
aef6b3f453 unodes: switch to manager-based derivation
Summary: Switch derivation of `unodes` to the `DerivedDataManager`.

Reviewed By: yancouto

Differential Revision: D30944564

fbshipit-source-id: 41f63cd47cffdd1e24d57b470afef57aa6fe0264
2021-09-20 06:26:21 -07:00
Yan Soares Couto
0c80a0aac7 Fix build warnings
Summary: Why not, right? Fixes a few build warnings that showed up to me while building.

Reviewed By: kulshrax

Differential Revision: D30933487

fbshipit-source-id: 318fbd2c5697914fd0bfa723e678dc710524dc02
2021-09-20 06:26:21 -07:00
Yan Soares Couto
84118416a2 Simplify code for FsnodeId
Summary: There were already helpers to make this code less copy-pasty, this diff just uses them.

Reviewed By: markbt

Differential Revision: D30933408

fbshipit-source-id: acc27a0904425eccfc71fee884a8f2035ed0c37f
2021-09-20 06:26:21 -07:00
Yan Soares Couto
7725ca63b9 Simplify code for WireHgId
Summary:
We already have a macro to make it easier to create wire representation of hash types, let's use it on `HgId` to reduce copy-pasting.

Changes:
- Added `Ord` implementations to wire hash types, as `WireHgId` used it.
- Added from/into implementations on `HgId` to byte arrays, which were used by the macro.
- Changed Debug implementation so it prints hex instead of an actual array of bytes

Reviewed By: krallin

Differential Revision: D30933067

fbshipit-source-id: c88911bfc91e44e07f2f658098036b766495d05f
2021-09-20 06:26:21 -07:00
Yan Soares Couto
f1cb23d4e1 Add --clean option to snapshot restore
Summary:
I imagine a pretty common case (specially for automation that's trying to keep two clones in sync), will be that you need to restore a snapshot and then restore another snapshot after that.

Currently, this doesn't work very well, as it fails on (some but not all) cases where there is uncommitted changes. It's kind of boring bc to handle that you need to run `hg purge && hg revert -a -C`.

This diff adds a `--clean` option to `hg snapshot restore` that will clean the working copy before updating to given snapshot. Now the command will also fail if you try to update to a snapshot while you have untracked files.

Reviewed By: markbt

Differential Revision: D30903851

fbshipit-source-id: 387eeeee882093389649dc337c861291c35f4b94
2021-09-20 06:26:21 -07:00
svcscm svcscm
0695cb6067 Updating submodules
Summary:
GitHub commits:

66d02a9ff6
c51b07efed
f2a4ece735
683e856182
1660fb119c
a7d1ba823a
ae3918e3d9
d563dde828
352d24f3b5

Reviewed By: bigfootjon

fbshipit-source-id: 4b26b13c60b77bb0b3ef4e84adf16c16c17b2c63
2021-09-20 04:49:50 -07:00
Mark Juggurnauth-Thomas
044ae9f1f0 backfill_derived_data: fix tests to ensure batch invariants
Summary:
The `backfill_batch_dangerous` method requires that the caller ensures
that all dependencies of the batch have been derived, otherwise errors,
such as mappings being written out before the things they map to, can
occur.

When the derived data manager takes over batch derivation, it will enforce this
requirement, so that it is no longer dangerous.  However, The backfiller tests
were not ensuring the invariant, so the tests will fail with the new derivation
implementation.

Fix the tests by ensuring the parent commits are always derived before a
batch is started.  The test is also extended to expose the failure mode
of accidentally deriving batch parents.  This will be fixed in the next
commit.

Reviewed By: yancouto

Differential Revision: D30959132

fbshipit-source-id: 8489a5d0b375692a903854294e3810846c9e13de
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
45963588b3 derived_data_utils: implement manager-based DerivedUtils
Summary:
Implement `DerivedUtils` using the `DerivedDataManager`.

This is just for migration.  In the future `DerivedUtils` will be replaced by the manager.

Reviewed By: yancouto

Differential Revision: D30944568

fbshipit-source-id: 32376e3b4aeb959e63f66e989a663c21dee30ba5
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
fd388aac1a derived_data_manager: implement data derivation
Summary:
Implement a new version of data derivation in the derived data manager.  This is different from the old version in a few ways:

* `derived_data::BonsaiDerivable` is replaced by `derived_data_manager::BonsaiDerivable`.  This trait defines both how to perform derivation and how to store and retrieve mapping values.  Derivation is performed with reference to the derived data manager, rather than `BlobRepo`.

* The old `Mapping` structs and traits are replaced with a direct implementation in the derived data manager, using the `BonsaiDerivable` trait to handle the derived-data-type-specific parts.

* The new implementation assumes we will stick with parallel derivation, and doesn't implement serial derivation.

Code is copied from the `derived_data` crate, as it is intended to be a replacement once all the derived data types are migrated, and re-using code would create a circular dependency during migration.

This only covers the basic derivation implementation used during production.  The derived data manager will also take over backfilling, but that will happen in a later diff.

Reviewed By: yancouto

Differential Revision: D30805046

fbshipit-source-id: b9660dd957fdf762f621b2cb37fc2eea7bf03074
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
0741a4815d derived_data_utils: extract find_oldest_underived
Summary:
The `find_oldest_underived` method of `DerivedUtils` is used outside tests by
exactly one client (the backfiller in tailing mode).  Simplify the
`DerivedUtils` trait by extracting this method from the trait, and replacing
with a more general one that will be easier to implement in terms of the
derived data manager.

Reviewed By: yancouto

Differential Revision: D30944567

fbshipit-source-id: a1d408e091d145297241a5eebc02a87155bc3765
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
8fc9f7159a derived_data: split BonsaiDerived trait
Summary:
Split the `BonsaiDerived` type in two:

* `BonsaiDerived` is now just the interface which is used by callers
  who want to derive some derived data type.  It will be implemented by
  both old and new derivation.

* `BonsaiDerivedOld` is the interface that old derivation uses to
  determine the default mapping for derivation.  This will not be
  implemented by new derivation, and will be removed once migration is
  complete.

Reviewed By: yancouto

Differential Revision: D30944566

fbshipit-source-id: 5d30a44da22bcf290ed3123844eb712c7b37dea4
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
4776c94ae7 derived_data_manager: remove builder
Summary:
The builder pattern turned out to be unnecessary, as mappings don't need to be
stored in the manager after all.

Reviewed By: StanislavGlebik

Differential Revision: D30944565

fbshipit-source-id: 4300cdcc871c89f98e42d5b47600ac640b4b94eb
2021-09-20 03:23:17 -07:00
Mark Juggurnauth-Thomas
b1ecec2b14 filenodes: make derivation not depend on BlobRepo
Summary:
Make the derivation process for mercurial filenodes not depend on `BlobRepo`.
Instead, use the repo attributes (`RepoBlobstore` and `Filenodes`) directly.
This will allow us to migrate to using `DerivedDataManager` in preparation
for removing `BlobRepo` from derivation entirely.

The existing use of `changesets` for determining the commit's parents is
changed to use the parents from the bonsai changeset.  For normal derivation,
the bonsai changeset is already loaded, so this saves a database round-trip.
For batch derivation we currently need to load the changeset, but it should
be in cache anyway, as other derived data types will also have loaded it.

We still need to keep a `BlobRepo` reference at the moment.  This is because
filenodes depend on the mercurial derived data.  The recursive derivation is
hidden in the call to `repo.get_hg_from_bonsai_changeset`.  When derivation
is migrated to the derived data manager, we can replace this will a direct
derivation.

Reviewed By: StanislavGlebik

Differential Revision: D30765254

fbshipit-source-id: 20cc17c2eb611544869e5f1c15d858663cd60fd1
2021-09-20 03:23:17 -07:00
svcscm svcscm
d4187f76d6 Updating submodules
Summary:
GitHub commits:

0730c80101
866b3de83e
989bddbbe6
ab8669586e
28c76c9791
3e5f5e5982
b716a5a945
e5cc0cecf5
9d11ed5472
8253eefbc5

Reviewed By: bigfootjon

fbshipit-source-id: 79936af5b12c4c3b60cdd81c9c33ada4b1692c8f
2021-09-20 03:23:17 -07:00
svcscm svcscm
3268700ae4 Updating submodules
Summary:
GitHub commits:

7a8c3ed80c
96d337fad5
78a00dec66
c18fb5f91c
49a3ade7dc
931d4c038c
b969d6a5a6

Reviewed By: bigfootjon

fbshipit-source-id: 35dd4cffac011d986941bc2ea13ef0cecadbe2f8
2021-09-20 02:23:23 -07:00
svcscm svcscm
0555322cc8 Updating submodules
Summary:
GitHub commits:

f734ae98f6

Reviewed By: bigfootjon

fbshipit-source-id: 21e7925ea7016e9ec9e3761def5101715f72139e
2021-09-20 00:23:38 -07:00
svcscm svcscm
546cb16a39 Updating submodules
Summary:
GitHub commits:

3895941a3f
0f1c138e51
d344efb477
81362075ac

Reviewed By: bigfootjon

fbshipit-source-id: 31233d61917ceccf97034d9b0a4e3844b74bf6f1
2021-09-19 23:23:22 -07:00
svcscm svcscm
74fd1ea433 Updating submodules
Summary:
GitHub commits:

d79a050008
5a6e29811a
25ac0a8e3a
74eb121238
a28868f403
e4c2588e54

Reviewed By: bigfootjon

fbshipit-source-id: 89cc19c16af67e4490c07ed07bb8f5d6e98f5c44
2021-09-19 22:27:21 -07:00
svcscm svcscm
6079dda2e4 Updating submodules
Summary:
GitHub commits:

cb5aba03bf
6dd9d33d72
61fc1ea06a
1bf21931b4
4d613e252d
6b554ef627
4a2e098464
9401b80945
dfb8f2be0a

Reviewed By: bigfootjon

fbshipit-source-id: 2a970404931aab97badfeef8ec87692e775fe084
2021-09-19 20:25:06 -07:00
svcscm svcscm
f259eb03ac Updating submodules
Summary:
GitHub commits:

9fe1d1b4df
b40bf53252
a01424304f
4a3f51523a
ce162392eb
cf20ce60e7
a781516fce
5ca1f78d13
80878eda02
0fc102029b

Reviewed By: bigfootjon

fbshipit-source-id: b89c4a8896c81e632b03fa33fa13652bec2c2e06
2021-09-19 18:23:06 -07:00
svcscm svcscm
72f6bbf0b4 Updating submodules
Summary:
GitHub commits:

40bf7f0e74
a588781671

Reviewed By: bigfootjon

fbshipit-source-id: 9828e799fd538fafcc98f5d36b91043883584bd5
2021-09-19 17:22:48 -07:00
svcscm svcscm
2380f2e545 Updating submodules
Summary:
GitHub commits:

9a977f7769
481a11235a
933c223136
7b995f6538

Reviewed By: bigfootjon

fbshipit-source-id: 78174e0e52b5c2864d83bd087422e24506895349
2021-09-19 05:23:04 -07:00
svcscm svcscm
bd5ac92b02 Updating submodules
Summary:
GitHub commits:

59ce465093
e0044dce9e
e4183c65ec
8aa15e8067
ab506e7277
1d56ff308a

Reviewed By: bigfootjon

fbshipit-source-id: 531aa500f79d47ce471c60926c033f551756737c
2021-09-19 03:23:05 -07:00
svcscm svcscm
6817573c03 Updating submodules
Summary:
GitHub commits:

019ac7dc7e
9a329583f3
ed6840c1d5
e02c5fe8d8
6b313eb03b
1b3139282b
c3e8479663
3217d32016
96f7af48e0

Reviewed By: bigfootjon

fbshipit-source-id: ed76213ddf88ef45311b139de5fa5756bd685ece
2021-09-19 01:26:42 -07:00
svcscm svcscm
72c6b85757 Updating submodules
Summary:
GitHub commits:

ac02434b48
97ea8ae83e
e3739fc526
557bccfa93
4fa9df6dd7
0311f124db
086fe8e8b6
84ac809cda
9c4b00394d
2d9116325c

Reviewed By: bigfootjon

fbshipit-source-id: 2c4ccda37a89e97b1fe6da271151a4d8653e21a0
2021-09-18 23:23:49 -07:00
svcscm svcscm
58319df720 Updating submodules
Summary:
GitHub commits:

140e8ccd92
fc670e0413

Reviewed By: bigfootjon

fbshipit-source-id: 2354e9dd23fd3b8c615147f1254984582a9b2f0b
2021-09-18 22:22:30 -07:00
svcscm svcscm
b487b063a0 Updating submodules
Summary:
GitHub commits:

e43be0c5d7
f4fa322577
2c957787fc
7692e7d4cd

Reviewed By: bigfootjon

fbshipit-source-id: 25a00e0f263d7d6b506da9e41d51b28d7bd26ffe
2021-09-18 18:23:10 -07:00
svcscm svcscm
2c8711df43 Updating submodules
Summary:
GitHub commits:

3ce8b07a0c
a14274a31d
32410e74fc
aca682ef88
eec0b38f3d
1ac710fd2c

Reviewed By: bigfootjon

fbshipit-source-id: 05dfacc95474e9469440aab9465fb7a45c93a175
2021-09-18 17:22:53 -07:00
svcscm svcscm
25299575d8 Updating submodules
Summary:
GitHub commits:

16fe1dd296
33a24f55b9
923cc4eac5
6f531731ec
60cc20836d
8704e0a7d8
eea7dfe931
a69ff30c82
97357c62ba

Reviewed By: bigfootjon

fbshipit-source-id: 2f6d2aa27a4a090392312fb9ca4aba052c2a1a5d
2021-09-18 15:24:01 -07:00
svcscm svcscm
d72f9cfca2 Updating submodules
Summary:
GitHub commits:

9016cfe796
397dee7ee3
6af4c76a9f
dd55f2cd37
2209b84c32
18c25bd0a9
87bee29c73
7bcb040cfd
b96a151099
b9ece8dbd8
34f8854422

Reviewed By: bigfootjon

fbshipit-source-id: 3d7aaf5de31eb1e4cfc3aeb1bdc67e807d849aa8
2021-09-18 14:23:50 -07:00
svcscm svcscm
a96c7b4637 Updating submodules
Summary:
GitHub commits:

83e0fbc76e
13b365e0e3
70a407774a
865e847605
7009d73493
4dc028dd60
0b7b194c72
756b68e697
aef7926499
6e94dad3e7
2351fe312b

Reviewed By: bigfootjon

fbshipit-source-id: f7dbe369a72be6684f66d524433c7c32a4c4d365
2021-09-18 13:23:38 -07:00
svcscm svcscm
0083bd2e1b Updating submodules
Summary:
GitHub commits:

0f18d021bb
3bb5429205
9020fb569b
faa37c385a
4d7b05d598
0c4c5ea5e4
479f49a45b
fb657cea82
e189eca23f
55ac534da4

Reviewed By: bigfootjon

fbshipit-source-id: 3063a3810ee02394d84ef373368d5bb0e8898702
2021-09-18 12:23:04 -07:00
svcscm svcscm
947e2f4f94 Updating submodules
Summary:
GitHub commits:

d5fb10134f
99fe4c5005
99aba9c84c

Reviewed By: bigfootjon

fbshipit-source-id: 432be255841e81d135e7eb88a83630cd99164676
2021-09-18 11:24:23 -07:00
svcscm svcscm
925a162cca Updating submodules
Summary:
GitHub commits:

97758c3a9a
842516624f
1c290c785d
df22941f7b
812715c758

Reviewed By: bigfootjon

fbshipit-source-id: f605c46a02cb1effb170006fe9a9d9decbef6e4c
2021-09-18 01:25:55 -07:00
Stanislau Hlebik
06705f701c mononoke: add names to the fixtures repos
Summary:
Let's give them a more descriptive names so that it's easier to understand
what's going on.

Reviewed By: markbt

Differential Revision: D31022612

fbshipit-source-id: 8e4f516f3d0b1cd661b1a8fceba80a8f85a2ed4f
2021-09-18 00:25:06 -07:00
Stanislau Hlebik
99dd200e34 mononoke: add FileChangeAggregation to split_batch_in_linear_stacks
Summary:
This is a new option in split_batch_in_linear_stacks - it either aggregates
file changes from all ancestors in the stack or not. Currently all of our
callsites wants Aggregate, but in the next diff we'll add a new callsite that
doesn't

Reviewed By: markbt

Differential Revision: D31022444

fbshipit-source-id: ce0613863855163f26ab18c7f35142ae569eb31a
2021-09-18 00:25:06 -07:00
svcscm svcscm
be85319381 Updating submodules
Summary:
GitHub commits:

6a0090dcd1
350658df93
8f73f455f1
6b393d9154
023baebbf0
41b304e7ae
55a4ef55eb

Reviewed By: bigfootjon

fbshipit-source-id: 3639093325bd445b5e4cff25a2186904e57e1d69
2021-09-17 23:22:46 -07:00
svcscm svcscm
c5d2ef8cf9 Updating submodules
Summary:
GitHub commits:

c37cf6bb0d
c616db3fef
20d9cb7227
7f48f2b4d3
eefe4785ca
22e46a1d59
68d2084b6b
f6575d5ab1
dd9cc18143
f0518ab67d

Reviewed By: bigfootjon

fbshipit-source-id: b07349dfb89102e78c2e579b6e5d9224d8dfcc3f
2021-09-17 22:23:01 -07:00
svcscm svcscm
c2de22c906 Updating submodules
Summary:
GitHub commits:

f1e38b789f
f630046dd9
13dfe88ebc
0ab83df9d3
481b7ce0fd
51299b5dcd
0017150d8d
7aba7a3dc4
589b202412
abbd36683a
ba5d8f8ce7

Reviewed By: bigfootjon

fbshipit-source-id: f448ea66aaf40d299568f37b8f266eca906daa8c
2021-09-17 21:28:30 -07:00
svcscm svcscm
94387f6e25 Updating submodules
Summary:
GitHub commits:

62887e3eea
b512f4bc76

Reviewed By: bigfootjon

fbshipit-source-id: 85f7ac0fd13d2ab5a8db10b6d1707b4df220454c
2021-09-17 20:27:26 -07:00
svcscm svcscm
5afb13c1b8 Updating submodules
Summary:
GitHub commits:

c4ea321333
6f899537b1
19f5b7ed25
1311c5eebf
8ba56e1d0c
f25977d3b5
fe091e8510
9038d7e483
e773b312ac

Reviewed By: bigfootjon

fbshipit-source-id: adc5479538a2bcd8843f9a2c2692975335710c48
2021-09-17 19:23:23 -07:00
svcscm svcscm
a9c7cb9d03 Updating submodules
Summary:
GitHub commits:

01f930ad7c
8cfe832382
17620a9dde
9a8fdbb036
67da4032e5
91d7421e27

Reviewed By: bigfootjon

fbshipit-source-id: 3d4065d28a1452b023f68d1e0f80286b9a5bdc76
2021-09-17 18:23:50 -07:00
svcscm svcscm
25ba521e9a Updating submodules
Summary:
GitHub commits:

52f1d094cf
b4c2a8f642
9c683c8615
ba48ff8303
58ca5c9bc4
1e9e417249
59f95bdf9a
919ed2845e
bace5c75d8

Reviewed By: bigfootjon

fbshipit-source-id: 99dfa97966cfcfe9306a7ab3308a5c672d68923e
2021-09-17 16:23:43 -07:00