Commit Graph

76154 Commits

Author SHA1 Message Date
Genevieve Helsel
57fff0e729 addressing post review comments from BufferedTreeOverlay stack
Reviewed By: chadaustin

Differential Revision: D38247021

fbshipit-source-id: b0c4d3ae548882e85b3547c57de83c68e4bff7b4
2022-07-28 12:46:23 -07:00
Open Source Bot
44d499e477 Updating submodules
Summary:
GitHub commits:

d102b74b09
e7d84e7a60
4bf46679b2
9aec925562
a0c63ff29e
1ab2ace067

Reviewed By: wittgenst

fbshipit-source-id: f563ab8335b3f5c6e5f6dec3fd0333e9f1b36a23
2022-07-28 12:39:37 -07:00
Jan Mazur
33cb6059db handle 'warning: use of ok_or followed by a function call'
Summary:
I ran `arc clippy-check //eden/mononoke/...` and the handled the type of errors like in the title with clippy's suggestion.

I didn't use a global regex over files. I only made changes in lines and files that clippy complained about.

Reviewed By: yancouto

Differential Revision: D38246419

fbshipit-source-id: a474de9de28363ff3f04904f8a488e35b8eabce1
2022-07-28 12:24:19 -07:00
Jan Mazur
05f9f8cc48 replacing assert_eq(..., false) with assert(...)
Summary:
Same as previous one

wowsoregex

Reviewed By: yancouto

Differential Revision: D38244988

fbshipit-source-id: 3c491f6181d00ea9c17631103ad6ab779b87d597
2022-07-28 12:24:19 -07:00
Open Source Bot
11ba104308 Updating submodules
Summary:
GitHub commits:

ccda2cf270

Reviewed By: wittgenst

fbshipit-source-id: adf16a3e5898d35eca872ff893881f3f4e049c27
2022-07-28 11:53:33 -07:00
Harvey Hunt
0590fbf13e mononoke: lfs: Remove BlobRepo from lfs_server
Summary:
The LFS server needs access to a filestore config and a blobstore,
however it has been using a full `BlobRepo`. Now that we have facets, the LFS
server can be refactored to require just a few facets.

Update the code to remove dependencies on `BlobRepo`.

NOTE: In a follow up diff I'll add a permission checker into the `Repo` struct
rather than defining a custom one that is stored alongside `Repo`.

Reviewed By: markbt

Differential Revision: D38209865

fbshipit-source-id: d138589175e08aae4bcedab4d4a29761154d6f82
2022-07-28 10:54:01 -07:00
Xavier Deguillard
bf4bf99285 integration: fix test_get_attributes_symlink on Windows
Summary: The types weren't matching, causing the assert to fail.

Reviewed By: genevievehelsel

Differential Revision: D38246091

