Commit Graph

61341 Commits

Author SHA1 Message Date
Alex Hornby
9c93ce6b57 mononoke: remove derive_with_mode, appears to have no callsites
Summary: No callsites when I search

Reviewed By: StanislavGlebik

Differential Revision: D24389765

fbshipit-source-id: ed1985922a9c1af51afb37fb5e331d32c29fd09e
2020-10-27 02:37:41 -07:00
Alex Hornby
becc064c48 mononoke: add a BonsaiDerived::fetch_derived method that will get the derived data if present
Summary:
This diff adds a method BonsaiDerived::fetch_derived which is useful for callers currently doing BonsaiDerived::is_derived, and then BonsaiDerived::fetch_derived.

Using the new method cuts out one round trip to derived data, and simplifies calling code.   Usage of this in the walker when scrubbing fs nodes is in the next diff.

Reviewed By: StanislavGlebik

Differential Revision: D24311166

fbshipit-source-id: dc52a15076768a6a15ede6dd5872aaaf3f552b66
2020-10-27 02:37:41 -07:00
svcscm
eece6115e9 Updating submodules
Summary:
GitHub commits:

867a7df5cb

Reviewed By: jurajh-fb

fbshipit-source-id: 31826b5ee078eabe567bf946093434e44dfa9277
2020-10-27 02:37:41 -07:00
svcscm
1aa16bad50 Updating submodules
Summary:
GitHub commits:

e5dd4b460d
2782e42f77

Reviewed By: jurajh-fb

fbshipit-source-id: 774f8a1ccc1c5948bd18b1d48db55de10c39749c
2020-10-26 22:03:07 -07:00
Xavier Deguillard
0a3bc0c7d6 utils: fix SpawnedProcess.pipe test on @mode/win
Summary:
When built with buck, cmake isn't available, switch to a method of echoing that
should be available on every system: powershell.

Reviewed By: genevievehelsel

Differential Revision: D24493404

fbshipit-source-id: 5986b846a211be59f1057b1e7ecd924f3f7380a5
2020-10-26 20:56:17 -07:00
svcscm
9887b5f6cb Updating submodules
Summary:
GitHub commits:

0448cfd2d9
e90879cf91
2988ba752b

Reviewed By: jurajh-fb

fbshipit-source-id: 6f7b725e8b07e0f54fb191ddcc7135feed79bc42
2020-10-26 20:56:17 -07:00
svcscm
c8d57bf777 Updating submodules
Summary:
GitHub commits:

f9a8116a68
b6eacda51f
101e328981
505cbc78dd

Reviewed By: jurajh-fb

fbshipit-source-id: 7e44d83ac4faf69f23ed190ad63d8e882b5183a2
2020-10-26 18:09:03 -07:00
Durham Goode
87183d6b0f log: backout D24293498 about prefetching commit data
Summary:
D24293498 (ea03d62698) is causing 'hg log scm/metagit' to fail with weird revision
number lookup errors. Let's back it out for now.

Reviewed By: singhsrb

Differential Revision: D24549796

fbshipit-source-id: b10c4caf8fdadd2955ae1f829381c66d788042e6
2020-10-26 16:42:40 -07:00
svcscm
c425781c8d Updating submodules
Summary:
GitHub commits:

85db1ac113

Reviewed By: jurajh-fb

