Commit Graph

14879 Commits

Author SHA1 Message Date
Mateusz Kwapich
cdb7ed47c5 change the SeedHead type to config
Summary: I want SeedHead to be a part of config - not something we generate in SC code. This diff will make more sense once you read the next ones.

Reviewed By: farnz

Differential Revision: D35934783

fbshipit-source-id: 8a68052e299401760a95d0f4e8ebf633767cb471
2022-04-28 04:02:41 -07:00
Mateusz Kwapich
8838c70f3b add function to handle all bookmarks except
Summary:
I'm about to change the data model to allow the user to ask segmented chagelog
all bookmarks except some.

Reviewed By: farnz

Differential Revision: D35934781

fbshipit-source-id: cac7829adba4dbf509006064bf88f7e1147ca390
2022-04-28 04:02:41 -07:00
Michael Cuevas
fac63e6190 change E-Menu tooltip during checkout
Summary:
change the tooltip during a checkout operation. Also change it back when the checkout finishes.

The debug menu can also enable this tooltip by changing the icon color to orange. Changing the color to green or white will change the tooltip back

A similar tooltip is also implemented for when EdenFS detects an unhealthy mount

Reviewed By: kmancini

Differential Revision: D35488235

fbshipit-source-id: a33ebfd15cbfd0d46eea85f32be4ddd1bb09f357
2022-04-28 01:07:18 -07:00
Michael Cuevas
7931fbd3fd change e-menu icon during checkout
Summary:
On Windows, EdenFS should signal that it's working on a checkout operation by changing the color of the E-Menu.

We also add a debug menu option for changing the E-Menu color

Reviewed By: chadaustin

Differential Revision: D35487175

fbshipit-source-id: fae587a223e9ce910e5558b36008a8c97b9dd3ea
2022-04-28 01:07:18 -07:00
Jason White
97d0409882 third-party/rust: Update tracing-subscriber from 0.3.10 to 0.3.11
Reviewed By: dtolnay

Differential Revision: D35956332

fbshipit-source-id: f92818417ec7ce6d655c171c180aac4696f84269
2022-04-27 19:09:17 -07:00
Xavier Deguillard
2783d5342c service: refactor RAII wrapper around stream publisher
Summary:
I'm about to add another stream, and this code will be duplicated a third time,
let's refactor it.

Reviewed By: chadaustin, fanzeyi

Differential Revision: D35767107

fbshipit-source-id: 44975b72a705bd4d2d749b8caacb56743153a148
2022-04-27 15:38:04 -07:00
Michael Cuevas
2d0c705c55 change format of E-Menu uptime
Summary: before, if we exceeded 24 hours of uptime the E-Menu would roll over to 0 hours of uptime. We can avoid this by adding days to the uptime print out. We don't print out the number of days if the uptime is less than 1 day.

Reviewed By: chadaustin

Differential Revision: D35954540

fbshipit-source-id: 9285433a827f8494b840e9d551cb6504f94417b7
2022-04-27 14:09:57 -07:00
Michael Cuevas
4246604272 silence unused parameter warnings on Windows
Reviewed By: chadaustin

Differential Revision: D35954602

fbshipit-source-id: 355c9cf499bf0569c8319c70460898dd7a1bfd5d
2022-04-27 14:09:57 -07:00
Harvey Hunt
8cc8ff394d mononoke: lfs: Remove unnecessary stream spawn
Summary:
Hyper used to have stricter trait bounds for stream bodies, however
they were relaxed in https://github.com/hyperium/hyper/pull/2187.

Remove the code to spawn a task that simply connected streams up now that hyper
is more relaxed. As the spawned task was just polling for data, it shouldn't
add any extra computational work onto the task used for a request.

This change is basically identical to D27963458 (e5cc9a1f3d).

Reviewed By: mitrandir77

Differential Revision: D35931360

fbshipit-source-id: 065fecc77b4ac1218c2be21e0a3639103429c5bc
2022-04-27 13:46:35 -07:00
Harvey Hunt
fef0d8e3fa mononoke: lfs: Test the result of upload when a blobstore is failing
Summary:
D35892336 (9b18b0d3be) fixed a bug in the LFS server that meant it would consider
an upload successful, even if writing to internal stores failed.

Add a test that verifies writing to a failing blobstore results in upload
failure.

Reviewed By: mitrandir77

