Commit Graph

89315 Commits

Author SHA1 Message Date
Evan Krause
bad1c4a815 Add prop to Column for align-items: flex-start
Summary:
<Column> is very useful, but the default is to center align items. flex-start is very often useful (perhaps even more often than center??).

Add a prop to set the align-items to flex start so you can use `<Column alignStart>` instead of `<Column style={{alignItems: 'flex-start'}}>` which is cumbersome.

Reviewed By: muirdm

Differential Revision: D56532249

fbshipit-source-id: fb61b447037ef6b908dcce19d971c589c6f3facc
2024-04-26 10:01:50 -07:00
Evan Krause
af216bac39 Update <Checkbox> in DebugToolsMenu
Summary: Migrate these checkboxes

Reviewed By: muirdm

Differential Revision: D56531872

fbshipit-source-id: c138889b7ee29c4f2e83c8a48120a92db9747d0c
2024-04-26 10:01:50 -07:00
Evan Krause
6ec8e337a2 Use <Checkbox> for FileStackEditor
Summary: This component is not directly accessible in the UI, but let's migrate their checkboxes anyway.

Reviewed By: muirdm

Differential Revision: D56531553

fbshipit-source-id: fe26bc529d597bcd05891e10a273d6837d3213ec
2024-04-26 10:01:50 -07:00
Evan Krause
c46e257cbb Support disabled prop in <Checkbox>
Summary: Add `disabled` prop

Reviewed By: muirdm

Differential Revision: D56531413

fbshipit-source-id: dda02116f4ec9ea771400ee28bb01b4dcc2a3958
2024-04-26 10:01:50 -07:00
Evan Krause
858bb9e16b Migrate ChangedFile <Checkbox>
Summary:
Migrate from <VSCodeCheckbox>. One small spacing adjustment is needed when there's no children of the checkbox.

This allows us to remove a hacky use of `onClick` instead of `onChange`, which we prefer.

Reviewed By: muirdm

Differential Revision: D56531022

fbshipit-source-id: a343d2c98edcab649ee6a27fd97ac59167077ade
2024-04-26 10:01:50 -07:00
Evan Krause
8a9108b9ef Migrate FileStackEditPanel to <RadioGroup>
Summary: This is the last user of <VSCodeRadioGroup>.

Reviewed By: muirdm

Differential Revision: D56529591

fbshipit-source-id: 5bb66ec43e252eae5c3281665b98225113d509fc
2024-04-26 10:01:50 -07:00
Evan Krause
e5dde07ed1 Migrate CommitInfoView to <RadioGroup>
Summary: The commit/amend selector can migrate to <RadioGroup>. This does require adding a "horiztonal" mode, but it's quite easy to do.

Reviewed By: muirdm

Differential Revision: D56528619

fbshipit-source-id: 856f93dccb42b0156dc18677ffd9055fb705865f
2024-04-26 10:01:50 -07:00
Evan Krause
692f780a0e Migrate PartialFileSelection to <Checkbox>
Summary: Use <Checkbox> now that it supports indeterminate states

Reviewed By: muirdm

Differential Revision: D56527595

fbshipit-source-id: 8f24523e4d66789b36f1c3837dfe3eebc5a8b8b0
2024-04-26 10:01:50 -07:00
Evan Krause
49f260f5bf Support indeterminate checkbox
Summary:
This indeterminate state is useful for checkboxes that represent a condensed view of child checkboxes, and if some are checked and some are unchecked, we show neither true nor false.

<VSCodeCheckbox> has this too, and we use the same sort of styling (rounded rectangle inside)

Reviewed By: muirdm

Differential Revision: D56526950

fbshipit-source-id: e2e3ab28b72d6e199c6f13ba3c5fd4d7a030cd84
2024-04-26 10:01:50 -07:00
Evan Krause
d193196c9d Migrate PartialFileSelection to <RadioGroup>
Summary: Updating to <RadioGroup>

Reviewed By: muirdm

Differential Revision: D56526126

