Commit Graph

89599 Commits

Author SHA1 Message Date
Evan Krause
2d28ee9e42 Fix isl not detecting workspace folder changes without reloading
Summary: It seems we were not properly subscribing to changes in the vscode workspace folders. We used `onConnectOrReconnect` inside the lazyAtom, which means it was not triggered on first connect. Since reconnects don't happen in most cases (maybe never for vscode connection...?), it would never actually subscribe. Instead, we could either move this to a not lazy atom, or make it just call the subscribe directly. I opt to make the atom not lazy, since we use this in the cwdSelector immediately on startup, there's no real use having it be lazy. Maybe that made sense when the cwd dropdown didn't use this state.

Reviewed By: quark-zju

Differential Revision: D57136047

fbshipit-source-id: 8298b8b94b06e109f78240d20cb42014f3d18e00
2024-05-09 09:52:23 -07:00
Clara Rull
79ae03bc88 Use WebIdentityProvider for S3 credentials
Summary:
USe WebIdnetityPRovider, since we want to use IRSA, running from K8s.

https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-enable-IAM.html

See also https://github.com/rusoto/rusoto/issues/1497 "Add support for Web Identity providers for IAM credentials"

Reviewed By: gustavoavena

Differential Revision: D57158017

fbshipit-source-id: 0c622c1298d54ba60e19107414962393f9178bda
2024-05-09 09:26:40 -07:00
Muir Manders
7cc0c026ec rebase: support reproducible commit hashes
Summary:
Add new config flag rebase.reproducible-commits that tweaks two date related things to achieve "reproducible" rebases (i.e. different "rebase" invocations will produce exactly the same commit(s) given fixed "source" and "dest" commits):
- Enable the tweakdefaults.rebasekeepdate behavior of not bumping the source commits' commit date
- Don't record "mutdate" in commit extras since the mutation date is always "now". The mutation info stored in commit extras is not load bearing, so this should be fine.

Reviewed By: markbt

Differential Revision: D57065563

fbshipit-source-id: 77d17ca622605739866385213c29a448b1504775
2024-05-09 08:35:14 -07:00
Muir Manders
698006a2fb rebase: move tweakdefaults tweaks inline
Summary:
The tweakdefaults extension is always enabled, so we can start moving its tweaks inline.

Previously operations such as "sl fold" or "sl next --rebase" were running "rebase" without the tweakdefaults changes due to how command wrapping works. It seems like these uses do want the rebase tweaks (e.g. bumping rebased commit date to "now"), so I just updated the tests.

Reviewed By: quark-zju

Differential Revision: D57125799

fbshipit-source-id: e00ce7e5049e3a0312bb15d9747f3bf5dc2b7a3c
2024-05-09 08:35:14 -07:00
Muir Manders
a2869223af tests: tweak test-rebase-noop.t to expose failure
Summary: Previous diff got rid of mutation.date interfering with realism, and here I also enable the "mutation" configs (which in particular enabled "mutation.record") and avoid use of "--keep" flag (which influences mutation/extras contents).

Reviewed By: markbt

Differential Revision: D57065562

fbshipit-source-id: d81246a271ecf81173def68cb879fa16c5e1dbd2
2024-05-09 08:35:14 -07:00
Muir Manders
d8c39febea tests: kill "mutation.date" in favor of "devel.default-date"
Summary: It doesn't make sense to change "now" for one part of Sapling but not another. Let's consolidate on the "devel.default-date" config setting (which is set to "0 0" in default_hgrc.py for tests).

Reviewed By: markbt

Differential Revision: D57065561

fbshipit-source-id: 4104a68b3a79bb14574144db98542bfd75c201e9
2024-05-09 08:35:14 -07:00
Rajiv Sharma
7952fc3222 Implement filter arguments support in Mononoke GRit server
Summary: This diff implements capability to parse and accept filter arguments from git client. A follow up diff will add actual support for filter at the server

Reviewed By: markbt

Differential Revision: D57052433

fbshipit-source-id: 7bedaa398d938f33f18570fe96e36ac3c83df0ed
2024-05-09 03:37:15 -07:00
Rajiv Sharma
b457df85e1 Integration test showing that we do not support filtered clones/fetches
Summary: This integration test is part of the TDD for filter support in Mononoke GRit server. Currently the test outputs `warning: filtering not recognized by server, ignoring` which will later get removed once we add proper server side support for filtering.

