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
Summary:
Same as previous one
wowsoregex
Reviewed By: yancouto
Differential Revision: D38244988
fbshipit-source-id: 3c491f6181d00ea9c17631103ad6ab779b87d597
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
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
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
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
Summary: See description of D38029238, this just moves some files around.
Reviewed By: mitrandir77
Differential Revision: D38029748
fbshipit-source-id: 0266685ef50ab406ea3f6176a4ca704ed20ff295
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
Summary: THE LAST command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37999917
fbshipit-source-id: 368107cc9b03649ede022adaac5b962c239012c5
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37999916
fbshipit-source-id: d1c0906f8d42d305bba687e33d610c45e3ed5c18
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
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37998423
fbshipit-source-id: e81eb8a4823c82cbf95e741356c6e7e2d34906b7
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37998420
fbshipit-source-id: dd121770b9879eab8f5acfba5df51ef5f73873f3
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37998418
fbshipit-source-id: 07657474567fad2b2e710306c8592acf499934ea
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37998415
fbshipit-source-id: 368eb2ca3c33d9cbdd6ce3e5c122c4c316a120a7
Summary: One more command moved to new lib
Reviewed By: markbt
Differential Revision: D37998422
fbshipit-source-id: 7591304183e2d7bc536cef233279cdcb16bc0b8d
Summary: One more command moved to new lib
Reviewed By: markbt
Differential Revision: D37998416
fbshipit-source-id: c02e3c7735920d100f26e601f5c882e8cefd3235
Summary: One more command moved to new lib
Reviewed By: markbt
Differential Revision: D37998424
fbshipit-source-id: 0c7338a0153a301ee9818f29372adb51f2c3e134
Summary: One more command moved to new lib
Reviewed By: markbt
Differential Revision: D37998417
fbshipit-source-id: 7dfba5424295c610f22279e38ea2782dcef17bbf
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
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37804122
fbshipit-source-id: 682acffa5de28b87f97f5fc86b2018d65ae57c78
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37804123
fbshipit-source-id: f8c7e12744b64ff6f7e9234de9731898f5d82bc0
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37804121
fbshipit-source-id: d1b05f6d5f6126e79df8c979db65f9dbf87bef61
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37756681
fbshipit-source-id: 60f8ee7fcb24bdbaa36b8e2cfdfeebbaa3d18b1d
Summary: One more command moved to new lib
Reviewed By: mitrandir77
Differential Revision: D37754298
fbshipit-source-id: b841b45f838dc85fbfd78541a5effd69e2d32d7f
Summary: One more command on the new command lib
Reviewed By: markbt
Differential Revision: D37750961
fbshipit-source-id: 2b6d3eb95019a046c204c702ebfd1ecd89ee894d
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
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
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
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
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
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
Summary: `MononokeRepo` is now just a wrapper around `Arc<mononoke_api::Repo>`. Remove it.
Reviewed By: mitrandir77
Differential Revision: D38203089
fbshipit-source-id: cfcaabf0d82365c391675af8cc95d8bdab063de4
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
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