fbshipit-source-id: e4859a90f3d903cedb6f8fbf87beeea301037231
2024-04-26 10:01:50 -07:00
Evan Krause
eb7bcd8076 Update <RadioGroup> to accept tooltips for items
Summary: This lets you give more description for elements

Reviewed By: muirdm

Differential Revision: D56499710

fbshipit-source-id: e6c228d243df70fc0d377c55b39965d2b30dac4e
2024-04-26 10:01:50 -07:00
Evan Krause
199a99ae94 Support data-testId in ButtonDropdown
Summary: Allow specifying a testid for ButtonDropdown, for use in tests

Reviewed By: quark-zju

Differential Revision: D56599851

fbshipit-source-id: fb425b351706a7a7347e83b6eddb23b2c099dc01
2024-04-26 10:01:50 -07:00
Evan Krause
32aded38bf Add icon-style ButtonDropdown
Summary: Add styles for `kind='icon'` for `<ButtonDropdown>`. This styles it like a `<Button icon>`. We previously didn't support this because we added it before we had the border around icon buttons. Now it fits much better. This lets us do more subtle dropdown selectors.

Reviewed By: muirdm

Differential Revision: D56496853

fbshipit-source-id: 72433d4bd774536142b0739ede1bb44c2f1cc488
2024-04-26 10:01:50 -07:00
Evan Krause
7e084c328c Rename VSCodeButtonDropdown to ButtonDropdown
Summary: Move this file to components and rename it for consistency

Reviewed By: muirdm

Differential Revision: D56494154

fbshipit-source-id: fda53c8d31113c79a7669e325cf4768665657944
2024-04-26 10:01:50 -07:00
Alex Hornby
37be2b1cc2 add libdwarf manifest for folly to use
Summary: Give folly depends on and picks up libdwarf, add a manifest for libdwarf to make it explicit and stop it being found via other means

Reviewed By: markbt

Differential Revision: D56630711

fbshipit-source-id: 7b9386b4b93788e7efda13e51e35c9fec4fd6df2
2024-04-26 09:40:38 -07:00
Open Source Bot
2f36f3c943 Updating submodules
Summary:
GitHub commits:

3157f20aad
52676f344d
1b261fc731
47c7d9ad14
5ac73ff08e
d2d9c80267
f9ac285d3d
7ca7bf1e93
35866548b5
3b2468f5f6

Reviewed By: bigfootjon

fbshipit-source-id: bc0cd5260755634c9262a25b4b4cee4f8a69396a
2024-04-26 09:32:14 -07:00
Pierre Chevalier
19227af168 backsyncer: Log from_csid and to_csid to scuba
Summary:
Before this diff, no changeset id was logged to scuba.
This can be useful information to avoid having to jump around between the bookmark update log and the mononoke_xrepo_backsync scuba table.

Log these fields after backsync if they are present.

Reviewed By: mitrandir77, singhsrb

Differential Revision: D56628219

fbshipit-source-id: 6a139ddd7e4a43f06ad02dbb1019cdc98b10c653
2024-04-26 05:38:06 -07:00
Saul Gutierrez
66f37e4b79 tests: add tests for echo and printf commands
Summary: Seems like there are a couple of bugs in these two commands, so let's add some examples of where they fail so that we can fix them later.

Reviewed By: muirdm

Differential Revision: D56598269

fbshipit-source-id: 64fe4ee2a669745e054bd4777a8116b53fb3f044
2024-04-26 05:32:35 -07:00
Saul Gutierrez
01f5128067 tests: add support for RemoveSmallestPrefix on debugruntest
Summary: This adds support for "RemoveSmallestPrefix" substitutions in the debugruntest bash interpreter, allowing it to process arguments like `${parameter#somepattern}`. This will later be used in D56220002

Reviewed By: zzl0

Differential Revision: D56493927

fbshipit-source-id: db0b3d9f277811b5a33bc83d0d39c08b612ad701
2024-04-26 05:32:35 -07:00
Saul Gutierrez
41f319bd1e tests: enable EdenFS for test-rust-checkout.t
Summary:
One of the initial reasons for us to enabling EdenFS on .t tests was to test
differing behavior between EdenFS and non-EdenFS on various commands at the
same time. The `goto` command is known for having differences between those
two, so let's actually test this. This test in particular also has the
advantage of using the "proper" way of initializing and conducting tests
(i.e., using `modernclient` and `newclientrepo`), which also makes it a
good candidate for this.