fbshipit-source-id: cdd30dc35bb11ea27f8fa6e739fa59cbd5ac7bb0
2022-07-28 10:45:08 -07:00
Jun Wu
549741f04c rebase: remove potentially slow predmap logic
Summary:
Currently, the predmap can potentially trigger O(predecessor) complexity slow
hash-to-location lookups, which can make things significantly slow:

  | 100.0%  rebase.py:      _origrebase              line 1178:  return _origrebase(ui, repo...
   \ 87.1%  rebase.py:      _preparenewrebase        line 1243:  retcode = rbsrt._preparenew...
     | 87.1%  rebase.py:      _definepredmap         line 392:  self.predmap = _definepredm...
     | 87.1%  rebase.py:      <dictcomp>             line 1440:  predmap = {
     | 87.1%  mutation.py:    <genexpr>              line 1444:  clrev, mutation.predecessor...
     | 83.6%  mutation.py:    <genexpr>              line 442:  newnextpreds = sum(([p] if ...
     | 83.6%  mutation.py:    get                    line 442:  newnextpreds = sum(([p] if ...
     | 83.6%  mutation.py:    <listcomp>             line 421:  return [
     | 83.6%  mutation.py:    ispublic               line 422:  pred for pred in preds if p...
     | 83.6%  changelog2.py:  __getitem__            line 770:  rev = nodemap[node]
     | 83.6%  changelog2.py:  get                    line 668:  rev = self.get(node)
   \ 12.8%  rebase.py:      _performrebase           line 1263:  rbsrt._performrebase(tr)
     | 12.8%  rebase.py:      _performrebasesubset   line 491:  pos = self._performrebasesu...
     |  7.3%  rebase.py:      _performrebaseone      line 625:  self._performrebaseone(rev,...
     |  7.3%  rebase.py:      rebasenode             line 738:  stats = rebasenode(
     |  5.5%  undo.py:        log                    line 1609:  mergemod.update(repo, p1, F...
     |  5.5%  __init__.py:    wrapupdate             line 134:  return orig(*args, **kwargs)
     |  5.5%  sparse.py:      _update                line 151:  return orig(
     |  5.5%  util.py:        inner                  line 419:  results = orig(repo, node, ...
     |  5.5%  merge.py:       update                 line 4212:  return func(*args, **kwargs)
     |  5.5%  util.py:        inner                  line 2312:  result = eden_update.update(
     |  5.5%  eden_update.py: update                 line 4212:  return func(*args, **kwargs)

Performance-wise,

The reporter says rebase dropped from ~30 minutes to 3.5 minutes with mutation
disabled (`--config mutation.enabled=0`) running the old version. This diff should
make it as fast without disabling mutation entirely.

Correctness-wise,

We previously rely on the predmap to add extras. But that was no longer the
case after D22174953 (c08c19572e). This is because D22174991 (868c2b0108) was added to copy the
relations without relying on the order.

This change will affect order / revision numbers, but should not affect the
commit hashes or mutation relations.

Reviewed By: markbt

Differential Revision: D38130886

fbshipit-source-id: fcad08383d8286f16767206d23c9d80f89ef4bc1
2022-07-28 10:44:56 -07:00
Jun Wu
f50a467870 test-rebase-copy-relations: show mutation record
Summary:
The mutation operation name was removed by D22320091 (3b722c6ebc).
Add it back to better demonstrate the test purpose.

Reviewed By: markbt

Differential Revision: D38223642

fbshipit-source-id: 0b37961d03b11b76cc375fe785ee2fa0ac1e90e0
2022-07-28 10:44:56 -07:00
Open Source Bot
bef4ba606d Updating submodules
Summary:
GitHub commits:

12aef9a5a6
19d5b458f2
3e700bbe38
98e413ede3
e93cb737c5

Reviewed By: wittgenst

fbshipit-source-id: 9316ac3fa68108f8a11ac545e35b16c754c032a0
2022-07-28 09:57:34 -07:00
Jan Mazur
44846c5c4f replacing assert_eq(..., true) with assert(...)
Summary:
It only changed one line in a wrong way, but arc rust-check caught that.
```
cd fbcode/eden/mononoke
rg --files-with-matches 'assert_eq!\((?P<expr>.*), true\)' | xargs -I{} sd  'assert_eq!\((?P<expr>.*), true\)' 'assert!($expr)' {}
```

regexislife

Reviewed By: mitrandir77

Differential Revision: D38244582

fbshipit-source-id: 8a61dcae658dc1a263bb1966a3979e755f218e75
2022-07-28 09:51:00 -07:00
Yan Soares Couto
05962c4410 Rename src_v2 to src
Summary: See description of D38029238, this just moves some files around.

Reviewed By: mitrandir77

Differential Revision: D38029748

fbshipit-source-id: 0266685ef50ab406ea3f6176a4ca704ed20ff295
2022-07-28 09:42:15 -07:00
Yan Soares Couto
019e4b3e59 Delete old command and replace it with new cmdlib command
Summary:
The previous diff finished moving scsc commands to use the new command lib! Now we need to swap the two implementation behind the scenes, so that everything that is using the old SCSC target now points to the new version.

This is done in two steps:
1. This diff moves the scsc_new files under a eden/mononoke/scs/client/src_v2 directory, deletes the old code, and fixes all temporary code to stop using "scsc_new" instead of "scsc".
2. The next diff moves `src_v2` to `src`, so things go back to where they used to live.

This needs to be done in two diffs because, as far as I can tell, it's not possible to delete a file and at the same time replace it with the move of another file. Also, we need to move things to `src_v2` inside the same directory as `src` because buck can't handle rules that depend on stuff outside the `TARGETS` file directory.

Here we want `client_new/src/main.rs` --> `client/src/main.rs`, but can't to that directly so instead do `client_new/src/main.rs` --> `client/src_v2/main.rs` --> `client/src/main.rs`.

Reviewed By: mitrandir77

Differential Revision: D38029238

fbshipit-source-id: 3d7e8003b460670bc18e98baae8c8c0c5d6a40fe
2022-07-28 09:42:15 -07:00
Yan Soares Couto
472ba848fe Move move-bookmark to new cmdlib
Summary: THE LAST command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37999917

fbshipit-source-id: 368107cc9b03649ede022adaac5b962c239012c5
2022-07-28 09:42:15 -07:00
Yan Soares Couto
14d9ca2b5a Move land-stack to new cmdlib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37999916

fbshipit-source-id: d1c0906f8d42d305bba687e33d610c45e3ed5c18
2022-07-28 09:42:15 -07:00
Yan Soares Couto
16d02b2320 Remove useless result
Summary: Since some previous change, we were using Results where an opperation always succeeded. This changes it to directly use the value.

Reviewed By: mitrandir77

Differential Revision: D37998419

fbshipit-source-id: 0391252124bc66b02851f4ecf8c15d7b8eec13e7
2022-07-28 09:42:15 -07:00
Yan Soares Couto
3ae0f188aa Move delete-bookmark to new cmdlib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37998423

fbshipit-source-id: e81eb8a4823c82cbf95e741356c6e7e2d34906b7
2022-07-28 09:42:15 -07:00
Yan Soares Couto
caa7a2877f Move create-bookmark to new cmdlib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37998420

fbshipit-source-id: dd121770b9879eab8f5acfba5df51ef5f73873f3
2022-07-28 09:42:15 -07:00
Yan Soares Couto
e14507e2bf Move xrepo-lookup to new cmdlib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37998418

fbshipit-source-id: 07657474567fad2b2e710306c8592acf499934ea
2022-07-28 09:42:15 -07:00
Yan Soares Couto
076e755147 Move run-hooks to new cmdlib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37998415

fbshipit-source-id: 368eb2ca3c33d9cbdd6ce3e5c122c4c316a120a7
2022-07-28 09:42:15 -07:00
Yan Soares Couto
b7c6530854 Move ls to new cmdlib
Summary: One more command moved to new lib

Reviewed By: markbt

Differential Revision: D37998422

fbshipit-source-id: 7591304183e2d7bc536cef233279cdcb16bc0b8d
2022-07-28 09:42:15 -07:00
Yan Soares Couto
562e5699c1 Move lookup-pushrebase-history to new cmdlib
Summary: One more command moved to new lib

Reviewed By: markbt

Differential Revision: D37998416

fbshipit-source-id: c02e3c7735920d100f26e601f5c882e8cefd3235
2022-07-28 09:42:15 -07:00
Yan Soares Couto
96a0f0dfdf Move lookup to new cmdlib
Summary: One more command moved to new lib

Reviewed By: markbt

Differential Revision: D37998424

fbshipit-source-id: 0c7338a0153a301ee9818f29372adb51f2c3e134
2022-07-28 09:42:15 -07:00
Yan Soares Couto
6dc3036884 Move log to new cmd lib
Summary: One more command moved to new lib

Reviewed By: markbt

Differential Revision: D37998417

fbshipit-source-id: 7dfba5424295c610f22279e38ea2782dcef17bbf
2022-07-28 09:42:15 -07:00
Yan Soares Couto
3ee61a698f Make base_app::subcommands macro look more like rust code
Summary:
Suggestion by markbt

This changes the macro syntax a little so it looks more like usual Rust code, which is better for syntax highlighters.

Reviewed By: mitrandir77

Differential Revision: D37998421

fbshipit-source-id: ffa2970dd5579acdcbbb32f0203a4f1ffe970d78
2022-07-28 09:42:15 -07:00
Yan Soares Couto
0c6dc177de Move list-bookmarks to new command lib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37804122

fbshipit-source-id: 682acffa5de28b87f97f5fc86b2018d65ae57c78
2022-07-28 09:42:15 -07:00
Yan Soares Couto
915a440268 Move is-ancestor to new command lib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37804123

fbshipit-source-id: f8c7e12744b64ff6f7e9234de9731898f5d82bc0
2022-07-28 09:42:15 -07:00
Yan Soares Couto
9ea5a4383e Move info to new command lib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37804121

fbshipit-source-id: d1b05f6d5f6126e79df8c979db65f9dbf87bef61
2022-07-28 09:42:15 -07:00
Yan Soares Couto
b859fc1940 Move export to new command lib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37756681

fbshipit-source-id: 60f8ee7fcb24bdbaa36b8e2cfdfeebbaa3d18b1d
2022-07-28 09:42:15 -07:00
Yan Soares Couto
cefc6b1b3a Move diff to new command lib
Summary: One more command moved to new lib

Reviewed By: mitrandir77

Differential Revision: D37754298

fbshipit-source-id: b841b45f838dc85fbfd78541a5effd69e2d32d7f
2022-07-28 09:42:15 -07:00
Yan Soares Couto
04472ff690 Move common_base to new command lib
Summary: One more command on the new command lib

Reviewed By: markbt

Differential Revision: D37750961

fbshipit-source-id: 2b6d3eb95019a046c204c702ebfd1ecd89ee894d
2022-07-28 09:42:15 -07:00
Jun Wu
e6061a77b2 localrepo: drop unused .tmp cleanup logic (BE)
Summary:
The logic was added by D22222339 (cde14847ee) and was meant to be temporary. Data shows
it's no longer used. Let's remove it.

Reviewed By: jordanwebster

Differential Revision: D38231318

fbshipit-source-id: 89cef233c3b4306d7d37225230c9ca16e9126760
2022-07-28 09:40:33 -07:00
Open Source Bot
e3e5672a49 Updating submodules
Summary:
GitHub commits:

d4e15531db
2c52ebbd93
65a25ec0a5
f42dd46ac6
5f06ddc841

Reviewed By: wittgenst

fbshipit-source-id: 76999f3b4bc0e78e8ca9b50951419f1101a9583f
2022-07-28 09:15:04 -07:00
Ioan Budea
8ffc0627c3 Add new l2p vip in env + client
Summary: Last step is changing all the callsites where we make the distinction between corp and prod to take into account the new option for labs.

Reviewed By: c-ryan747

Differential Revision: D38078198

fbshipit-source-id: d71be0202b60cd26a2417c30dce1b3fdc97adf7c
2022-07-28 08:55:37 -07:00
Yan Soares Couto
a155120d76 Be more aggressive in sampling most common edenapi requests
Reviewed By: markbt

Differential Revision: D38116168

fbshipit-source-id: 3cd4387d6a968627f51a5b8ac48e9288ad8e7f2a
2022-07-28 08:53:52 -07:00
Open Source Bot
ca26cb3513 Updating submodules
Summary:
GitHub commits:

952d87301d

Reviewed By: wittgenst

fbshipit-source-id: 7ddd235f1497ad8f634c5da3cdcd0b6db33f4467
2022-07-28 08:22:13 -07:00
Mark Juggurnauth-Thomas
a23e554f28 tests/integration: switch to using ACLs from a file
Summary:
Use ACL rules specified in a file in integration tests.  This will allow us to
test ACL rules are being applied correctly.

Reviewed By: mitrandir77

Differential Revision: D37558048

fbshipit-source-id: 317b6d64c43fb032014ffcd5ce5df83db0f92c88
2022-07-28 08:10:02 -07:00
Rajiv Sharma
220531ea0d Migrate async-requests-worker to new MononokeApp
Summary: The `async-requests-worker` binary relies on `MononokeApiEnvironment` to setup the `MegarepoApi`. As part of the `Convergence` effort, `MononokeApiEnvironment` will be no more and will instead be replaced by `MononokeApp`. Hence, this migration.

Reviewed By: mitrandir77

Differential Revision: D38204775

fbshipit-source-id: cc7dc990c6a2ca3d00019c3f6653d4e747fc708c
2022-07-28 08:09:21 -07:00
Yan Soares Couto
7d57b52288 Back out bounded traversal tokio spawning
Summary:
This backs out D37863447 (a5d31bf21e) and stack, because that stack is causing performance regressions and blocking the mononoke push.

Unfortunately we still need a solution for the deadlock issue, farnz has a design in mind, but let's unblock the push in the meantime.

Reviewed By: mitrandir77

Differential Revision: D38240958

fbshipit-source-id: cf3ac69a2735fab6049da7c0657de36660760d0f
2022-07-28 07:46:00 -07:00
Simon Farnsworth
0f56ed12fe Remove dead bounded_traversal_stream2
Summary: This removes all references to it in the codebase. It's tested, but not used.

Reviewed By: markbt

Differential Revision: D38209364

fbshipit-source-id: 0b27e257c057a5b153324616942b32b47c1b02df
2022-07-28 05:52:35 -07:00
Mark Juggurnauth-Thomas
0e20c8bd2d repo_client: remove MononokeRepo
Summary: `MononokeRepo` is now just a wrapper around `Arc<mononoke_api::Repo>`.  Remove it.

Reviewed By: mitrandir77

Differential Revision: D38203089

fbshipit-source-id: cfcaabf0d82365c391675af8cc95d8bdab063de4
2022-07-28 05:46:49 -07:00
Mark Juggurnauth-Thomas
6ef9f982a6 streaming_clone: convert to repo facet
Summary:
Convert the streaming clone component of `repo_client::MononokeRepo` to a
facet, and make it available on `InnerRepo`.  This removes the last piece of
data that makes `MononokeRepo` different from `mononoke_api::Repo` and will
allow us to remove that type.

Reviewed By: mitrandir77

Differential Revision: D38199488

fbshipit-source-id: 4c698a3db1f015713dd9cf211679ca66a01f8e78
2022-07-28 05:46:49 -07:00
Open Source Bot
66b302e5a0 Updating submodules
Summary:
GitHub commits:

7c6b43ddc6
40328a235b
2d4bcf2745
f187249624

Reviewed By: wittgenst

fbshipit-source-id: 040df031495bb9532ad020959fa50223ab7c4768
2022-07-28 03:15:25 -07:00
Open Source Bot
1e8269c1e6 Updating submodules
Summary:
GitHub commits:

38908d8353

Reviewed By: wittgenst

fbshipit-source-id: 4e1c3b12691af148d62070bb5d2aa218110e3b84
2022-07-28 02:34:23 -07:00
Open Source Bot
ebbf266775 Updating submodules
Summary:
GitHub commits:

27382b34c7
6aa1b10b68
72311e871b
59bc060da0

Reviewed By: wittgenst

fbshipit-source-id: f2b340d5583534467dae11924e778dcdd3c814d1
2022-07-28 00:38:31 -07:00
Open Source Bot
04958a6afe Updating submodules
Summary:
GitHub commits:

6b2e63877c
98b783c57f

Reviewed By: wittgenst

fbshipit-source-id: d7cc67105ddaf86c6ca60afb645c26676ee8361f
2022-07-27 23:57:17 -07:00
Open Source Bot
bb68c79439 Updating submodules
Summary:
GitHub commits:

12bc83364f
79cfbec38c
9589889857
e8a7562eed
cca200ca52

Reviewed By: wittgenst

fbshipit-source-id: 08aadd291c77b24458a8eb4fdad6a748ed23504e
2022-07-27 22:36:22 -07:00
Open Source Bot
3380228c53 Updating submodules
Summary:
GitHub commits:

19b2de925e
b454e86429
647b1ec531
ea35a9b11c
dd9d45f17a
32e98c7a76
b96c0ab777

Reviewed By: wittgenst

fbshipit-source-id: 92b2c9af4060ea2ce5083ad29419ff5b8d1de6ca
2022-07-27 21:49:35 -07:00
Open Source Bot
73eef0f0f7 Updating submodules
Summary:
GitHub commits:

709ae25c15
5f62a6b2f6
5db506c4af
b158341c43
87649d3288
5e40a02c18
02eaa1adcc
25802baf1a
af4604a3e3
3f9fdaf37a
06cd95142e

Reviewed By: wittgenst

fbshipit-source-id: cf3dba011c7d170160f538606eef9e6c5c50f9c5
2022-07-27 21:14:55 -07:00
Jun Wu
76a435674c repo: log exception messages why flushcommitdata fails
Summary:
The original error message "bug: cannot persist with re-assigned ids
unresolved" was removed by D33865776 (34abc48ec5). Let's track the error messages
to see if it still fails.

Reviewed By: DurhamG

Differential Revision: D36727362

fbshipit-source-id: 6abc2f4af86485556ba1c955caefd4408f0fa5aa
2022-07-27 20:41:57 -07:00