Differential Revision: D35928308

fbshipit-source-id: 296ccdddb6f4b86f5fb778f97185a8a6a0ea9d17
2022-04-27 13:46:35 -07:00
Harvey Hunt
92b94ab4d0 mononoke: lfs: Simplify error handling in upload code
Summary:
The upload code can be updated to use the `?` operator, which makes
the code a little simpler.

Reviewed By: mitrandir77

Differential Revision: D35936319

fbshipit-source-id: 054f1e40798a38ff699f56dacfff055eb8c60263
2022-04-27 13:46:35 -07:00
Mateusz Kwapich
542033db24 unit-test for bookmark with options
Summary: I'm about to touch this function so I think it's better to have it tested.

Reviewed By: quark-zju, farnz

Differential Revision: D35897942

fbshipit-source-id: 81a141d06a4c326a37cac04a8e4cfb0c97365cf1
2022-04-27 13:05:35 -07:00
Mateusz Kwapich
8b1d223fe1 add a wait for segmented changelog option
Reviewed By: farnz

Differential Revision: D35744721

fbshipit-source-id: 2e4afe043d6422a9943f8b0b7753f68cdf993708
2022-04-27 13:05:35 -07:00
Mateusz Kwapich
618301986d use Duration instead of raw ints
Summary: We can use specific types so let's use them.

Reviewed By: farnz

Differential Revision: D35897795

fbshipit-source-id: f966191d05ac7b0228b14539d88c825103b3f38f
2022-04-27 13:05:35 -07:00
Pyre Bot Jr
4f33062f0a suppress errors in fbcode/eden - batch 1
Differential Revision: D35969756

fbshipit-source-id: 86412be245996920929b39ad7e88660fb6fc993b
2022-04-27 12:39:43 -07:00
Xavier Deguillard
213a5d969c store: allow passing a DiffContext to diffCommitsForStatus
Summary: This allows cancelling the request, and cleans up some test-only code.

Reviewed By: chadaustin

Differential Revision: D35754296

fbshipit-source-id: cd0adc2f1d3333efbd718b5954c77f72c9a9e1dd
2022-04-27 11:05:01 -07:00
Aida Getoeva
bfdec5fc7d mononoke/walker: rearrange the crate structure
Summary: As "new worker" was implemented in a separate crate it's time to unwrap it and place in the root.

Reviewed By: yancouto

Differential Revision: D35544988

fbshipit-source-id: 906846d1b2a00ba59f5501c5baf3d35bef311400
2022-04-27 08:31:07 -07:00
Aida Getoeva
f07a2eee69 mononoke/walker: move and refactor edge type parsing
Summary:
Create `EdgeTypeArg` that wraps vector of `EdgeTypes` and replaces string-typed arguments. Implementing `FromStr` trait for the `EdgeTypeArg` will remove parsing boilerplate as now clap will parse the input.

It's also possible to implement `ArgEnum` for this struct, but I have some small concerns over it (particularly with `fn value_variants<'a>() -> &'a [Self]` method). Anyway I will check it out and most probably switch to `ArgEnum` in another diff.

Reviewed By: yancouto

Differential Revision: D35540307

fbshipit-source-id: a6b1983a3c53d2810f3099e1319175f239b9d6cf
2022-04-27 08:31:07 -07:00
Aida Getoeva
0ddf27822b mononoke/walker: move and refactor node type parsing out of setup
Summary:
Create `NodeTypeArg` that wraps vector of `NodeType`s and replaces string-typed arguments. Implementing `FromStr` trait for the `NodeTypeArg` will remove parsing boilerplate as now clap will parse the input.

It's also possible to implement `ArgEnum` for this struct, but I have some small concerns over it (particularly with `fn value_variants<'a>() -> &'a [Self]` method). Anyway I will check it out and most probably switch to `ArgEnum` in another diff.

Reviewed By: yancouto

Differential Revision: D35540309

fbshipit-source-id: 57b618c8b2da565be1bcb61767a86114f2599c1e
2022-04-27 08:31:07 -07:00
Jan Mazur
50ae1dcac1 adding extra branch to test-repo-import.t and moving import bookmark to the merge commit
Summary:
I'm adding another branch to the test git repo to verify that we indeed merge the head of master branch into hg repo.

Also, I'm moving the importing bookmark to the merge commit.