Reviewed By: markbt

Differential Revision: D57101700

fbshipit-source-id: ce405b40c723928113519e3f7cbdce85609414bf
2024-05-09 03:37:15 -07:00
Gustavo Galvao Avena
5861584c8a Extend SCS integration test
Summary:
Update the SCS integration test for submodule expansion.

- I'm extending this test case before publishing the support for forward syncing in SCS.
- I'm renaming the test file because it will also start testing backsyncing changes with xrepo lookup command.
  - I added the `small-repo-sot` suffix because the entire test case will have small repo as the source of truth.

One important thing to mention:

Backsyncing isn't actually supposed to work now. It only works because there's a bug in the `get_strip_git_submodules_by_version` function (described in D56881703) which is returning the default submodule action (STRIP) when it's called for backsyncing.

Coincidentally it's actually doing pretty much what we want to do right now: it's backsyncing changes **as long as they don't touch the submodule expansion**.

In the backsyncing tests I use newadmin to derive almost all data types for the backsynced commits to show what happens in those cases.

Reviewed By: mitrandir77

Differential Revision: D56828900

fbshipit-source-id: 506c652cd034ccc746267c99c3f54eef19e7f8c3
2024-05-09 01:44:49 -07:00
Gustavo Galvao Avena
fdb22288fa Add more logs to forward syncer and cross_repo_sync library
Summary: Just updating/adding more logs.

Reviewed By: andreacampi

Differential Revision: D56929932

fbshipit-source-id: 87f7c8e1c683af9bfeae01766a74b8a8e0b3ec53
2024-05-09 01:44:49 -07:00
Gustavo Galvao Avena
5036575713 Log to both scuba and terminal in cross_repo_sync and forward syncer
Summary:
Introduce helpers that will log to both slog (i.e. terminal) and Scuba.

This will be useful when to debug/follow the initial import command. It might also help debug cross_repo_sync stuff in general.

This diff is supposed to be a no-op! I'm updating/adding logs in the next diff.

Reviewed By: andreacampi

Differential Revision: D56925258

fbshipit-source-id: b914c59964ca9be8b9068336713d0953042c1bd1
2024-05-09 01:44:49 -07:00
Alex Hornby
2e80b95095 use declared getdeps system dependencies
Summary: Use the declared getdeps system dependencies from ws_airstore build.  As they come from the OS packages they are dynamically linked, which makes the python build happy.

Reviewed By: zhaoduow

Differential Revision: D57047488

fbshipit-source-id: 751fd2b71c5e81d987d9fe6d9502cd5f4613ac66
2024-05-09 00:17:07 -07:00
Jun Wu
82979b12e9 gitstore: actually report git fetch errors
Summary: Report them as network errors so the network doctor related logic can handle it.

Reviewed By: muirdm

Differential Revision: D57133393

fbshipit-source-id: 773011de0111630db949ab946624a9f225d4f263
2024-05-08 20:01:37 -07:00
Jun Wu
9e5bc5d39c spawn-ext: make CommandError public
Summary: This might be useful in other places.

Reviewed By: muirdm

Differential Revision: D57133390

fbshipit-source-id: 1dbe64a5fb33a8f727497e4df7a606011202f5c8
2024-05-08 20:01:37 -07:00
Jun Wu
06a6f84f44 gitstore: raise errors from fetch directly
Summary: Now all APIs use anyhow errors. We can return early without converting error types.

Reviewed By: muirdm

Differential Revision: D57133391

fbshipit-source-id: a301103bab0759729b9fc058bbd77cd0761f7043
2024-05-08 20:01:37 -07:00
Jun Wu
3b99a5c7ac gitstore: add FetchMode to readobj
Summary:
This makes the `get_local` API disable remote fetching, which matches more
closely to the API contract.

Reviewed By: muirdm

Differential Revision: D57129510

fbshipit-source-id: 133c544ee212d31b7f6c97b62134b883c030a8da
2024-05-08 20:01:37 -07:00
Jun Wu
aa5adfe89c gitstore: switch to anyhow error type
Summary: This allows us to mix-in network errors that do not exist in `git2::Error`.