fbshipit-source-id: 076e99e860775c802bb78af66abe0d3241a43769
2020-10-26 14:09:14 -07:00
Xavier Deguillard
13236d6f8b prjfs: ignore access denied errors on invalidation
Summary:
We've had a handful of reports of access denied errors seen during an `hg
update`, ignore them due to:

```
// TODO(T78476916): The access denied are coming from
// PrjMarkDirectoryAsPlaceholder recursively calling into EdenFS, which
// is denied by the BAIL_ON_RECURSIVE_CALL macro.
//
// In theory this means that EdenFS is invalidating a directory that
// isn't materialized, ie: doing useless work. Despite having a negative
// performance impact, this doesn't affect correctness, so ignore for now.
//
// A long term fix will need to not issue invalidation on directories
// that aren't materialized.
```

Reviewed By: wez

Differential Revision: D24544622

fbshipit-source-id: 4f421836b6d8c7b527e860dcf55103e0e239e3ae
2020-10-26 14:02:16 -07:00
Chad Austin
45112fbf19 fix compilation warnings
Summary: Fix some build warnings that show up on macOS.

Reviewed By: wez

Differential Revision: D24436572

fbshipit-source-id: bd300110df79fe9d259c8f5ce2b1085cb85a0cac
2020-10-26 13:43:48 -07:00
Saurabh Singh
7fcc71e9d4 smartset: back out use Rust reentrant generator for generatorset
Summary: This is essentially a backout of D24365328 (9f664a8b30).

Reviewed By: DurhamG

Differential Revision: D24544495

fbshipit-source-id: 08f598df0892a8479fac563096f9782038e18dfe
2020-10-26 11:58:31 -07:00
svcscm
aa04fa6c9a Updating submodules
Summary:
GitHub commits:

fa7945b11c

Reviewed By: jurajh-fb

fbshipit-source-id: 9b8990bebe75ebac0c896f1e3372173a7f529f04
2020-10-26 11:58:31 -07:00
svcscm
e5c7e322d6 Updating submodules
Summary:
GitHub commits:

e49ee5a436
189128a8f0
924bb3baef
3f102545c5
ec3f731b3d
39aa7980fc
a89faad495

Reviewed By: yns88

fbshipit-source-id: 6eedb9c48e928c03405da9be31157d55fac4baf7
2020-10-26 08:31:53 -07:00
Mark Thomas
dfa28f4b7a bookmarks_movement: check repo lock state before moving public bookmarks
Summary:
Before allowing a bookmark to be moved, check whether the repo is read-only or not,
and deny the bookmark move if the repo is read-only.

This can be bypassed by setting the `BYPASS_READONLY=true` pushvar.

Reviewed By: krallin

Differential Revision: D24063027

fbshipit-source-id: 7b5f66e5d89058f6c5765b020149a81b674e795c
2020-10-26 07:56:31 -07:00
svcscm
5903136f3f Updating submodules
Summary:
GitHub commits:

9d16f21ddd
36111c1cf9
274b5df00f

Reviewed By: yns88

fbshipit-source-id: 62508cb882e7ae2bfc678f86132603391969377d
2020-10-26 05:33:52 -07:00
Stanislau Hlebik
114bb9eef5 mononoke: do not create rsync commit if there's nothing to move
Summary: There's no need to create an empty commit.

Reviewed By: krallin

Differential Revision: D24537264

fbshipit-source-id: 41a80fcbf5cab28b731dae53c58653ec4b434716
2020-10-26 05:30:53 -07:00
svcscm
a84c666adc Updating submodules
Summary:
GitHub commits:

30d9d17520
e99dd3611b
2ec0f0a581
26582c2b38
17d4f12719
225d9afcaf
29847f7261
dad6a0eb69
0f6d65e558
5c62149ea9
a419ffcf39

Reviewed By: yns88

fbshipit-source-id: 7a1d5866514b90fbd0fbd6fce7cb74fac433e5ad
2020-10-26 05:00:31 -07:00
Stanislau Hlebik
2a73f8d3aa mononoke: add more debug output to admin rsync
Summary: To make it clearer what's going on

Reviewed By: krallin

Differential Revision: D24534961

fbshipit-source-id: 049edbf1b6b648670a6c6ef68b14698a27ea1a0e
2020-10-26 04:57:44 -07:00
Stanislau Hlebik
713556c487 mononoke: add arguments to limit total file size in rsync command
Summary:
There are two new options (and one option was renamed):
1) First option (--file-size-limit) adds a way to limit total size of moved files
2) Second option (--lfs-threshold) adds a way to exclude size of the files that
are above the threshold from --file-size-limit calculations. This option can be
useful if we want to limit the total size of the bundle that will be created in
mononoke hg sync job - files that are above or equal to lfs threshold are not included
in the bundle, so no need to count their size.

Reviewed By: krallin

Differential Revision: D24534959

fbshipit-source-id: 6323e4d52802c00dc67270b08f671b0789ab262f
2020-10-26 04:57:44 -07:00
Stanislau Hlebik
ea92153c36 mononoke: add a pushrebase command to mononoke_admin
Summary:
a simple command that can be used to pushrebase a commit. Note that this
command is very low level so it skips a lot of checks that we do during the
normal push process (e.g. it doesn't run hooks).

Reviewed By: krallin

Differential Revision: D24534960

fbshipit-source-id: 0f1e27005fa450c86c310d66e3215747ca6a49e2
2020-10-26 04:57:44 -07:00
Meyer Jacobs
5a6ef9c5f7 history: introduce separate wire types for history API
Summary: This change adds wire types for the history API in the most straightforward way possible. In a future change, I'll move the `WireHistoryEntry` / `HistoryResponseChunk` conversion logic into the `ToApi` implementation. This implementation also doesn't add per-item errors, or standardize `history` to match the protocol evolution standards used by `trees`.

Reviewed By: kulshrax

Differential Revision: D24342046

fbshipit-source-id: d46403a823f2a1e89ad9d6d2074241d8bfe4810e
2020-10-25 18:39:34 -07:00
Meyer Jacobs
41b1d08cd7 types: optimize serialization of fixed-length byte arrays
Summary: This change introduces custo `Serialize` and `Deserialize` implementations for wire types containing a fixed-length byte array. This change is more verbose than should be necessary. Because `TryFrom` is implemented to convert `&[T]` to `[T; N]` and `AsRef` to convert `[T; N]` to `&[T]`, we should be able to use a generic serde `with = ` attribute on the byte array fields of the appropriate structs. Unfortunately, I'm getting a lifetime issue that I haven't been able to resolve, and const generics aren't available on stable to implement the trait bounds without an explicit lifetime.

Reviewed By: kulshrax

Differential Revision: D24460527

fbshipit-source-id: d3a4179b833a523ce164d3df934e4cbdc2202546
2020-10-25 18:39:34 -07:00
Meyer Jacobs
02b7fcc90a trees: use separate type for child metadata entries
Summary:
Removes top-level metadata from `TreeEntry` and add a new, specialized type for carrying child entry metadata, `TreeChildEntry`. This change also fully removes the `revisionstore_types::Metadata` from EdenAPI trees, which is only used on files.

In a follow up change I'll optimize handlings of paths / path segments in `TreeChildEntry` keys. Right now they need to be joined manually.

Reviewed By: kulshrax

Differential Revision: D24434716

fbshipit-source-id: d0739471b1f6cef58b435e10b5fb774bfb08f7f6
2020-10-25 18:39:34 -07:00
Meyer Jacobs
0ccae1cef9 errors: introduce per-item errors to EdenAPI protocol
Summary: Rather than silently dropping entries which cannot be fetched, this change has the `WireTreeEntry` type carry optional error information, allowing it to be (de)serialized to / from `Result<TreeEntry, EdenApiServerError>` instead of a bare `TreeEntry`. Currently, handling of these failures is up to the individual application code, but it might be useful to introduce utility functions to drop failed entries and log errors.

Reviewed By: kulshrax

Differential Revision: D24315399

fbshipit-source-id: 94e4593b77cf2dc12d0dcc93d174c8a4eda95344
2020-10-25 18:39:34 -07:00
svcscm
7a9474fbfd Updating submodules
Summary:
GitHub commits:

f9fc3798b1
d4fbd06b45
996e9b0e73
576ce88b0a
715bb35754
96db1d714c
996547fa66
58faea6f33
fada185af9
4f20424264

Reviewed By: yns88

fbshipit-source-id: a04e7aaad31c1757891cf0310cb2aa5e1eaec44a
2020-10-25 18:39:34 -07:00
svcscm
0271753d02 Updating submodules
Summary:
GitHub commits:

bbe874db5d
d95d017552
88cdec2669
5cdac587f3
8587bb59a4
3b87aa5908
c67c2fe4e7
ffe112bb1c
ad2fb93cfc
e52168c76f
8d994a6601
fed5b0221c

Reviewed By: yns88

fbshipit-source-id: 83b4b8ffee2bd3b58c9b022faf50f8b08e1bf428
2020-10-25 03:42:07 -07:00
Jun Wu
2ed5791086 fbscmquery: use str(err) instead of err.message
Summary:
`message` is not longer an attribute of an exception object in Python 3.  Avoid
using it. This avoids turning rendering `{mirrornode}` template into a crash like:

  Traceback (most recent call last):
    File "edenscm/hgext/fbscmquery.py", line 78, in mirrornode
      return client.getmirroredrev(reponame, "hg", torepo, totype, node)
    File "edenscm/hgext/extlib/phabricator/graphql.py", line 399, in getmirroredrev
      self._raise_errors(ret)
    File "edenscm/hgext/extlib/phabricator/graphql.py", line 504, in _raise_errors
      raise ClientError(None, errormsg)
  edenscm.hgext.extlib.phabricator.graphql.ClientError: The provided crypto auth token(s) are expired. Check to make sure you have specified a long enough expiration time for your crypto auth token(s).
  During handling of the above exception, another exception occurred:
  Traceback (most recent call last):
    File "edenscm/mercurial/commands/__init__.py", line 4225, in log
      displayer.show(
    ....
    File "edenscm/mercurial/templatefilters.py", line 422, in byteify
      return b"".join([byteify(t) for t in thing if t is not None])
    ....
    File "edenscm/mercurial/templater.py", line 391, in evalstring
      return stringify(evalrawexp(context, mapping, arg))
    File "edenscm/mercurial/templater.py", line 350, in evalrawexp
      return func(context, mapping, data)
    File "edenscm/hgext/fbscmquery.py", line 83, in mirrornode
      mapping["repo"].ui.warn(_x(str(e.message) + "\n"))
  AttributeError: 'ClientError' object has no attribute 'message'

Reported by: arnabde03

Reviewed By: mofarrell

Differential Revision: D24528362

fbshipit-source-id: 57d093811986f3a65d1201de1f9aed3770db2ad1
2020-10-24 17:52:01 -07:00
svcscm
cfaaf8d22b Updating submodules
Summary:
GitHub commits:

ce17521000

Reviewed By: yns88

fbshipit-source-id: 529162dea1ea00cd1b195ba0c4de6942b1a7ac20
2020-10-24 07:24:52 -07:00
Simon Farnsworth
7e06175e61 Make config store always explicit
Summary: In D24447404, I provided some utility functions that allowed me to avoid constructing and/or passing around a ConfigStore. Remove those functions and fix up the code to run.

Reviewed By: krallin

Differential Revision: D24502692

fbshipit-source-id: 742dbc54fbcf735895d6829745b9317af14dfa0b
2020-10-24 06:23:49 -07:00
Simon Farnsworth
00871310a7 Ensure we have only one ConfigStore for the application
Summary: It's designed as a singleton store for normal use - rather than have lots of ways to get different config stores, let's use one global store

Reviewed By: krallin

Differential Revision: D24447404

fbshipit-source-id: 6ecc46351b14794471f654cec98527a11a93d3ef
2020-10-24 06:23:49 -07:00
svcscm
9d4f8f31d1 Updating submodules
Summary:
GitHub commits:

af8630489d

Reviewed By: yns88

fbshipit-source-id: 5850f916bb81621b1a1fd2111bc46b4953b4b9e5
2020-10-24 06:23:49 -07:00
svcscm
c1d9cd7049 Updating submodules
Summary:
GitHub commits:

aa5e4bf208
b59acfa385
5ff4569549
05786142e6
7e3088ccb0
0fa6f2f529
43846731fd
a2f7326aa4
779ed09eb1
068f8c943d
9f44bf4178
afa0bd5de6

Reviewed By: yns88

fbshipit-source-id: e599ca091ac235891efcfcbf7b351772ebd52671
2020-10-24 02:33:02 -07:00
Dave Rigby
0e98381071 FindGlog: Add support for 'glogd' Debug library (#1479)
Summary:
Glog v0.4.0 when configured with Debug build type adds a 'd' suffix to
the library file. This results in FindGlog.cmake failing to locate it.

Update FindGlog.cmake to use check for 'glogd', and use
select_library_configurations() to set GLOG_LIBRARY to the correct
found filename.

(Note: this has no effect if a non-Debug type is used.)

Pull Request resolved: https://github.com/facebook/folly/pull/1479

Reviewed By: yfeldblum

Differential Revision: D24503510

Pulled By: Orvid

fbshipit-source-id: 705df05a4a3d7df2df8af3bb66c319fb044adbce
2020-10-24 01:18:21 -07:00
Chad Austin
496c69e182 allow masking trace events
Summary:
Sometimes you only want to trace writes into the EdenFS checkout, so
add the ability to run `eden strace` with `--reads`, `--writes`, or
both in order to see only those events.

Reviewed By: wez

Differential Revision: D24468539

fbshipit-source-id: a1b3c730987cf86ce3d39952c6a5e9c5edaddfc2
2020-10-23 19:53:00 -07:00
svcscm
9b2fd0e94d Updating submodules
Summary:
GitHub commits:

348007db56
1e77d94bb3
7f894bbec9
07c7c1dd91
9e00bb0de8

Reviewed By: yns88

fbshipit-source-id: e67dc3dcea2a1445ce1e46bdf463f79fc0922d41
2020-10-23 19:53:00 -07:00
svcscm
3617c5a23a Updating submodules
Summary:
GitHub commits:

81db842b42
fdd751a1ff
6d1a4c8d94
505179b125
df1b6cd2ca
de8ec06a4b
c10b2349d3

Reviewed By: yns88

fbshipit-source-id: 5aee84cb8c60af18b5b757955173603c6c2a2100
2020-10-23 13:21:37 -07:00
Mateusz Kwapich
1c153d47bb make replaybookmarks py3-compatible
Reviewed By: DurhamG

Differential Revision: D24508222

fbshipit-source-id: 091ff81cae49ff7e4882edd59ace6f024e26c426
2020-10-23 12:37:01 -07:00
Chad Austin
81d18bde42 allow querying Overlay file size outside of FileInode
Summary: Allow calling into OverlayFileAccess::getFileSize from outside of FileInode.

Reviewed By: xavierd

Differential Revision: D24300035

fbshipit-source-id: 2a5fc730122a79220fd38c928b74342433c4e9f2
2020-10-23 11:16:10 -07:00
Chad Austin
cc8c4c4ceb refactor debugInodeStatus
Summary:
Before replacing the existing debugInodeStatus changes, make some
small refactorings to help me understand it.

Reviewed By: xavierd

Differential Revision: D24299970

fbshipit-source-id: 3b60aa8365bb9a45e12357374282ba837ccc36eb
2020-10-23 11:16:10 -07:00
Chad Austin
ba39580899 add observed inode traversal functions
Summary:
Add a function that makes it easy to traverse EdenFS's view of the
traversed-so-far filesystem.

Reviewed By: xavierd

Differential Revision: D24299962

fbshipit-source-id: 275c849846bf45a2e80780411d60266b961d825b
2020-10-23 11:16:10 -07:00
Jan Mazur
7476abd217 log commits with changeset id to scribe
Summary:
Adding number of changed files to mononoke_commit and mononoke_commit_draft scribe categories.

I need to create scuba table for mononoke_commit scribe category.

Reviewed By: krallin

Differential Revision: D24390738

fbshipit-source-id: 80b9917751a42377b49190cbb2f650a21b086e74
2020-10-23 07:46:15 -07:00
Pavel Aslanov
23fc168668 convert ManifestOps to new style futures
Summary:
- convert ManifestOps to new style futures
- at this point `//eden/manifest:manifest` crate is completely free from old style futures