Reviewed By: mitrandir77

Differential Revision: D35606582

fbshipit-source-id: b80ba2c0850b1194faee83268e6eb60e541cd3e5
2022-04-27 04:30:25 -07:00
Pyre Bot Jr
ab7757ecee suppress errors in eden
Differential Revision: D35955819

fbshipit-source-id: d6ae0af698705a0e7664d6172fecde0196c1a1b9
2022-04-27 00:21:21 -07:00
Michael Cuevas
fab88670df change wording in the "About EdenFS" message box
Summary: Keep usage of Eden vs EdenFS consistent. Also update the title of the message box so it's consistent with the menu item

Reviewed By: chadaustin

Differential Revision: D35951678

fbshipit-source-id: fb62f6edf66ba9159a50130de9ed3a13fff7a1e2
2022-04-27 00:06:24 -07:00
Michael Cuevas
c0f4bca1cd change e-menu wording
Summary: "Quit E-Menu" is ambiguous and could mean a number of things. We should make it clear that clicking this menu option will cause the E-Menu notification icon to be hidden

Reviewed By: chadaustin

Differential Revision: D35950442

fbshipit-source-id: 86527479dae544bc7db3e596e3bf8477bd147213
2022-04-27 00:06:24 -07:00
Michael Cuevas
c75d54ab68 let users know when they try to remove a non-existent directory
Summary: Typoing a path with `eden rm` would tell users that there isn't an existing checkout with that name. That can be confusing. Instead, we should be more specific and let users know when they typo'd

Reviewed By: kmancini

Differential Revision: D35690339

fbshipit-source-id: 8d2bae48d3bb3724cd6c1b4049af3df71c04a287
2022-04-27 00:06:24 -07:00
Michael Cuevas
df8b625c7f document potential race condition
Summary: We can potentially race if we try to update notificationStatus_ from outside the event thread. As long as we only try to update from within the single thread, we should be fine.

Reviewed By: kmancini

Differential Revision: D35514682

fbshipit-source-id: 0ee8baec6816cebf91fe4fe1c95f1156b5064a42
2022-04-27 00:06:24 -07:00
Aida Getoeva
a22a423199 mononoke/walker: move repo setup out of the setup.rs
Summary: `setup.rs` is going away, so let's move repo setup to its proper place

Reviewed By: yancouto

Differential Revision: D35540308

fbshipit-source-id: ee72c0ab7bf24a39902b74d0dfe054db56e439c1
2022-04-26 18:03:42 -07:00
Saul Gutierrez
88fe25747e util: add create_dir_all_with_mode
Summary: Adds a function that creates a directory and all of its ancestors, and sets the selected mode for the created directory for Unix-like systems.

Differential Revision: D35832456

fbshipit-source-id: add61ec490395cb1ce7401824abb307450f84280
2022-04-26 15:11:09 -07:00
Aida Getoeva
2bf3020dc5 mononoke/walker: delete old cmdlib walker setup
Summary: All of these were implemented using new clap.

Reviewed By: yancouto

Differential Revision: D35532738

fbshipit-source-id: a7262b1c905c198cf06140720371e9bfa8f20827
2022-04-26 14:14:45 -07:00
Aida Getoeva
6447f6bdc1 mononoke/walker: remove old integration tests
Summary: These "old" integration tests are basically duplicates of the new ones. Let's delete them and rename `mononoke_new_walker` as just `mononoke_walker`

Reviewed By: markbt, mitrandir77

Differential Revision: D35532373

fbshipit-source-id: c845f9770d1a3d74719a44a43b65f05a681a6371
2022-04-26 14:14:45 -07:00
Michael Cuevas
b2ae3f9cc3 eden/{integration, fs, facebook}: switch to platform010
Summary:
We should all be migrating to platform010, for the improved performance of its
generated code and for its improved diagnostics/portability.

Reviewed By: kmancini

Differential Revision: D35851539

fbshipit-source-id: d42b12c77ddeacb4777f2e360fdebd1cbbc1bd6d
2022-04-26 13:22:33 -07:00
Michael Bolin
13312961a1 link subcommand for github extension
Summary:
With the `github` extension enabled, `hg link` associates pull request data
with a commit in the metalog. Note that nothing verifies that this
linkage exists on GitHub. Ultimately, `hg submit` will be required
to remap the commits within the actual pull request on GitHub.

