Commit Graph

66217 Commits

Author SHA1 Message Date
Jun Wu
3eb2eb2257 importhelper: request restart for non-lazy -> lazy changelog migration
Summary:
If the repo changelog was migrated to lazy, existing processes including the
import helpers might start failing to resolve commits. Detect that, and request
a restart of the import helper.

An example traceback:

  edenscm.mercurial.error.RepoLookupError: unknown revision 'ce48ccc4197b2066a8c7f2a930cee89e8aea6379'
  2021-06-29 12:33:12,738 error processing command 4
  Traceback (most recent call last):
    File "edenscm/mercurial/commands/eden.py", line 363, in process_request
      cmd_function(req)
    File "edenscm/mercurial/commands/eden.py", line 604, in cmd_manifest_node_for_commit
      node = self.get_manifest_node(rev_name)
    File "edenscm/mercurial/commands/eden.py", line 821, in get_manifest_node
      return self._get_manifest_node_impl(rev)
    File "edenscm/mercurial/commands/eden.py", line 790, in _get_manifest_node_impl
      node_hash = ctx.manifestnode()
    File "edenscm/mercurial/context.py", line 569, in manifestnode
      return self._changeset.manifest
    File "edenscm/mercurial/util.py", line 987, in __get__
      result = self.func(obj)
    File "edenscm/mercurial/context.py", line 540, in _changeset
      return self._repo.changelog.changelogrevision(self._node)
    File "edenscm/mercurial/changelog2.py", line 374, in changelogrevision
      return changelogrevision(self.revision(nodeorrev))
    File "edenscm/mercurial/changelog2.py", line 463, in revision
      p1, p2 = self.parents(node)[:2]
    File "edenscm/mercurial/changelog2.py", line 610, in parents
      parents = list(self.dag.parentnames(node))
  error.CommitLookupError: '<int> cannot be found'

Reviewed By: andll

Differential Revision: D29470181

fbshipit-source-id: 40ad6eebe1f656c63d3f96b2b70ad60b350eed21
2021-06-29 16:47:49 -07:00
Xavier Deguillard
0cc10bd188 testpilot: testpilot is broken on Sandcastle
Summary: Hack to use parexec and the par directly.

Reviewed By: chadaustin

Differential Revision: D29461444

fbshipit-source-id: 9ac6c1aa43728782b8de0a71446109f7fd5dab1d
2021-06-29 16:29:26 -07:00
svcscm svcscm
a63ade089b Updating submodules
Summary:
GitHub commits:

e43a926fd0
57f196647f
9773c660d5
80ab577aaa
06b51f9974
3bea1efb4f
5ee0c84e64
913394ca01
32d59ce5ee

Reviewed By: yns88

fbshipit-source-id: ed11d12f1769b1a90b8f4dd4c5aa09211336f052
2021-06-29 16:16:00 -07:00
svcscm svcscm
c983cc9e47 Updating submodules
Summary:
GitHub commits:

87fa51da8d
a6a6072016
f1e829afd8
ad508ef1d3
a0c5979d72
cba2266d84
229d3580e5
c063d7982c
5c1452ef4d
f12458690d

Reviewed By: yns88

