Commit Graph

84915 Commits

Author SHA1 Message Date
Rajiv Sharma
52c9f45591 Support ClientRequestInfo in SCS
Reviewed By: markbt

Differential Revision: D49441936

fbshipit-source-id: 6b904afd9be4a6cba469749ed6aff96390baf4bc
2023-09-20 18:19:57 -07:00
Evan Krause
6e0958c3c7 Add left/right arrows to navigate pages of uncommitted changes
Summary:
See [#727](https://github.com/facebook/sapling/issues/727)

We want to be able to navigate through long lists of changes.

Sometimes, we have the full list available and we just need to paginate it. (uncommitted changes is like this)

Sometimes, we don't have the full list on the client, and so we want the banner but no pagination buttons. (committed changed files list is like this)

We can detect this by comparing if totalFiles and filesSubset.length are equal. This gets around us needing to pass in more complicated `pageNum`+`nextPage` props from the parent—we can handle it in the child.

Reviewed By: quark-zju

Differential Revision: D49465010

fbshipit-source-id: 8ba3861b55ecb0deb38b9f28af5dbdf4fc80809c
2023-09-20 13:25:29 -07:00
Rajiv Sharma
39e071ccd4 Support ClientRequestInfo in LFS Server
Summary: As in other services, this diff adds support for `ClientRequestInfo` in `LFS`. In particular, it parses the relevant headers and embeds it into the `ScubaBuilder` and `CoreContext` for logging and for passing downstream

Reviewed By: liubov-dmitrieva

Differential Revision: D49440588

fbshipit-source-id: f5dcb79778ab24c2056a92066bde3237ccfb73f2
2023-09-20 11:03:26 -07:00
Rajiv Sharma
db4a8b6e75 Support ClientRequestInfo in MultiplexBlobstore
Summary: Add support for `ClientRequestInfo` in `MultiplexBlobstore` so we will have user identifying information in `blobstore_multiplex_trace` (for `MultiplexBlobstore`) and in `mononoke_blobstore_trace` (for `Manifold`, `XDB` and other physical blobstores).

Reviewed By: zzl0

Differential Revision: D49436554

fbshipit-source-id: 35c5b4a2d77f02c137684fdf155f26e30dc51a06
2023-09-20 11:03:26 -07:00
Evan Krause
534f0a4332 Pass operation_id for commands being run
Reviewed By: quark-zju

Differential Revision: D49434792

fbshipit-source-id: a42a8b70020f9fdb14eae1eba2f4dcee509a6fb8
2023-09-20 10:43:19 -07:00
Evan Krause
b9afbdf75a Add analytics events for non-operation commands
Reviewed By: quark-zju

Differential Revision: D49433650

fbshipit-source-id: b59ec8efe180318431e2948edc0f6299be6a571f
2023-09-20 10:43:19 -07:00
Evan Krause
3d50123298 Add tracker to Repository
Reviewed By: quark-zju

Differential Revision: D49397209

fbshipit-source-id: f1d314bdbf729df66fcf20e64971f9330fd555c6
2023-09-20 10:43:19 -07:00
Evan Krause
be5e3f01ca Log operation_id column to analytics
Reviewed By: sggutier

Differential Revision: D49395316

fbshipit-source-id: bd8d60216353450f3f044fa5e6fd9ff9c85b2da1
2023-09-20 10:43:19 -07:00
Evan Krause
c8333fa2c3 Log operation ID via env var
Reviewed By: sggutier

Differential Revision: D49391288

fbshipit-source-id: cfaee18290511269af1fe20d9d475e37ecdffecd
2023-09-20 10:43:19 -07:00
Liubov Dmitrieva
0972675e2c always read ClientInfo from http headers regardless if trusted or
Summary:
always read ClientInfo from http headers regardless if trusted or
not trusted

the ClientInfo logging to scuba is already in place, and also passing it
further to land service, etc

Reviewed By: RajivTS

Differential Revision: D49439063

fbshipit-source-id: ce0080e9c3f3db34123d8a9c594d37e209ad1a31
2023-09-19 18:46:19 -07:00
Jun Wu
56fb7abd54 ui: integrate with Rust time-interval
Summary:
Report "blocked" intervals to Rust.

Pager, fout/ferr writes are handled by Rust IO so we no longer track those explicitly
from Python.

Reviewed By: muirdm

Differential Revision: D49442475

fbshipit-source-id: e8a77226aae7a45bb4d77774fbec1cf533df47cd
2023-09-19 18:15:46 -07:00
Jun Wu
9d21c21c44 util: mainio -> get_main_io()
Summary:
The makes code paths using the "main" IO use the "latest" instance.

Note: pyio uses the "main" IO under the hood so this might not matter that
much. But this change makes the intention clear.

Reviewed By: muirdm

Differential Revision: D49442473

fbshipit-source-id: 61a084fdd7235054545c5402a0c900f20a3c5107
2023-09-19 18:15:46 -07:00
Jun Wu
8d3f10145d hgcommands: log blocked information
Summary:
This would be used by telemetry. I simplified the "Run Command" tracing span as
spans are too noisy when show up in tracing logs (using the default formatter).

Reviewed By: muirdm

Differential Revision: D49442476

fbshipit-source-id: 978c8bff14aca0224c0b61c99e2c6c14f5ea318f
2023-09-19 18:15:46 -07:00
Jun Wu
0e82cad5a0 pyio: expose scoped_blocked_interval from Rust
Summary: To support non-IO blocked events like ui.system and others.

Reviewed By: muirdm

Differential Revision: D49442474

fbshipit-source-id: 56c9b3a370e464222b43d1d69f12a2fc895c1606
2023-09-19 18:15:46 -07:00
Jun Wu
bc3bb135b7 io: track blocked time intervals
Summary: Use the `time-interval` to track stdio and pager blocking intervals.

Reviewed By: muirdm

Differential Revision: D49432707

fbshipit-source-id: ea1908ad8990d2a288ca634dca963d93b66c09e6
2023-09-19 18:15:46 -07:00
Jun Wu
7218353f2c time-interval: library to count time intervals
Summary:
Intended to replace Python's "blocked" time tracking, with an improvement that
handles overlapped intervals properly.

The interval logic comes from a subset of dag's SpanSet features.

Reviewed By: muirdm

Differential Revision: D49429639

fbshipit-source-id: 6ee818bdfdc576408fc9604b7491dde7f6dfd6ae
2023-09-19 18:15:46 -07:00
Rajiv Sharma
f362a59240 Support ClientRequestInfo in DerivedDataService
Summary: This diff adds support for logging and capturing `ClientRequestInfo` in scuba for `DerivedDataService`

Reviewed By: liubov-dmitrieva

Differential Revision: D49426476

fbshipit-source-id: 1edea0269f840aae225a1e7b0006397f2c9f0df9
2023-09-19 18:03:45 -07:00
Rajiv Sharma
8cbdc4d41a Include ClientRequestInfo in Metadata
Summary: As in title, include `ClientRequestInfo` in `Metadata` since that is the central structure used when parsing request headers in both thrift and HTTP services. I will use this in `DerivedDataService` later.

Reviewed By: liubov-dmitrieva

Differential Revision: D49398202

fbshipit-source-id: ad787840e511859f7e3617bc4d56523c4fa52b54
2023-09-19 18:03:45 -07:00
Liubov Dmitrieva
7a55e06029 log to scuba all the metadata
Summary:
log to scuba all the metadata

ClientRequestInfo is coming as part of the metadata, so it makes sense to call
a generic method that logs everything.

Read Client Info into the metadata

Reviewed By: RajivTS

Differential Revision: D49426464

fbshipit-source-id: 7743daacdf180fe83c56ef66c703cafa05c77392
2023-09-19 16:08:10 -07:00
Jun Wu
d2a0a578df remotefilelog: remove "repack" and its references
Summary: The indexedlog backend does not require "repack" to maintain performance.

Reviewed By: muirdm

Differential Revision: D49399645

fbshipit-source-id: 3c84bfe12f7aa7806719478053afd2382e37c466
2023-09-19 15:47:07 -07:00
Saul Gutierrez
1470839a42 python3-sys: upgrade to python 3.10
Summary:
Trying to help with this problem:

  hg --version
  Traceback (most recent call last):
    File "/opt/fb/mercurial/edenscm/__init__.py", line 81, in run
      from . import dispatch
    File "/opt/fb/mercurial/edenscm/dispatch.py", line 27, in <module>
      from . import (
    File "/opt/fb/mercurial/edenscm/cmdutil.py", line 29, in <module>
      from . import (
    File "/opt/fb/mercurial/edenscm/bookmarks.py", line 21, in <module>
      from . import (
    File "/opt/fb/mercurial/edenscm/encoding.py", line 20, in <module>
      from edenscmnative import parsers as charencode
  ImportError: Python minor version mismatch: The Mercurial extension modules were compiled with Python 3.10.9+fb, but Mercurial is currently using Python with sys.hexversion=50857712: Python 3.8.6 (default, Feb 10 2023, 17:15:29)
  [GCC 11.x 20221024 (Facebook) 11.2.1+]

Reviewed By: muirdm

Differential Revision: D49067540

fbshipit-source-id: 3aa673021b706c659bd2676bc448e3ae1edd6f42
2023-09-19 15:18:33 -07:00
John Elliott
301d414011 Add success metrics to LocalStore get methods
Summary: Adding metrics to enable a full picture of EdenFS cache hits top to bottom. In this case, adding cache hits (success) to LocalStore. This will be paired with existing cache misses (failure). We also add errors (exceptions) to the reporting.

Reviewed By: clara-9

Differential Revision: D49396438

fbshipit-source-id: e28bd8e2785c48f9e9acce5761b01aaeb47da59c
2023-09-19 13:58:56 -07:00
Genevieve (Genna) Helsel
0418f9202b S362020: add option to use symlink as bind redirection on macOS
Summary: on Sandcastle, we can't use either APFS or DMG because they leave behind state that is difficult to correctly and safely clean up (see: S325232 and S362020). For integration tests on Sandcastle, lets use symlinks to mitigate these issues

Reviewed By: mshroyer, jdelliot

Differential Revision: D49335879

fbshipit-source-id: 30267b8c77899cc0942334448966c1fc15c3bba2
2023-09-19 13:11:38 -07:00
Jun Wu
f3bd92351f config: drop some logging
Summary: Drop more legacy config logging.

Reviewed By: zzl0

Differential Revision: D49399076

fbshipit-source-id: e92b98e2a6af93ac9b38980b6721b393150cadd0
2023-09-19 10:20:06 -07:00
Jun Wu
96f9d5de5c config: drop certain config logging
Summary:
Drop legacy config logging. `sqldirstate` is no longer a thing so it gets
removed from extorder.

Reviewed By: zzl0

Differential Revision: D49399077

fbshipit-source-id: b5608cd70059e990aced5cb760ac6a0ab0dd2542
2023-09-19 10:20:06 -07:00
Zhaolong Zhu
6d462c5744 clientinfo: add python binding for ClientRequestInfo
Summary: add basic python binding for ClientRequestInfo

Reviewed By: RajivTS

Differential Revision: D49397765

fbshipit-source-id: ca979615729a65d223248f47f8a7ae66cdc4e70e
2023-09-19 07:14:02 -07:00
Haitao Mei
eff2ad3d16 Packing - packer binary logs pack key for perf tuning
Summary: This diff allows the packer binary to log the packing key into the tuning log, so that we can do deduplications later.

Reviewed By: YousefSalama

Differential Revision: D49411890

fbshipit-source-id: 44dd3791750c55f216ed8585bd5c7e13dc9ed2b7
2023-09-19 07:13:22 -07:00
Zhaolong Zhu
98fdff5aa0 clientinfo: add ClientRequestInfo type
Summary: ClientRequestInfo holds information that will be used for tracing the request through Source Control systems. We will use it in the following diffs.

Reviewed By: RajivTS, liubov-dmitrieva

Differential Revision: D49395556

fbshipit-source-id: 970f8f5aaa583a6249f7c49d68921378f149877d
2023-09-19 06:43:50 -07:00
Evan Krause
f3529dd258 Focus submit button in submit confirmation modal
Summary: When you open the submit confirmation modal, start with the submit button focused so you can just press Enter to confirm, if you know you don't need to double check anything or change the draft mode.

Reviewed By: quark-zju

Differential Revision: D49376910

fbshipit-source-id: 47e7e7daa8bf31a6b9cd60a33f3c484a9956e5fb
2023-09-18 17:29:34 -07:00
Saul Gutierrez
378f0fc0e1 cli: prepare redirect command to be compatible with Python 3.10
Summary:
On D49067540 EdenFS will be upgraded to Python 3.10. This introduces some issues with reading symlinks since those are now created with UNC path prefixes (e.g., `\\?\C:\foo\bar`). Without this change, EdenFS integration tests for redirect break on D49067540.

All users will have UNC-less symlinks before D49067540, so it's better to just change the symlinks comparison in the CLI to ignore the prefixes.

Reviewed By: mshroyer

Differential Revision: D49358416

fbshipit-source-id: 0de9175b3e9d3f8c89762bcf6a347dda2d714461
2023-09-18 14:13:42 -07:00
Saul Gutierrez
369729755f symlinks: add a command for migrating symlink-less repos to symlink repos
Summary:
The command mentioned in the title should allow users to convert repos which don't have symlinks enabled on Windows to repos that have them enabled.

This command only works on non-EdenFS repos.

Reviewed By: muirdm

Differential Revision: D48890621

fbshipit-source-id: 63f7fc7c0d66fa9b24be694416511a88a0931b37
2023-09-18 11:08:49 -07:00
Marlon Jacques
9c759c11a7 packaging: remove hombrew from Mac RPM spec
Summary: To eliminate the homebrew problem, the directory to `opt/homebrew` should be removed from the packaging RPM spec.

Reviewed By: quark-zju

Differential Revision: D49276024

fbshipit-source-id: febb26dc484b7384e6a7914af37ebb6331b24ac9
2023-09-18 10:24:07 -07:00
Jun Wu
7e9673c9a5 git: support exchange.findblobs
Summary:
This makes it easier to get git raw data "touched" by specified commits.

The data can be interesting as example input of a "objects <-> Git bundle" library.

Reviewed By: muirdm

Differential Revision: D49342720

fbshipit-source-id: fd1071c3768bf9af0a1f49bf1602ea94c9648580
2023-09-18 10:11:43 -07:00
Haitao Mei
fa93052b73 Packing - using logger to log progress
Summary: This diff uses logger to log info, instead of using println. So that, we'll have a more consisten way of the packing progress.

Reviewed By: mzr

Differential Revision: D49374726

fbshipit-source-id: 217e32ec8f5f9362776d688a29e60266c858fc8d
2023-09-18 09:57:53 -07:00
Haitao Mei
facd5bf7f0 GC - using logger to log info
Summary: This diff uses logger to log info, instead of using println. So that, we'll have a more consisten way of printing info.

Reviewed By: mzr

Differential Revision: D49374060

fbshipit-source-id: 8486d6ba634f90857b01a3c805403b03c05705f4
2023-09-18 09:57:53 -07:00
Open Source Bot
7250894d2f Updating submodules
Summary:
GitHub commits:

15363c2c11
e98f675f04

Reviewed By: jailby

fbshipit-source-id: d9fa9584d8da2495542d465d5963bfe21a10af20
2023-09-16 17:50:23 -07:00
Open Source Bot
9209904d1c Updating submodules
Summary:
GitHub commits:

f19dcc844c

Reviewed By: jailby

fbshipit-source-id: 03d7a05e85af306d8c7b6b6fbe670c0e2cc949cd
2023-09-16 10:55:14 -07:00
Shashank Kambhampati
46cbacfc33 Add Hack namespace for Eden thrift files
Summary: I want to import these into our Hack server side code so I can write Hack functions to prefetch files. Adding a Hack namespace allows me to do that without hitting classname conflicts.

Reviewed By: kmancini

Differential Revision: D49322120

fbshipit-source-id: 333e27d245c88b17bd3645cb2103ec3e6ba1f63e
2023-09-16 08:00:16 -07:00
Open Source Bot
7c58b5694e Updating submodules
Summary:
GitHub commits:

b7857f2e0f
f098a2694b
f949aa90ba

Reviewed By: jailby

fbshipit-source-id: 8d1d473e813a05ab8ce09b5404c3bf3f0436bd51
2023-09-15 22:01:51 -07:00
Open Source Bot
778e6f7185 Updating submodules
Summary:
GitHub commits:

f0500bd3f2
5e139c2dcf
0496a055fa
8e588e6158

Reviewed By: jailby

fbshipit-source-id: d49d6ee92253c1d91842a3fbef0b4fc2e91f3f2b
2023-09-15 19:52:22 -07:00
Evan Krause
d228b2d0de Add submit update message field for multi-selected commits
Summary:
Like previous diff, but add it when you have multiple commits selected.

This is slightly hairy, because we try to save your edited messages, and yet the keying is by hash. So if you change your selection at all (or a succession happens), you'd lose your message.

I really don't think it should be a big deal—these update messages are supposed to be brief and simply explain what you changed, unlike the summary/ test plan.

Reviewed By: quark-zju

Differential Revision: D49339371

fbshipit-source-id: 47113d097e5e672e85f61365aadd23b8cd7272ae
2023-09-15 18:17:38 -07:00
Evan Krause
8a7fce2981 add update message field to commit info view
Summary:
We now support an update message field when you bulk submit your stack, but we should also let you do this in the commit info view.

I don't love that we need to take up an additional line of space for this, it kind of gets in the way. But I think it's better to have this feature than not.

Reviewed By: sggutier

Differential Revision: D49338613

fbshipit-source-id: cbc26a3366d2419dda1380eb11b0cc18cf2fa578
2023-09-15 18:17:38 -07:00
Evan Krause
c03465781d Have code review provider define if it supports update messages
Summary: we'll need to disable this for github, since I think sl pr / sl ghstack don't have a way to add a comment when submitting.

Reviewed By: sggutier

Differential Revision: D49336279

fbshipit-source-id: 3714f4de61264f6e84b601bd46ec7e1139e13bd1
2023-09-15 18:17:38 -07:00
Evan Krause
5de9ab3258 Add update message text input to confirmation modal
Summary: Add a text field where you can write out an update message to pass to the submit command.

Reviewed By: quark-zju

Differential Revision: D49335831

fbshipit-source-id: c5357824b7f74b87ce49863603608d4b1d4c7448
2023-09-15 18:17:38 -07:00
Evan Krause
2bdfbc562e Fix stack actions tests, add submit confirmation tests
Summary: These tests broke during this stack. Let's reenable by mocking the config to confirm, and also add some tests for the confirmation modal itself.

Reviewed By: quark-zju

Differential Revision: D49334877

fbshipit-source-id: 6737db02e6a04db57a21ae54d6e852b90ab1f9e1
2023-09-15 18:17:38 -07:00
Evan Krause
017ad2851e Use a hook for submit confirmation
Summary:
If we use a hook for the submit stack confirmation modal, we can use a recoil callback to get all the state we need.

We actually had a bug before, where if you disable the confirmation modal, the submit button would have no effect, since now it returns null. We actually need it to return the same information by looking up recoil state for the draft checkbox.

Reviewed By: quark-zju

Differential Revision: D49333423

fbshipit-source-id: 3a398667ed986eb2ba5122574c1dd22179727606
2023-09-15 18:17:38 -07:00
Evan Krause
70cbf90507 Return draft setting from submit confirmation
Summary: Previously, we returned a boolean here to signal that we should submit. We could lookup the draft checkbox state from the atom, but it's simpler to just pass this back from the modal. Plus, we'll need to pass data back to support the update message field.

Reviewed By: quark-zju

Differential Revision: D49330145

fbshipit-source-id: 77422c96f7f5709ffea8f97757b374982f827c28
2023-09-15 18:17:38 -07:00
Evan Krause
0d002ac882 Add settings checkbox for stack submit confirmation
Summary:
Update the settings dropdown to include the stack submit confirmation.

This mirrors the "don't show again" in the confirmation modal.

Of course, we need this to be accessible outside the modal because once you check it and close the modal, you won't see the modal again!

Also, we have a few settings now for code review, let's lump them together so it's easier to read and we don't take as much space.

Reviewed By: quark-zju

Differential Revision: D49330148

fbshipit-source-id: f907f8c7e3c1d59cb76bb223851b784bace93c58
2023-09-15 18:17:38 -07:00
Evan Krause
a4499dd02a Persist and respect confirmation interstitial setting
Summary:
Actually store the config state for whether you want to see the stack submit confirmation modal.

We do this with our normal persist effect.

I was a little back and forth on whether this should be the positive "show confirmation" or the negative "don't show confirmation". I opted for the setting to be positive, but show the negative in the modal. Somehow that makes more sense to me.

Reviewed By: quark-zju

Differential Revision: D49330149

fbshipit-source-id: 7601aa3b979a460ffd80704dbb8010197690bbe3
2023-09-15 18:17:38 -07:00
Evan Krause
43d9c7ad12 Show confirmation interstital when submitting
Summary:
Add an interstitial modal which lets you choose if you want to submit as a draft or provide an update message.

We also let you choose not to show this message.

Reviewed By: quark-zju

Differential Revision: D49330147

fbshipit-source-id: bdd728ba3f0c853ac61ab415166adad3c9a12e66
2023-09-15 18:17:38 -07:00