Enabling EdenFS on this test already surfaced some differences, which will
be fixed later.

Reviewed By: muirdm

Differential Revision: D56220001

fbshipit-source-id: a5d36881c9d15ea5b52c9d2820f01f4796b3b2bc
2024-04-26 05:32:35 -07:00
Saul Gutierrez
14cab3ca04 tests: be more forgiving of sl goto output on EdenFS .t tests
Summary:
On D56220001 EdenFS will be enabled for one of our `sl goto` tests. On EdenFS we
usually don't output the number of files that have been updated, and this is
expected behavior. This diff will help us to not having to add a special case
for EdenFS on each case.

Reviewed By: quark-zju

Differential Revision: D56382866

fbshipit-source-id: 0f51f7514918b3c983a5622f63f33b0153713947
2024-04-26 05:32:35 -07:00
Saul Gutierrez
9f214159f5 tests: add a way to add a fallback function for comparing lines
Summary: In some cases, such as when comparing EdenFS test output we need to add a few exceptions. This diff should be useful for that kind of cases

Reviewed By: quark-zju

Differential Revision: D56580976

fbshipit-source-id: a6f392cf94e0c61ac6002d2c43bdfebbb6bd5b2d
2024-04-26 05:32:35 -07:00
Youssef Ibrahim
299f72140c git/protocol: make packfile generation generic over GitDeltaManifest version
Summary: We want to create a new version of `GitDeltaManifest` that uses git's diff algorithm to generate deltas, and we need to be able to use it alongside the current version. In order to do this, this diff creates traits that encapsulate what is needed out of `GitDeltaManifest` and makes the packfile generation code generic over them. This diff also implements a `fetch_git_delta_manifest` method to get whatever `GitDeltaManifest` version is configured in derived data types repo config.

Reviewed By: markbt

Differential Revision: D56578016

fbshipit-source-id: a6bf23836ebe81c421e99cb44b0b652aa74c5394
2024-04-26 04:30:42 -07:00
Liubov Dmitrieva
949fdc4784 introduce augmented manifests types
Summary:
introduce augmented manifests types (storage layer).

Background:

**Augmented Manifest** is our new data structure represented familiar tree manifest with **two** pointers: traditional mercurial hgid and a newly introduced content-addressed blake3 pointer that would be a hash of child entry serialised with a **custom serialisation format**. We also include size of that serialised blob to form a Digest compatible with CAS.

The new data structure will allow storing Source Control data in CAS, and provide efficient way for Eden to fetch AUX data together with trees, replacing the current slow and inefficient implementation, that triggers fetching lots of blobs (per leaf file entry).

The new format also supports sharing from the beginning, that is important for Mononoke performance for large manifests.

The HgAugmentedManifestEnvelope is the type internal to Mononoke for storing.

Reviewed By: markbt

Differential Revision: D55635473

fbshipit-source-id: 39d2adf1874512d3ed42b0e6d2e1cb785246b493
2024-04-26 04:30:14 -07:00
Muir Manders
c02c054204 backingstore: only reload repo if config has changed
Summary:
Every (default) 5 minutes, we will now only reload the Repo if the on-disk sapling config files have changed since last time we checked. We check for mtime/size difference, and missing/added files. Everything is "best effort" (i.e. low effort) - we don't handle errors, and there are some minor race conditions where we could miss a config update.