Reviewed By: krallin

Differential Revision: D24502214

fbshipit-source-id: f1cdb11bd8234f22af5c905243f71e1e9fca11f1
2020-10-23 06:42:35 -07:00
Pavel Aslanov
af0933e044 convert manifest tests to new style futures
Summary: Convert manifest tests to new style futures

Reviewed By: farnz

Differential Revision: D24464328

fbshipit-source-id: 0b95d526b43b13384ec6ec5a4791b06f154c9b23
2020-10-23 06:42:35 -07:00
Pavel Aslanov
129c89972b convert manifest derivation to new futures
Summary: `derive_manifest_*` functions are now based on new futures and use new bounded_traversal

Reviewed By: krallin

Differential Revision: D24448824

fbshipit-source-id: 5af06851f9c48a73e53daafe1f4972c186a5ca80
2020-10-23 06:42:35 -07:00
Kostia Balytskyi
0f104b8b00 commit_rewriting: make CommitSyncConfigVersion serializable into mysql
Summary: Somewhat more convenient to work with, no need to look inside.

Reviewed By: StanislavGlebik

Differential Revision: D24474898

fbshipit-source-id: 7ee0920e7d0d5a2102c68695a5cc0d9e237d958d
2020-10-23 04:59:49 -07:00
Simon Farnsworth
2649095959 hg: check reponame when looking diffs via GraphQL
Summary:
Users get confused and try to pull from the wrong repo - e.g. `hg checkout D23665606` in `fbsource` - and find the resulting output about missing hashes scary.

Give them a nice clear error instead.

Reviewed By: wez

Differential Revision: D24485097

fbshipit-source-id: e9aeb7ed6aaf494f828d736ca5203100807fb321
2020-10-23 04:21:01 -07:00
svcscm
b7203b4cc5 Updating submodules
Summary:
GitHub commits:

a09f3efbd3
a947fd995c
1592db4a5b
b9967031db

Reviewed By: yns88

fbshipit-source-id: 2ac90d17b7cb8860cf5cb4ce2fb2d60a8bcf72fa
2020-10-23 01:52:58 -07:00
Stanislau Hlebik
f10d1bb5d4 mononoke: add an option exclude files from rsync
Reviewed By: ikostia

Differential Revision: D24475159

fbshipit-source-id: e955dd37a8e222dfc56cf0311d8f57a76e73e0c4
2020-10-23 01:23:39 -07:00
svcscm
a43808bbec Updating submodules
Summary:
GitHub commits:

a7c4b5ba08

Reviewed By: yns88

fbshipit-source-id: 8c043b79df6c7e3ab06b8836cca2095e867594cc
2020-10-23 01:23:39 -07:00