fbshipit-source-id: c02a7a43d3dcaa6d81638ed9a87889efce05f129
2021-06-29 15:49:04 -07:00
Jun Wu
df7fc44718 localrepo: improve edenapi None error reporting
Summary:
Previously the None edenapi error isn't great for understanding what's going on:

  File "edenscm/mercurial/changelog2.py", line 123, in _openhybrid
    inner = bindings.dag.commits.openhybrid(
  TypeError: Expected type that converts to client but received NoneType

Let's make edenapi non-nullable by default, with nicer error messages, and make
places using the nullable edenapi opt-in explicitly.

Example errors:

  % lhg sl --config edenapi.url=
  abort: edenapi is required but disabled by missing edenapi.url config

  % lhg sl --config edenapi.enable=
  abort: edenapi is required but disabled by edenapi.enable being empty

  % lhg sl --config paths.default=/tmp
  abort: edenapi is required but disabled by paths.default being 'file:'

  % lhg sl --config paths.default=ssh://x --config ui.ssh=dummyssh
  abort: edenapi is required but disabled by paths.default being 'ssh:' and dummyssh in use

Reviewed By: kulshrax

Differential Revision: D29462258

fbshipit-source-id: 84fab5a7cce837c52ccb8108d1f4fe44ef2b6d1e
2021-06-29 15:46:00 -07:00
Jun Wu
d5cc8e6224 localrepo: enable edenapi more reliably
Summary:
D29372739 (ef79c2d811) caused issues that repo.edenapi becomes None due to scheme being ssh
(hit by markbt) or fb (hit by StanislavGlebik). Given that it's just legacy tests
that do not want EdenAPI, let's use a blacklist for legacy tests, instead of a
(fragile) whitelist for where EdenAPI should be enabled.

Reviewed By: kulshrax

Differential Revision: D29461305

fbshipit-source-id: 4a0317747d9ee3412ffdfdb25dc0d8383305a25c
2021-06-29 15:46:00 -07:00
svcscm svcscm
f17fd36c75 Updating submodules
Summary:
GitHub commits:

ec15ad3d4c

Reviewed By: yns88

fbshipit-source-id: 0c671a6c76d572725597b27baba18716a968a731
2021-06-29 14:51:51 -07:00
Jun Wu
23797a9437 doctor: fix compatibility with lazy changelog
Summary:
To construct a lazy changelog, the repo object needs to have `name` and `edenapi`. Implement them.
Besides, print why changelog fails to open with `--debug` or `--traceback`.

Reviewed By: andll

Differential Revision: D29468005

fbshipit-source-id: 5815e0d9313dac897f20fa32668cae05ba90c727
2021-06-29 13:16:05 -07:00
svcscm svcscm
194361994c Updating submodules
Summary:
GitHub commits:

5d4ae926f6
2c043d7635
93a7389442
041438b9a7
5c895d5b20

Reviewed By: yns88

fbshipit-source-id: 8c95b267446f1e514f88e6f358f26d0e3aca1835
2021-06-29 12:33:48 -07:00
Pyre Bot Jr
b0ad4f06b6 suppress errors in fbcode/eden - batch 1
Reviewed By: chadaustin

Differential Revision: D29457835

fbshipit-source-id: 6507be023601f42ada35f572ec5f21cb401cad2f
2021-06-29 12:29:06 -07:00
svcscm svcscm
62bc44762c Updating submodules
Summary:
GitHub commits:

032d0a80fc
3b9d4c76a7
4688ccf079
c844281519
020d080cc7
12bb3e2f9f

Reviewed By: yns88

fbshipit-source-id: eefdceccdbd4ad90da35669910f7052d4f20c0c5
2021-06-29 11:54:41 -07:00
svcscm svcscm
a07615fe4c Updating submodules
Summary:
GitHub commits:

c07abeaf5e
088ffeee1b
8cf731a9fc
67eda7182b
bb26055a38
3503f28982
55b214bb82
3750dc5c1b
95436152ca
568d0d0942
8dbd56f510
ecca2c24cd

Reviewed By: yns88

fbshipit-source-id: 22b8c4d82e5ba5f03ea51f6c9ca63a0d30bbcb7c
2021-06-29 11:34:10 -07:00
Mark Juggurnauth-Thomas
626095504d metaconfig: add BlameVersion
Summary: Add the `BlameVersion` enum to distinguish configured blame versions.

Reviewed By: StanislavGlebik

Differential Revision: D29453807

fbshipit-source-id: c9f912714010585fbed05f56bbae8e0fb3e92e44
2021-06-29 10:32:40 -07:00
Mark Juggurnauth-Thomas
a533bd24ea sync configerator thrift
Reviewed By: StanislavGlebik

Differential Revision: D29453806

fbshipit-source-id: 4897f7feb6f09371cd3963d9ed30e37403b24ba2
2021-06-29 10:32:40 -07:00
svcscm svcscm
022bc07457 Updating submodules
Summary:
GitHub commits:

46092c79a3
e05266aea8
32cdf0f431
57d7b1d7a3
a1362ba4fe
8d0c8bdbdd
6237d840bd
580cab4af4
7c60d96ce0
4619cccd1d

Reviewed By: yns88

fbshipit-source-id: fd4ab946e715c7c6737d9e6c60452bc7743cb9e1
2021-06-29 10:29:56 -07:00
Genevieve Helsel
58188931c3 file access logging in FileInode
Summary:
This is adds file access logging in the Inode layer of the code. We log the cause (channel, thrift, unknown) and the cause detail (which is the FUSE opcode for fuse, function name for thrift). We do the work on a worker thread since we need to traverse the inode map to translate an inode number to a file path. The workerthread in this code is largely based off of the one in the ProcessNameCache.

At this moment, I am not worrying about logging inode creation as a file access. The nice thing about putting this in FileInode is that it should be able to be used by NFS for free.

I've left a TODO in the code about not logging files that match gitignore patterns since its not a hard blocker for this to land.

Reviewed By: kmancini

Differential Revision: D29128258

fbshipit-source-id: 3e08a3567fed937a381b58847ea83569d70f0ea2
2021-06-29 09:45:47 -07:00
Genevieve Helsel
09a16a72aa store EdenServer* in HiveLogger
Reviewed By: xavierd

Differential Revision: D29234427

fbshipit-source-id: 711f5eda4a8df9be0f31bc330fcfc54520e25400
2021-06-29 09:45:46 -07:00
Genevieve Helsel
9b4909d022 create util EdenTaskQueue from NfsTaskQueue
Summary: NfsTaskQueue can be made more generic to be shared across the codebase, so this makes it its own target in `eden/fs/utils` w/ the name EdenTaskQueue.

Reviewed By: xavierd

Differential Revision: D29244762

fbshipit-source-id: 78348f2ff8fa66bc801aefe7d6b3905e0da278e8
2021-06-29 09:45:46 -07:00
Genevieve Helsel
1cd9f63916 rename EdenMount's getThreadPool to a more descriptive getServerThreadPool
Summary: Just to be more specific, lets be explicit about that this is the serverThreadPool that the mount is returning.

Reviewed By: xavierd

Differential Revision: D29244719

fbshipit-source-id: 015a2e8198c418c6fb5a89234274eefb329848fe
2021-06-29 09:45:46 -07:00
Genevieve Helsel
b6ac67eeae store ReloadableConfig pointer in HiveLogger
Summary: In order to access the kill switch for file access logging, we need to store a EdenConfig pointer in the HiveLogger.

Reviewed By: xavierd

Differential Revision: D29120227

fbshipit-source-id: c828bbbf551c7096877bfa763edc29ef133afb41
2021-06-29 09:45:46 -07:00
Genevieve Helsel
ce1cc3ea2b Create HiveLogger boilerplate and thread it through EdenFS to the ServerState
Summary: This creates a HiveLogger and threads it through to the ServerState.

Reviewed By: xavierd

Differential Revision: D29119501

fbshipit-source-id: d0b74733d8832d604f8f4cf0af28e767dbddeddf
2021-06-29 09:45:46 -07:00
svcscm svcscm
440375e25c Updating submodules
Summary:
GitHub commits:

c03e671e4b
89f66d4484

Reviewed By: yns88

fbshipit-source-id: ae075d06e3a60f5344f5fd5986bafe1924e3266a
2021-06-29 09:44:09 -07:00
svcscm svcscm
db66a5cb79 Updating submodules
Summary:
GitHub commits:

51e4ab0017
5ba3496699
642ad42ca7
337ba55982

Reviewed By: yns88

fbshipit-source-id: 3111da11d6cc2a0d0b119689948a1b2d0337075a
2021-06-29 04:13:40 -07:00
svcscm svcscm
1078265547 Updating submodules
Summary:
GitHub commits:

70da9b6bac

Reviewed By: yns88

fbshipit-source-id: 38395aa647b91c303cd848403a928a2622b8f318
2021-06-29 03:28:36 -07:00
svcscm svcscm
5b1bf7b145 Updating submodules
Summary:
GitHub commits:

38d23f9ad9
5df6f37401
22dfd9686d
c08cc89748

Reviewed By: yns88

fbshipit-source-id: 0a47558fb7844f24188b31d4492308342c94cab7
2021-06-29 01:28:09 -07:00
svcscm svcscm
b640dd6c8a Updating submodules
Summary:
GitHub commits:

bd5503c997

Reviewed By: yns88

fbshipit-source-id: 9d2501e0051e3d1b6dc15727d2e314d06b2ec635
2021-06-29 00:37:07 -07:00
svcscm svcscm
ae1d8bed1d Updating submodules
Summary:
GitHub commits:

9d82d26927
36fac8eb64
e4455a784a
5ddcbe43f3
66dfa8f55a

Reviewed By: yns88

fbshipit-source-id: 90ca2fd6489fc00365f0af93b598556d1ac72763
2021-06-28 22:19:20 -07:00
svcscm svcscm
0fa5741ae2 Updating submodules
Summary:
GitHub commits:

5976312dcc
721ac7f01a
da7fbbc05d

Reviewed By: yns88

fbshipit-source-id: 99d1a1614c4cd1a09b9307072d77bc411620edd5
2021-06-28 20:47:42 -07:00
Claire Alexandra Cate
17e02d6ca0 Add edenapi_retries to FileStore
Summary: Add edenapi_retries to FileStore

Reviewed By: kulshrax

Differential Revision: D29107328

fbshipit-source-id: 2e782648af811983f3fa359585311455970ed65b
2021-06-28 18:31:01 -07:00
Genevieve Helsel
19705d9e8a add getRepoName in EdenMount
Summary: This just adds a method to get the repoName out of the EdenMount for logging purposes.

Reviewed By: xavierd

Differential Revision: D29113121

fbshipit-source-id: 9ebb4ac588839a99f25f4e884a7a132f5793e49e
2021-06-28 18:19:05 -07:00
Carolyn Busch
0d91553914 tests: fix test-debugchangelog.t
Summary: Looks like another test needs updating after D29437983 (5b1b1febc1).

Reviewed By: quark-zju

Differential Revision: D29446063

fbshipit-source-id: c71684609830b6ec047a2efc615b806dd2a0066b
2021-06-28 17:46:06 -07:00
svcscm svcscm
edb275d694 Updating submodules
Summary:
GitHub commits:

3c3e9c1fb7
772a2033a0
93047f2e34
e7a74d4d7b

Reviewed By: yns88

fbshipit-source-id: fc78f52396e68959d81f97b8e8a5537c1406e0ee
2021-06-28 16:23:42 -07:00
svcscm svcscm
5b4327fc82 Updating submodules
Summary:
GitHub commits:

78a8de054c
f872e8e167
989002d767
c03a261f0f
6d24eea28d

Reviewed By: yns88

fbshipit-source-id: cef1ef9819a22329665f89a639b89ee6e1d91a12
2021-06-28 16:00:13 -07:00
svcscm svcscm
8f928f0344 Updating submodules
Summary:
GitHub commits:

dc5ce4e791
99afc0852b
8e0a3e7eb6
ba609a5ab2
1f97ba3767
44fb4dffae
8e38012ba2
1dad3dec68

Reviewed By: yns88

fbshipit-source-id: 69a27ca4cd9188b402c1b23def5fe33ae2435a6e
2021-06-28 15:13:09 -07:00
Jun Wu
e5fe117d81 pullcreatemarkers: do not use legacy commit scan with lazy pull fast path
Summary:
With lazy pull fast path, the legacy commit scan will trigger one-by-one id
resolution, which is terrible and defeat the purpose of laziness. Let's just
force graphql path instead.

Reviewed By: andll

Differential Revision: D29440142

fbshipit-source-id: 4b0d10e6f5a3eb0533b2d95b1889a1f1c1f281cb
2021-06-28 14:36:39 -07:00
Jun Wu
38f3ceafbc hgcommits: add a way to inject failure on resolving ids remotely
Summary:
Similar to D29404057 (cedddd1c8d), add a way to disable resolving IDs by setting
a limit using `EDENSCM_REMOTE_ID_THRESHOLD`.

Reviewed By: andll

Differential Revision: D29440143

fbshipit-source-id: 30409089493ae2cd5c189e37b0d4f88df9a6d8e8
2021-06-28 14:36:39 -07:00
Jun Wu
5b1b1febc1 nameset: do not resolve nullid remotely
Summary: The Rust NameSet does not have nullid. Do not bother resolving remotely.

Reviewed By: kulshrax

Differential Revision: D29437983

fbshipit-source-id: f1eb73e738281b3b5096fba22ba92833f5a4f3ee
2021-06-28 14:36:39 -07:00
svcscm svcscm
b10e2e8efa Updating submodules
Summary:
GitHub commits:

8ef908529a
291e513b8f
88be1a7bcc
5bd0efe252
373e3a154d
30b2294142
348eb060af
259b0f7bf9
7fa3a9fc8e
c607cb65cb

Reviewed By: yns88

fbshipit-source-id: 52b34660676402e37448e8e72e5ee19d81cc508f
2021-06-28 14:13:13 -07:00
Stanislau Hlebik
34e3181969 store: fix metadata importing
Summary:
See this graph - https://fburl.com/scuba/mononoke_blobstore_trace/77nyw174. It
shows that there was a huge jumps in the number of "hgmanifest" fetches from
scs that didn't exist in the manifold. This is not great for mononoke, because
it uses a significant chunk of our manifold qps capacity (~30K qps on average,
with spikes going up to 100K qps). The main suspect here is
repo_list_hg_manifest method, because few other scs methods (if any) fetch hg
data.

It correlates with the release of new eden version on June, 23, which added
getTreeBatch() method, and looks like it was passing manifest hash and eden id
in the wrong order. See https://fburl.com/code/tsjwss8a

```
proxyHash.revHash(), // this is really the manifest node
```

This is a comment in `getTree()` method which says that `proxyHash.revHash()`
is manifest id, which is exactly what we need to send to scs.

[ScsMetadataImport::getTreeMetadata](https://fburl.com/code/xammvq2k) suggests
that the second parameter should be manifestId (i.e. proxyHash.revHash()), but
we were passing them in the wrong order. Let's fix it.

Reviewed By: xavierd

Differential Revision: D29428581

fbshipit-source-id: d041008f00c7519504c6c67173ca85709e9dc415
2021-06-28 13:43:54 -07:00
Meyer Jacobs
d4fa04b2d8 scmstore: remove unused crate dependencies
Summary: Fix warning after removing old scmstore implementation.

Reviewed By: andll

Differential Revision: D29410137

fbshipit-source-id: bd56e1806ec451da290fa345fae0ecb19d10b849
2021-06-28 13:30:09 -07:00
Jun Wu
4ecb46990a pull: use heads(master_group) as the "old" master in fast path
Summary:
The remotenames information might be out of sync with the DAG.
Use the DAG's master group's head for the pull fast path "old" master so that
even if the remotenames is stale for some reason, the fast path still works.

Reviewed By: andll

Differential Revision: D29434719

fbshipit-source-id: 7bbd0757dc6a9428f86663ac4989f7c30b365b46
2021-06-28 12:50:26 -07:00
Jun Wu
a9e414b833 dag: add an API to obtain the master group
Summary: Will be used by the next change.

Reviewed By: andll

Differential Revision: D29434722

fbshipit-source-id: 74dbec506fb0985379480815380118cd41058aec
2021-06-28 12:50:26 -07:00
Jun Wu
0e125b2246 pull: add a test about a suboptimal case
Summary:
If a user Ctrl+C-ed (or something else interrupts) between flushing changelog
and flushing metalog (remotenames).  The pulled commits will exist in the local
graph and break the next time using the fast path.

Reviewed By: andll

Differential Revision: D29434720

fbshipit-source-id: e7ca7542691279644679effb06707a1d305541af
2021-06-28 12:50:26 -07:00
Jun Wu
285d8646ef pull: ui.debug => tracing.debug
Summary:
This is a better practice. It avoids debug messages from other places (ex.
discovery).

Reviewed By: andll

Differential Revision: D29434721

fbshipit-source-id: 5990f0174e9b61aed7d9d56252df63b571364070
2021-06-28 12:50:25 -07:00
Jun Wu
bb7914ab50 remotenames: skip pull for modern clone paths
Summary:
The remotenames has logic to work with legacy clones to write the remotenames
state. However, modern clone paths take care of remotenames directly so there
is no need to do an extra pull by remotenames.

Reviewed By: DurhamG

Differential Revision: D29428883

fbshipit-source-id: a73c0ee716b09f4e34d6fa30997f961284678d13
2021-06-28 12:25:17 -07:00
Jun Wu
4c51695bf3 clone: reload config after writing hgrc
Summary:
This makes it pick up some `%include` configs and can avoid some surprises.

Also remove the manual `paths.default` setconfig. That seems to cause
`destrepo.edenapi` being `None` and break lazy changelog clone paths.

Reviewed By: DurhamG

Differential Revision: D29428882

fbshipit-source-id: bafeb195a560e35be17355b793613b60d97fbecf
2021-06-28 12:25:17 -07:00
Jun Wu
e454f71fa9 localrepo: write .hg/reponame on repo creation
Summary: Make dynamicconfig pick up the repo name because hgrc gets written.

Reviewed By: DurhamG

Differential Revision: D29428878

fbshipit-source-id: fbf578cd7c770a4541fff3b85ff40c40cd5a6cc5
2021-06-28 12:25:17 -07:00
Jun Wu
8186a5400b dynamicconfig: read .hg/reponame as repo name fallback
Summary: This will be used by the next change.

Reviewed By: DurhamG

Differential Revision: D29428879

fbshipit-source-id: 69e0ffac12fb9c442488d59ea8faa0ea4b47a2c1
2021-06-28 12:25:17 -07:00
Jun Wu
a588c44c28 dynamicconfig: add a way to forbid empty repo name
Summary: This makes it easier to figure out a traceback using an empty repo name.

Reviewed By: DurhamG

Differential Revision: D29428881

fbshipit-source-id: 95a09c691e3d921ad4f960a39002f71ec879d927
2021-06-28 12:25:17 -07:00
Jun Wu
91f01464e6 dynamicconfig: include reponame and username in header comment
Summary:
This makes it easier to debug wrong reponame issues.

In theory those need to be checked and the config needs to be regenerated if
they are changed for correctness. Given that username and reponame are rarely
changed, I saved it for later.

Reviewed By: DurhamG

Differential Revision: D29428880

fbshipit-source-id: f996af6a7a1e329faaa8b0a53dac8621fa94dac8
2021-06-28 12:25:17 -07:00