Previously we always reloaded the sapling Repo every 5 minutes, but this could theoretically interact badly with kernel caches (wrt the sapling cache's huge mmaped files), or have other unwanted side effects.

Reviewed By: zzl0

Differential Revision: D56501713

fbshipit-source-id: 9d7d21844422226f70afb8fb974660713fd88303
2024-04-25 18:59:52 -07:00
Muir Manders
85a6fe15ea config/loader: add entry point for EdenFS
Summary: Add config loading entry point embedded_load() for callers like EdenFS. EdenFS's embedded Sapling version string will not match the system sl version string, so we set the minimize_dynamic_gen so we don't have dynamic config flapping between EdenFS and sl.

Reviewed By: zzl0

Differential Revision: D56546444

fbshipit-source-id: a7b48173e05a8c31abe2d5072ef21c8ab41bec2a
2024-04-25 18:59:52 -07:00
Muir Manders
d30630b827 config/set: record file content hashes
Summary:
In addition to the paths, also record the content hash of each underlying config file.

I want to use a content hash so I don't have to use mtime and file size to infer changes. mtime in particular doesn't work because we intentionally update hgrc.dynamic's mtime without changing its contents.

Also, recording the content hash during config loading is the only good place to do it (if you check it later you are open to race conditions).

Reviewed By: zzl0

Differential Revision: D56546445

fbshipit-source-id: c6afe747825e7fb3bc2104693e9bfb0b76efff45
2024-04-25 18:59:52 -07:00
Muir Manders
630d225690 config: add option to minimize dynamic config generation
Summary: I've realized that the dynamic config will flap back and forth due to EdenFS having a different Sapling version vs. the system "sl" binary (the generated dynamic config contains the version string). I think the simplest fix is to make EdenFS not re-generate the dynamic config itself, instead relying on the background refresh via "sl debugrefreshconfig". The one problem is if EdenFS starts up and there is no existing dynamic config - we must generate it synchronously.

Reviewed By: zzl0

Differential Revision: D56546443

fbshipit-source-id: c10de045c71ed1caa5bc04865399ad3eff189937
2024-04-25 18:59:52 -07:00
Evan Krause
403afa7bf1 Fix miscompilation of styles
Summary:
Looks like an unfinished comment snuck in during my copy paste of styles. In production builds, stylex was just pasting this literally, causing an unfinished comment which propagates and disables a TON of subsequent styles. This breaks many parts of the UI

This only happens in production builds I guess because dev mode stylex works differently and maybe does styles one by one.

Reviewed By: sggutier

Differential Revision: D56597536

fbshipit-source-id: 8a6c944eaed6f55fa81aefa4a98d5c56237652cd
2024-04-25 15:21:13 -07:00
Evan Krause
0305dff40e Bump waitFor timeouts in CI jobs
Summary:
I noticed some flakiness with test jobs in the isl tests. I typically see isl timing out on a waitFor for something like syntax highlighting (which loads async). Let's bump the timeout to 5s instead of 1s to help account for slower jobs.

I only do this for CI jobs (sandcastle internally or github actions externally), so local testing doesn't take 5x longer if there's a failure. I haven't noticed flakiness when working locally.

Reviewed By: muirdm

Differential Revision: D56549952

fbshipit-source-id: 17be31f4a7c159eeaf85d1be5385cee11dab4f07
2024-04-25 12:04:16 -07:00
Zhaolong Zhu
0362dc6430 flake8: sort the builtins
Summary:
Just realized my recent added builtins break the ordering property, this diff
fixes it

Reviewed By: muirdm

Differential Revision: D56520744

fbshipit-source-id: fd125aac7d73b4faebb659dd3f966c8952c5068c
2024-04-25 11:08:53 -07:00
Evan Krause
45fda69e93 Handle commits with no title when parsing commits
Summary:
If you have a commit with no title or description, our commit parsing would `.trim()` the commit away entirely, and then there would be not enough fields, so we'd skip the commit as malformed.

Since we're using all trailing lines after the last field before the COMMIT_END_MARK as the description, we should not trim it.

Reviewed By: sggutier

Differential Revision: D56542648

fbshipit-source-id: c684c654d01ddb74f6f13e22b0c573e9628e2dae
2024-04-25 10:29:12 -07:00
Evan Krause
3d57061fa0 Pass a title if none provided when splitting
Summary:
If you try to split a commit, and delete the title from one of the commits, it can cause issues in `sl`. Let's force a title to be used in this case.

Similarly, if you use a commit message template, but delete the title of a commit, then you can end up with the commit template field becoming the title, which looks wrong. Let's use the fallback title in this case too.

We could consider using the same title format when you make a commit, like "split of ...", but if they deleted that they probably don't want that title.

Reviewed By: sggutier

Differential Revision: D56541639

fbshipit-source-id: 3bc7961d9627816e5e47d217dabb6e7968ddecc6
2024-04-25 10:29:12 -07:00
Liubov Dmitrieva
e0e2ef1618 remove code duplication
Summary: remove code duplication (the into() method is identical)

Reviewed By: zzl0

Differential Revision: D56568940

fbshipit-source-id: 7d233e4f4fcca2d91bc5f2b61fa5bfc11651baf1
2024-04-25 10:04:04 -07:00
Liubov Dmitrieva
3bc7f9e3cc Fix compatibility issue with Mononoke for fetching tree's metadata.
Summary:
Fix compatibility issue with Mononoke for fetching tree's metadata (S412931).

We would like to resume returning the sha256 hash and content id hash for some period of time due to incompatibility issue client side.

The old logic contained a problematic unti-pattern with "unwrap()" calls on option types while converting FileMetadata to FileAuxData, causing a need to support "assumptions" compatibility on top of backwards compatibility within binary edenapi transport/protocol that we already have.

The diff will accommodate this remaining layer of compatibility by adding the
fields back.

server side was:

```
size: Some(metadata.total_size),
content_sha1: Some(metadata.sha1.into()),
content_blake3: Some(metadata.seeded_blake3.into()),
content_id: Some(metadata.content_id.into()),
content_sha256: Some(metadata.sha256.into()),
```

client side was:
```
size.unwrap()
content_sha1.unwrap()
content_blake3.unwrap()
content_id.unwrap()
content_sha256.unwrap()
```

Reviewed By: gustavoavena

Differential Revision: D56567319

fbshipit-source-id: c0260c6dfeb95f5175715a9c411c5f503c5123c6
2024-04-25 10:04:04 -07:00
Luisa Vasquez Gomez
b34d672152 commit_cloud: get_workspace endpoint
Summary: First fully working endpoint for commit cloud in mononoke.

Reviewed By: markbt

Differential Revision: D55749102

fbshipit-source-id: 4427f01b1ee7936018c5d1b4f4a6bcf0a7f0dd69
2024-04-25 09:55:03 -07:00
Open Source Bot
7703157b96 Updating submodules
Summary:
GitHub commits:

a156bf5b58
d579e4943b
5858726754
e08f6ee4ab
5986d37294
cf7b3f5727
f745afd678
207fa0e8c1
3ef213393d
e32f88fad7

Reviewed By: bigfootjon

fbshipit-source-id: a4c272829581a8d1fb23afa174f397fb59503361
2024-04-25 09:34:51 -07:00
Kaveh Ahmadi
ebd712d7a8 change params to const&
Summary: `edenTreeID` and `path` are not modifying inside this function. Let's change them to const& and send them by val.

Reviewed By: chadaustin

Differential Revision: D56539534

fbshipit-source-id: 89b0483893c531c0d676826f4a913f4b841e66fb
2024-04-25 08:21:31 -07:00
Gustavo Galvao Avena
825668bf3d Log generation difference in SCS commit_compare
Summary: As discussed offline with mitrandir77 and andreacampi, this is far from a perfect solution, but it might help us drill down on which clients are overloading SCS services.

Reviewed By: mitrandir77

Differential Revision: D56572549

fbshipit-source-id: 485b3afdb29d8b3d31b280c48a0aa76680f0fbc6
2024-04-25 07:24:46 -07:00
Alex Hornby
a3eb5506ca fix darwin boost break on std::piecewise_construct
Summary:
Since Xcode 15.3 std::piecewise_construct is only visible in c++17 and later modes

std::piecewise_construct used to be visible in c++03 and later as extensions, see
https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes#Deprecations

Reviewed By: lebentle

Differential Revision: D56539492

fbshipit-source-id: 25706bec5aa5a4343a8429eb3d3eeeae9d9a0469
2024-04-25 04:31:02 -07:00
Mateusz Kwapich
f6b0f4fd1e maintain mapping on idle
Summary: When we don't have anything better to do let's maintain the mapping. This is important for low-traffic repos where that would normally happen only when there's a new commit.

Reviewed By: andreacampi

Differential Revision: D56399768

fbshipit-source-id: d201d632118963b19d1f64928d04386e2cf6c811
2024-04-25 04:05:36 -07:00
Mark Feng
8c7a691727 update 'clap-4' crate to 4.5.4
Summary:
version bump follow https://www.internalfb.com/intern/wiki/Rust/Third_Party_Libraries/Adding_or_Updating_Libraries/

Also updated `clap_complete` together

allow-large-files

Reviewed By: capickett

Differential Revision: D56519704

fbshipit-source-id: deb160a682bd156c69e3f0509a54b1f6a5a85f27
2024-04-25 01:23:31 -07:00
Zhaolong Zhu
d926fce464 automerge: support the easy enable/disable of a single algorithm
Summary:
With this diff, we will be able to enable an algorithm with `automerge.<algo-name>.enable=True` and disable it with `automerge.<algo-name>.enable=False`.

After this change is in production, we will deprecate the `automerge.merge-algos` config.

Reviewed By: muirdm

Differential Revision: D56534917

fbshipit-source-id: 4b7ffb96e054875dc4d564380715c39ca6d820c2
2024-04-24 22:08:17 -07:00
Shayne Fletcher
c32ee87df3 fix warnings for forward compat with 1.78.0
Summary: fix some warnings

Reviewed By: dtolnay

Differential Revision: D56545279

fbshipit-source-id: fee1b8dc5aa5772f7be80797f0acadd7593fef4c
2024-04-24 17:41:23 -07:00
Saul Gutierrez
fbeef2735f tests: enable doctests for fbcodereview ext
Summary: On a later diff we'll test the doctest of a newly added function, so let's enable doctests for this module

Reviewed By: zzl0

Differential Revision: D56498138

fbshipit-source-id: fe6d66239aec7e7b04d4846f1f63f88e5d208578
2024-04-24 16:16:41 -07:00
Muir Manders
b7e443e4c4 smartlog: add hint about smartlog being the default command
Summary: If you run "sl sl", you'll now see a hint explaining you can just run "sl" (since "smartlog" is the default command).

Reviewed By: evangrayk

Differential Revision: D56527187

fbshipit-source-id: c33cbc7b0a238b112d45da77af587693511eb4d0
2024-04-24 16:16:24 -07:00
Paul O'Shannessy
bd8d8557d1 Rebuild GitHub Actions workflows
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/749

Updating generated workflow files to account for recent changes. Most notably, this updates the checkout action to v4 and sets an explicit read-only permission.

This also adds support for `--cron` in the codegen to account for only running CI on a schedule (useful for managing costs).

Reviewed By: ahornby

Differential Revision: D56165825

fbshipit-source-id: 298b16effefb6b8a2dc6cbcf07d4ec4a61f48364
2024-04-24 15:36:57 -07:00
Evan Krause
803d27af75 Fix test not mocking node:fs
Summary: The change to node:fs from fs broke one test, which was mocking fs and not node:fs.

Reviewed By: sggutier

Differential Revision: D56543505

fbshipit-source-id: b414724c3089af09f67918d6c7ea9ec4b14d2385
2024-04-24 15:21:06 -07:00
Michael Cuevas
abb6bc101d change Rust CLI exit code on parse error
Summary: This was suggested during review of D56282193.

Reviewed By: genevievehelsel

Differential Revision: D56375541

fbshipit-source-id: b216c7101ed546b43bb6ed036b9eda19dd8997da
2024-04-24 14:06:53 -07:00
Michael Cuevas
40fa74329b rename is_command_enabled
Summary: This was requested in the review of D56277269.

Reviewed By: genevievehelsel

Differential Revision: D56369399

fbshipit-source-id: 58fbaddac44f07e249a9f44ea4c7d23091f73f45
2024-04-24 14:06:53 -07:00