I'm not sure what best practices are in terms of using flags
versus positional arguments in the CLI, but we can continue
to experiment with that, for now.

Reviewed By: quark-zju

Differential Revision: D35638199

fbshipit-source-id: f72514b13627a8ef845ffb99e6ae3c86098061cd
2022-04-26 13:19:29 -07:00
David Tolnay
84f0cdff56 third-party/rust: Update pin-project from 0.4.28 to 0.4.29
Summary: Version 0.4.28 had some misguided use of glob imports which is blocking updating other crates.

Reviewed By: zertosh, lei2022

Differential Revision: D35936373

fbshipit-source-id: 011a703bde19482e9450b00f91cb0836d434c502
2022-04-26 10:56:15 -07:00
Mateusz Kwapich
d8e7842410 make segmented changelog manager a facet
Summary:
The repo factory is the place where we have all elements needed for
instantiating a segmented changelog manager. Let's add that as an option.

It's going to be useful for some specialized binaries that don't just want to
query the segmented changelog but want to understand what version of SC do we
currently store an to be able to reload SC at will.

Reviewed By: quark-zju

Differential Revision: D35744722

fbshipit-source-id: 37f9dc4b5750b48212be1bffbdae189341fb2a06
2022-04-26 05:56:48 -07:00
Mateusz Kwapich
073e1a5da8 function for checking if segmented changelog has certain commit indexed
Summary:
This can be used by slow bookmark mover to check if the certain commits were indexed by segmented changelog.

The current implementation has to instantiate the SC but in the future we don't need to do it.

Reviewed By: farnz

Differential Revision: D35744724

fbshipit-source-id: d694a135db0b9af6493477b31d7c1e4277471e8c
2022-04-26 05:56:48 -07:00
Mateusz Kwapich
60e2ca6c55 extract the segmented changelog manager creation to separate function
Summary:
I'm planning to create manager separately so let's split that part to separate
function.

refactor_time

Reviewed By: yancouto

Differential Revision: D35744723

fbshipit-source-id: 85e168626a9ed4d0085bf425666220c91d418f1a
2022-04-26 05:56:48 -07:00
Mateusz Kwapich
3547771f16 integration test showcasing current slow bookmarks mover behaviour
Summary:
This binary wasn't covered by any tests before.

Note: For this test I had to allow the mononoke hg sync job to act on bookmark moves
created by tests. I think that's fine (we don't have any in production - if we
had the bundle preprarer would be erroring out on them).

Reviewed By: yancouto

Differential Revision: D35648045

fbshipit-source-id: dae3dd89eeaf3c775e5046518a99b755923aff8a
2022-04-26 05:56:48 -07:00
Lei Shi
4449f2d068 bump up solana crate versions and fix a bunch of related crates
Summary:
allow-large-files

Upgrading async-compression with a patch because they are using old versions of zstd (renamed to libzstd in their dependencies) and zstd-safe

Updated aes-gcm-siv and curve25519-dalek too. Please refer to inline comments. Here is how I pinned the crate:

- git clone the repo
- git checkout the tag
- make changes
- git push -f origin HEAD:master
- use the commit hash and your forked repo to update cargo.toml

Reviewed By: wqfish

Differential Revision: D35585200

fbshipit-source-id: 70c51bf1902c6eaf72004a49bc2be9eaf782e360
2022-04-25 23:16:11 -07:00
Zeyi (Rice) Fan
fc5f91a30e cli: do not start if the current daemon is already starting
Summary:
When EdenFS is starting, `eden start` will attempt to start another EdenFS daemon then it will get a flock error.

On Windows, sometimes we saw a long EdenFS startup process, and this behavior misleads people to think they are not able to start EdenFS.

Reviewed By: xavierd

Differential Revision: D35799954

fbshipit-source-id: 5f58e3ad89962f61d233f962a3e464fe55a9cd8b
2022-04-25 21:36:06 -07:00
Michael Cuevas
e71bd8cb4e add report button to E-Menu
Summary: This menu item will cause a shell to be launched and `eden rage --report` to be run.

Reviewed By: chadaustin

Differential Revision: D35327029

fbshipit-source-id: b17c90386e8beb028848fa3d99927dae3c971add
2022-04-25 16:44:06 -07:00
Michael Cuevas
6e6321099b add report option to eden rage
Summary: This will be used in a later diff to give users a "one click" report option.