Reviewed By: muirdm

Differential Revision: D57129509

fbshipit-source-id: 736d9722b5e7293aab1b484b823367ee1dceb6c5
2024-05-08 20:01:37 -07:00
Evan Krause
42cd417be3 Add file selection checkboxes to levels of file tree
Summary:
If you view uncommitted changes in "tree" mode, we should have checkboxes on each level to let you select/deselect all files "under" that level.

We can use the "indeterminate" state if there's a mix of selected files in a level of the tree, or if some files are themselves partially selected (via chunk selection)

This involves iterating all files inside a level in the tree, both to calculate the checked state and to select/deselect on click.

I added a few iterator utils so we don't need to make new arrays out of all the file paths when computing this (since we would do that for each level, that could be somewhat expensive). [These helpers are actually coming soon to js itself, they're at stage 3!](https://github.com/tc39/proposal-iterator-helpers?tab=readme-ov-file) Can't depend on that just yet though.

Reviewed By: muirdm

Differential Revision: D57124747

fbshipit-source-id: 3ba0bf5d593b153a2d6beef69a9592944e6e9e3f
2024-05-08 16:13:10 -07:00
Alvaro Leiva Geisse
e16f920309 reverse shebang
Summary: this runs on github... but also not what i really care about

Reviewed By: terrelln

Differential Revision: D57125977

fbshipit-source-id: 39d7fd319a0ce45a36ba11c4301f5a27356b6c9f
2024-05-08 15:10:30 -07:00
Jun Wu
fc8f881b22 gitstore: include "git fetch" error in readobj APIs
Summary: This makes the error more friendly.

Reviewed By: sggutier

Differential Revision: D57067113

fbshipit-source-id: 4e16a37b22c5476a357ddee2bcff0cec69b112f7
2024-05-08 14:14:44 -07:00
Jun Wu
14e2df171c gitstore: trigger remote fetch for readobj APIs
Summary:
Some code paths use the readobj without going through the store abstraction.
They should trigger remote fetches too.

[wa auto] tsp input format changed

   tsp-test-input.json |  27 ++++++++++-----------------
   1 files changed, 10 insertions(+), 17 deletions(-)

  changeset:   21ee926f9b8038140f434622f900e50b59ae36ef  D26547231
  user:        Grant Megrabyan <grantmegrabyan@fb.com>
  date:        Fri, 26 Feb 2021 05:06:32 -0700
[wa auto] TSP shadow job

   tsp-test-input.json |  18 ++++++++++++++++++
   1 files changed, 18 insertions(+), 0 deletions(-)

Reviewed By: zzl0

Differential Revision: D57067114

fbshipit-source-id: b940930ea3979ffe620e6f6e11bf97d36e20e2e8
2024-05-08 14:14:44 -07:00
Jun Wu
710cfdc21f gitstore: add tracing log for store configuration
Summary:
Makes `SL_LOG=gitstore=debug` print the git store location, url, filter
information for easier debugging.

Reviewed By: sggutier

Differential Revision: D57067115

fbshipit-source-id: 193eccfd0ca8bb57f3556c43124db109495fdbb2
2024-05-08 14:14:44 -07:00
Xavier Deguillard
fc397c80c3 targets: fight autodeps
Summary:
Autodeps doesn't like having multiple headers and always tries to remove the
dependency on it even though it's needed. Let's split the windows_notifier in
half to prevent that.

Reviewed By: MichaelCuevas

Differential Revision: D57115799

fbshipit-source-id: b36047d970c7deec3fac50c0157e2165783aa915
2024-05-08 13:55:39 -07:00
Muir Manders
840264cd70 util: fix lrucachefunc to differentiate args and kwargs
Summary: zzl0 pointed out that we were mixing the `*args` and `**kwargs` too loosely in the cache key. Fix by using a nested tuple to keep `args` and `kwargs` separate rather than combining into a single tuple.

Reviewed By: zzl0

Differential Revision: D57078104

fbshipit-source-id: 324697c7f4ecebd2004bb73d798b6aac2a1a18bf
2024-05-08 13:33:26 -07:00
Evan Krause
f28d7c2318 Indent files in a section
Summary: Like the file tree, indent files within a section of a sectioned file list. This make it more visually clear which files belong to which section.

Reviewed By: quark-zju

Differential Revision: D57121562

fbshipit-source-id: a51bec0df37dcb059ffdb547aec5cd7800791d83
2024-05-08 13:10:09 -07:00
Evan Krause
21fb59033f Add checkbox next to sections of sectioned file tree
Summary:
Add a checkbox next to sections so you can toggle all files within a section at once. This is much more convenient if you need to make a partial commit from files in just one section.

In the next diff, we'll also indent these nested files so the checkboxes are differentiated better

Reviewed By: quark-zju

Differential Revision: D57121564

fbshipit-source-id: 19b96143042f35675318b6cc232959fd7648f264
2024-05-08 13:10:09 -07:00
Evan Krause
d28f3a79f3 Use <Button> for section file tree headers
Summary: migrate to <Button> instead of <VSCodeButton> here. This also fixes a font size issue.

Reviewed By: quark-zju

Differential Revision: D57121563

fbshipit-source-id: 188286cf3bdb1f05cf0cd77894fe0fbc31c6fc36
2024-05-08 13:10:09 -07:00
Evan Krause
4268248421 Use realpath for displayed cwd, compute on server
Summary: Previously, we sent the repo root and the relative cwd to have the UI combine into a display cwd. We can instead use realpath and join them on the server to get a label for the UI to use. We don't even really need to send the repoRelativeCwd, just the label.

Reviewed By: quark-zju

Differential Revision: D57116811

fbshipit-source-id: 7f1f9d6f8be3751daf5242a7fccbde9c8e6008f8
2024-05-08 11:56:41 -07:00
Evan Krause
9c0a691524 Use repo-relative paths for cwd selector
Summary:
The previous cwd selector used minimalDisambiguousPaths for the cwd selector. This meant that typically you'd only see the basename of the cwd as an option for the cwd.

Instead, we can first find the repo root for each cwd option, and thus render the cwd as relative to that rpeo root. This also lets us know ahead of time which cwd options are invalid, so we can disable them.

I also hide invalid options from the quick cwd picker.

We could later augment this data too, for example labelling git or sl repos.

Reviewed By: quark-zju

Differential Revision: D57083696

fbshipit-source-id: 5e7a0e0f1e96019e9512d711e773d97e2d62c352
2024-05-08 11:56:41 -07:00
Evan Krause
51cda854fa Show cwd button label with full path relative to repo root
Summary:
Instead of showing the basename of the cwd in the cwd dropdown, show the repo root basename + the relative path to the cwd.

For example, "sapling/addons/isl" instead of just "sapling" (or just "isl").

This makes it more clear what your cwd is within the repo, which can give you more information in some cases.

Reviewed By: quark-zju

Differential Revision: D57083698

fbshipit-source-id: 3832eb7cf8504f2545bff2e9745de78940086e6d
2024-05-08 11:56:41 -07:00
Evan Krause
508f239a6e Allow determining more cwd info before without creating a Repository
Summary: Add an API to use `sl root` to validate a cwd without actually creating a whole RepositoryInfo. This can be used slightly more cheaply to check the validity of all available cwd options, so the UI can show you cwds relative to the repository root.

Reviewed By: quark-zju

Differential Revision: D57083699

fbshipit-source-id: 1ac064ae926bd475931dc9569f6d122390f07e98
2024-05-08 11:56:41 -07:00
Evan Krause
792c154b35 Allow disabling RadioGroup options
Summary: Allow disabling RadioGroup options via a `disabled` value in the option.

Reviewed By: quark-zju

Differential Revision: D57083700

fbshipit-source-id: b3cb8b0370ed37e2195ebac8ef400022297f2cc8
2024-05-08 11:56:41 -07:00
Evan Krause
872be9fc30 Ensure platform-specific server message handling always has a RepositoryContext
Summary:
If a platform has its own dedicated message handling, we previously might pass in a null RepositoryContext. However, we are always be able to create a RepositoryContext from the information we have.

Constructing one will make it easier to use platform-specific messages, for example to determine more info about the cwd.

Reviewed By: quark-zju

Differential Revision: D57083697

fbshipit-source-id: 6d3f3cfcca1ae76d7075156e462187891fceaa08
2024-05-08 11:56:41 -07:00
Eric Kuecks
1131aa3da1 Update version
Summary: Pull in https://github.com/facebookexperimental/cxx/pull/13

Reviewed By: shayne-fletcher

Differential Revision: D57071061

fbshipit-source-id: 55a5c1a3ae4a4a64a90adc4abbbd37632dc97430
2024-05-08 10:07:56 -07:00
Clara Rull
6c2a73fbf8 Increase SCS server start timeout for integration tests
Summary:
`test-gitbundle-mononoke-remote-gitimport.t` is currently failing:

```
JustKnobs Rule Source WHOAMI_DEVICE_RAM could not be loaded. Failure: Reason: Failed to find fbwhoami field 'DEVICE_RAM'
```
However, this was just a warning, the real erorr is SCS_Server taking slightly longer to start:
```
+  SCS server did not start in 120 seconds, took 131
```
So I've increased the timeout.

The causes for startup increase have not been investigated

Reviewed By: mitrandir77

Differential Revision: D57099503

fbshipit-source-id: 0c4146e55419b50347dd968a5d003abbc0ee91e7
2024-05-08 06:24:19 -07:00
Jeremy Fitzhardinge
265ddb1c6b third-party/rust: update strum to 0.26
Summary:
Also add to no-std universe

Codemod EnumVariantNames -> VariantNames

Reviewed By: dtolnay

Differential Revision: D57085098

fbshipit-source-id: ead1511915a0fd3c145f23e30deb3268866185f5
2024-05-08 00:44:26 -07:00
Robert Grosse
1822a7c304 Fix typos in comments
Reviewed By: cfsmp3, lmvasquezg

Differential Revision: D57073944

fbshipit-source-id: b34670ab6e0d65d4a5b3e595e01d9d659630056f
2024-05-07 17:06:06 -07:00
Saul Gutierrez
232b1545b2 tests: add a target for running run-tests.py with EdenFS
Summary:
It's sometimes annoying to run EdenFS .t tests without having autofix for them, which is why this diff was created.

In order for EdenFS .t tests to run properly, some env vars have to be set. Ideally we would modify the existing `run_tests_py_eden` target, but the problem with this is that Buck doesn't allow Python binary targets to take env vars as input.

Reviewed By: zzl0

Differential Revision: D57010488

fbshipit-source-id: 9155f39c2ba479bf763a24075316b439453ab6e1
2024-05-07 14:54:14 -07:00
Saul Gutierrez
a308c0a519 tests: delete all configure modernclient from debugruntest tests
Summary: As of D56766291 these lines are no longer necessary since that's turned on by default, so let's delete them

Reviewed By: zzl0

Differential Revision: D57005745

fbshipit-source-id: 639b689aaf6e9223c601d266166878169fca5079
2024-05-07 14:54:14 -07:00
Saul Gutierrez
2e6cfdaac7 tests: enable amend extension by default
Summary: This extension should have been added to D56766291, but was accidentally deleted

Reviewed By: muirdm

Differential Revision: D57021765

fbshipit-source-id: f260fa6d47b1386d36fa1b2aa6a88226c74dbcbd
2024-05-07 14:54:14 -07:00
Srikrishna Gopu
0896625bf9 remove picking default boost for centos9
Summary:
As titled, remove picking system boost for centos9 oss builds.

We are seeing the following error (https://tracker.ceph.com/issues/54265) when building qsfp service with c++20 and on CentOS9. We need boost 1.77 or more to build with c++20.

Discussion: https://fburl.com/workplace/4u3glapv

Reviewed By: chadaustin

Differential Revision: D55758008

fbshipit-source-id: dae0bb5a70de3de2988032412eaafbd1b6d4e53d
2024-05-07 14:34:38 -07:00
Andres Suarez
c8f26f9d35 prefetch: Read patterns from stdin when FILE is -
Summary:
`eden prefetch` does not in fact read patterns from stdin. This diff
corrects the help message and adds support for reading patterns from
stdin when the file is `-`.

Went with `--pattern-file -` rather than just reading from stdin because
that would box in the stdin API to just this.

Reviewed By: genevievehelsel

Differential Revision: D57064448

fbshipit-source-id: 03e61c7b44ec7d2cbcc979c016d5b19a7cf45f0f
2024-05-07 14:31:43 -07:00
Muir Manders
f3d6410482 megarepo: fix xrepo diff resolution when xrepo tailer is lagging
Differential Revision: D56954510

fbshipit-source-id: 01ad5ee5f58d7b28ccc295aa2278523b36b4646b
2024-05-07 14:27:43 -07:00
Muir Manders
1e6a87db80 util: improve lrucachefunc to work with kw args
Summary:
Sort and append `**kwargs` to `*args` so we can cache based on named args as well.

Note that we don't know what the default args are, so:

```
# If you have
util.lrucachefunc
def foo(a, b=123):
  ...

# Both of these will actually invoke foo():
foo(a)
foo(a, b=123)
```

Reviewed By: quark-zju

Differential Revision: D56954509

fbshipit-source-id: ecf9d7ab8d9e17766a52154454398f005609ee7c
2024-05-07 14:27:43 -07:00
Jon Oh
7754f984a8 Fix fetch command
Summary:
Small bug in the fetch command where adding the '-v' flag will fetch the predictive prefetch even when turned off.

Discovered when testing the end to end flow

Reviewed By: genevievehelsel

Differential Revision: D56794816

fbshipit-source-id: e2c1484e7d565689be126ee54f62c148c8a8b8bc
2024-05-07 10:22:13 -07:00
Evan Krause
e45c95e09d Add "Clear commit message" button in fill commit message context menu
Summary:
Next to the "fill commit message" section in the commit-mode commit info view, add a dropdown button that lets you choose to clear the commit message. This is useful if you use the fill commit message button but want to go back and not have all of the fields filled in.

in the future, I suspect we'll add more fill methods like filling from a task/diff, and if so we may need to move some fill methods to this context menu as well for space savings.

Note: we only show this for "commit" mode because amend mode alredy has a "cancel" button to go back to the original message. But "cancel" doesn't really work for commit mode.

Reviewed By: zzl0

Differential Revision: D57013039

fbshipit-source-id: 201c6e380defd2f53fc67b6ef0309bcba829e163
2024-05-07 09:59:03 -07:00
Yedidya Feldblum
0904046ab1 bump repo ci to ubuntu-22.04
Summary:
X-link: https://github.com/facebook/folly/pull/2189

X-link: https://github.com/facebookincubator/zstrong/pull/782

Now that Ubuntu 24.04 LTS [has been released](https://ubuntu.com/blog/canonical-releases-ubuntu-24-04-noble-numbat), it is a suitable time to bump the version of Ubuntu used in CI to Ubuntu 22.04 LTS, which is the prior LTS.

Ubuntu 22.04 LTS ships with GCC 11.2, and is the first Ubuntu release to ship with a version of GCC that implements C++20 coroutines.

Reviewed By: chadaustin

Differential Revision: D57017204

fbshipit-source-id: ce5754e7dfc6cb066739bf164e725de8e21f8d24
2024-05-07 09:51:01 -07:00
Open Source Bot
d2e875a9f7 Updating submodules
Summary:
GitHub commits:

dcfc23e93f
fe93061166
5ab60cc44e
25426f4028
2cef74dd98
8e338869dc
db77a73529
01eced1fe2
ac2a111943
4eefca5d7a

Reviewed By: jurajh-fb

fbshipit-source-id: b50ac9bc052126ce38a3b9de0c4162b64a945af1
2024-05-07 09:32:45 -07:00
Muir Manders
d2f1b8942a rebase: show commit hashes are consistent after identical rebases
Summary:
Show that if date is the only thing that differs, duplicate rebases will produce the exact same commits.

Note that this requires tweakdefaults.rebasekeepdate=true so that we re-use the source commits' date instead of bumping the date to "now".

Reviewed By: quark-zju

Differential Revision: D56955920

fbshipit-source-id: 7378a736a4580370fa092014046aa5cf2fce342f
2024-05-07 09:14:30 -07:00
Liubov Dmitrieva
46af573356 address comment from D56937577
Summary: address comment from D56937577

Reviewed By: markbt

Differential Revision: D57050703

fbshipit-source-id: d1b0e521f564c21d6e618f6fffe08b6d5d2e71ea
2024-05-07 08:56:19 -07:00