Reviewed By: chadaustin

Differential Revision: D35330514

fbshipit-source-id: 0d9f3987d788d21cebc71afc796c252eb71028a3
2022-04-25 16:44:06 -07:00
Jun Wu
6657b4b1e7 blackbox: avoid passing JSON string in APIs
Summary:
The JSON string interface was used when there is no clear way to convert
between a PyObject and a Rust serde-serializable object (blackbox::Event).

Now we can convert between them easily let's avoid the extra JSON round-trip.

Differential Revision: D35236903

fbshipit-source-id: 51cd8028e459f551918777cb572e286cc1d848fe
2022-04-25 13:49:17 -07:00
Jun Wu
93a347394e testing: fix test failures
Summary: Fix test failures detected by testbot.

Reviewed By: sggutier

Differential Revision: D35898780

fbshipit-source-id: 47d323fc84363f3812a7ac85deb97e211f7d174f
2022-04-25 09:14:28 -07:00
Adam Ernst
22c0b32eed Daily arc lint --take BLACK
Reviewed By: zertosh

Differential Revision: D35897556

fbshipit-source-id: 9ae99a4cf8ccc3c6657f4071bde4e224cbab493f
2022-04-25 08:47:01 -07:00
Harvey Hunt
9b18b0d3be mononoke: lfs: Return filestore upload result from internal_upload
Summary:
When uploading content to the LFS server it attempts to store the
content in an upstream server, as well as internal data stores. If either of
those fail, then the upload should be considered a failure and the client
should retry. However, D22192005 (ce7f53422f) refactored the code and accidentally updated
`internal_upload` to always return `Ok(())`.

This meant that a failure to write to the filestore wasn't propagated and so an
upload that actually failed would send an HTTP 200 to the client.
Unfortunately, when the client asks for the blob later the server doesn't know
about it.

Update the code to return `res`, so that errors are propagated.

Reviewed By: krallin

Differential Revision: D35892336

fbshipit-source-id: 5302a34fdd338975e0f0db369ed66692db0ade9f
2022-04-25 05:34:31 -07:00
Pyre Bot Jr
06973c2937 suppress errors in eden
Differential Revision: D35863280

fbshipit-source-id: 0c9b160cccfbcb77e9ec3ffb8df8bdbe804d1e3b
2022-04-22 23:52:26 -07:00
Jun Wu
523fd16864 revert: fix revert a dir to a file
Summary: As the title suggests.

Differential Revision: D35848458

fbshipit-source-id: a83d0843fcc9e26194e9b5a9a184d25a5ea94c66
2022-04-22 20:28:20 -07:00
Jun Wu
d2dea32e60 testing: add high-level documentation
Summary:
`testing` is non-trivial. Add some documentation to make it easier to
understand.

Differential Revision: D35118756

fbshipit-source-id: dad59472d849eb80e230a83403e8c6af48137e6c
2022-04-22 19:35:57 -07:00
Jun Wu
ec96f1fa19 test-ctrl-c: fix debugruntest compat
Summary: `disown` is not implemented. Use `wait` instead.

Reviewed By: LynBusch

Differential Revision: D34915626

fbshipit-source-id: cbf9819b7df9a57995129bb88df04b830cd6b6f6
2022-04-22 19:35:57 -07:00
Jun Wu
523acf1c13 test-commitcloud-sync-race: fix debugruntest compat
Summary:
It seems certain bundle part is occured twice, triggering double output for
something. I didn't trace down as we plan to migrate away from unmaintainable
bundle2 stdio exchange.

For now just make the test compatible with both runners and we can revisit
later when we remove the bundle2/sshpeer techdebt.

Reviewed By: LynBusch

Differential Revision: D34915624

fbshipit-source-id: c2d53050a14ceb56d89bd0c1831f9ab32caf2e4d
2022-04-22 19:35:57 -07:00
Jun Wu
a80dad4ebe test-commit-interactive-curses: fix debugruntest compat
Summary:
Avoid `ui.load()` in debugpython. That's known problematic. Use `ui` and `repo`
provided by `debugshell` instead.

Reviewed By: LynBusch

Differential Revision: D34915618

fbshipit-source-id: 2ca393996318b2479c3996e98d4a5695b648356c
2022-04-22 19:35:57 -07:00