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
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
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
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
Summary: This extension should have been added to D56766291, but was accidentally deleted
Reviewed By: muirdm
Differential Revision: D57021765
fbshipit-source-id: f260fa6d47b1386d36fa1b2aa6a88226c74dbcbd
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
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
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
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
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
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
Summary: All these functions can fail if the parent directory doesn't exist, and it's probably better to just create the parent directories to prevent a number of commands from failing.
Reviewed By: zzl0
Differential Revision: D57019517
fbshipit-source-id: fa8a8639d643ee25c0859609fe0543e39ae7c3ec
Summary: implement fetches of the augmented trees via EdenApi
Reviewed By: mitrandir77
Differential Revision: D56956167
fbshipit-source-id: ccc1081d0a4f8fc13a07bf5bf5c3cb7085247679
Summary:
introduce code to load and store
HgAugmentedManifestEnvelope into blobstore
Reviewed By: mitrandir77
Differential Revision: D56937577
fbshipit-source-id: cd577dcd0d6521f62dc7a77d5e149302261f43ff
Summary: Better to use it in `cross_repo_sync` library outside of `git_submodules` module.
Reviewed By: mitrandir77
Differential Revision: D56929931
fbshipit-source-id: ea9c59b3785e1d05e66b8d292878f5a7b1e057a2
Summary:
As I mentioned in D56881703, we're currently ignoring the small repo's configured submodule action when backsyncing.
While this is not ideal, we also don't want to change this right now.
So I'm at least adding a warning log so that we're aware when this happens.
Reviewed By: mitrandir77
Differential Revision: D56826268
fbshipit-source-id: 5f7f60d8e558acffd22859260886a1fcafd89a60
Summary: When pulling the latest changes for `whatsapp/server` through `Mononoke GRit` server, we encountered an error which was essentially a result of a cycle included in the packfile. Git has weird set of conditions in which it allows cycles and certain other conditions in which it doesn't allow cycles. To avoid bumping into this problem in the future again, let's build in cycle-detection logic which prevents from sending objects like A and B where A is expressed as delta of B and B is expressed as delta of A.
Reviewed By: mitrandir77
Differential Revision: D56981007
fbshipit-source-id: dad6e11460531176b805d94c06f857377a850dcd
Summary:
As seen in the previous diff, when the request from the client includes tag Object Ids in the `WANTS` section, we just consider the commit pointed to by the tag and completely ignore the tag itself. As a result, the output tag stream sent as part of the server response does not include the requested tags. The changes in this diff ensure that every tag that matches either of the following constraint gets sent in the response to the client:
- If a tag points to any commit that is part of the response, then that tag gets sent
- If a tag is explicitly requested by the client through the `WANTS` section, then that tag gets sent
Reviewed By: mitrandir77
Differential Revision: D56980436
fbshipit-source-id: 5d92dff784e212ec71b6b78c9f50e0877731c8c1
Summary:
The negotiation part of the git protocol involves the client specifying its `WANTS` and `HAVES` and the server realizing the set of objects to send to satisfy the client's need. The first version of the server expected only commit Object Ids as part of `WANTS` and as a result it failed straight away in the presence of tags. The current version of the server allows for tag Object Ids as part of `WANTS` but it converts it into commits pointed to by the tag. That works in the cases when the commit pointed to by the tag is part of the packfile being sent by the server.
If the packfile does not include the commit that the tag points to, then we completely omit sending the tag even though the client explicitly requested it. This integration test highlights that we do not support this behavior yet and fail with a fatal in such a case. I will fix this in a follow up diff along with an updated integration test.
Reviewed By: mitrandir77
Differential Revision: D56979846
fbshipit-source-id: 4cff34b4d5ba55a652b91d57ce5ac95a1ca0b162
Summary:
All the integration tests related to `git pull` used it as `git pull https://hostname/repos/git/ro/repo.git`. This doesn't function as a standard pull, i.e. just `git pull`. [This SO post](https://stackoverflow.com/questions/48749715/what-does-git-pull-link-to-remote-do) explains the detailed difference but fundamentally using pull with a remote URL ends up using a default ref spec that works only for branches (i.e. `+refs/heads/*:refs/remotes/origin/*`). This makes us miss out tags from the server.
This diff updates the integration tests to make use of just `git pull` so that we pull all refs (heads and tags).
Reviewed By: mitrandir77
Differential Revision: D56979746
fbshipit-source-id: a309ef656dfb1e179cf342041729a9e5920539e6
Summary:
In repositories imported from Git there are two dates: the author date and committer date. Depending on whether they were imported into Mononoke first (which uses the same style as hg-git), or imported into Sapling directly, these dates are mapped differently.
In the cases where Mononoke did the import, we may want to configure repositories to prefer the committer date, rather than the author date, which is what is used by default. Add a new config option `log.use-committer-date` which does exactly this.
We also extend the JSON format for `hg log` to include both author date and committer date if they are available. This means tooling that knows specifically which one it wants can be modified to fetch exactly that.
Reviewed By: quark-zju
Differential Revision: D56941671
fbshipit-source-id: 0d68a333caf06b8b82e08b581f06df6394520992
Summary:
This diff adds a new private enum to differentiate between the different types of Trees that can be get from backing store.
All `getTree()`, `getRootTree()`, and `importManifestForRoot()` at some point call `retryGetTree()` or `importTreeManifest()` to get Tree from backing store. This new enum is passed in the params then these two functions will know which type of Tree they are getting from baacking store. We will use it to collect correct metrics.
## Note
This doc explains all the SaplingBackingStore ODS counters/duration after this stack changes: https://docs.google.com/document/d/1o355e8JGvq3fBYFD738Jkx9tPSWzH4bmxcM8YRKMziU/edit?usp=sharing
Reviewed By: kmancini
Differential Revision: D56842474
fbshipit-source-id: 0699e215ba7d488ac2c2b873fb97ca331dc207f2
Summary:
the diff eliminates dependencies on brotli-3.3.4 and brotli-decompressor-2.3.5.
the reason is for the avoidance of duplicate symbols that result from combining targets that depend on `fbsoure//third-party/rust:brotli_decompression` (e.g. `rerun_c` via `ureq`) AND `fbsource//third-party/brotli:brotli_decode` (e.g. `fbsource//third-party/apache-arrow:arrow`).
with these changes in place then remove occurrences of the link flag `"/FORCE:MULTIPLE"` introduced by D56797954 and D56821592 to work around this problem.
Reviewed By: jdonald
Differential Revision: D56943460
fbshipit-source-id: b38d69503f6be85a2055a89da2a161d114030c4c
Summary:
- This crate provides a parser for PCI configuration space
- Really useful for writing tools for PCI configuration space that don't just shell-out to `setpci`
Differential Revision: D56983535
fbshipit-source-id: 0407d9e0f856a9b7042f82180f32ee4aedd0436e
Summary: I skipped this during the update references impl.
Differential Revision: D56903500
fbshipit-source-id: 12e75b993ca6d40ff5c994125b6bf460b23420e4
Summary:
# Context
Genna discovered that passing junk to `eden debug blob` on a FilteredFS repo would cause the Eden daemon to crash. This is because `XCHECK_EQ()` eventually resolves to `XLOG(FATAL, ...)` if the equality check fails[1]. We don't actually want to crash in this case, since a user can pass non-sense to 'eden debug blob' whenever they'd like
# The Fix
We should just throw an invalid argument exception if the ID we get passed in looks like garbage. This causes the thrift call to fail instead of making the daemon crash.
In addition, I moved the `XCHECK()` lower in the function to be an `XDCHECK()` so that we only crash the daemon in debug mode (not production). This is fine, since that check is meant to be hit during development, not in produciton!
Reviewed By: genevievehelsel
Differential Revision: D56846354
fbshipit-source-id: 3623eb05ccff83b4186b7f4e4363fa769df872bd
Summary: increase the timeout for jest tests in CI. We previously increased the `waitFor` timeout, but we shoudl also bump the general test timeout too.
Reviewed By: quark-zju
Differential Revision: D56954680
fbshipit-source-id: 65145914071d4452f0487e486e593ebf13f75aff
Summary:
Even with the changes from D56443510 it's not enough to make Sapling look for
local Git commits in case there is a newer Phabricator version. Sapling commits
do not have this issue since they are backed up by commitcloud, so those usually
get autopulled if Phabricator's version is more recent than the local one.
This diffs changes that for Git repos, showing a warning telling users to use `jf get` to get the latest version since that error message should be more useful for them.
Reviewed By: muirdm
Differential Revision: D56447240
fbshipit-source-id: 54025ac7f330c629b3b804a3b9dc1a3013e29d83
Summary:
Some time ago Phabricator revsets were usable on Git repos, but seems like
recently something broke and it's not possible to use them for finding
local commits anymore, which this diff fixes. Additionally, this diff
makes it possible again to find public commits by Phabricator revsets,
which seems to have been broken for a much longer time.
There are two root causes for these issues:
- `remotefilelog.reponame` has the name of Git repos as `reponame` instead
of `reponame.git`, which in turn causes `sl` to error out with issues like
`abort: D123 is for repo foo/bar/baz.git', not this repo ('baz')`
(fixed in D56444313)
- The logic for resolving Git revisions from Phabricator was written 10 years
ago, and depends on using sshpeer which is not really supported anymore: D1458491
Reviewed By: muirdm
Differential Revision: D56443510
fbshipit-source-id: 14e176cac5de1216b1e170d0863d7b7c6382df59
Summary: Git repo names are not being properly compared with JSON results from Phabricator, causing various issues as explained in D56443510, which this diff fixes. This is however not enough for making Phabricator revsets work again, but that is done in D56443510
Reviewed By: muirdm
Differential Revision: D56444313
fbshipit-source-id: c646de21bfa5c6d0813f5d66977aa90f9f799908
Summary:
This makes most of our existing tests have the equivalent configs and files in the repo that adding `$ configure modernclient`. There are a few reasons for doing this:
1. This makes eventually migrating tests to be compatible with EdenFS considerably easier, especially if they don't have `configure modernclient` in them
2. This reduces overhead for creating new tests and makes it easier for test writers to use the recommended setup
3. This opens the path for doing arbitrary actions for setting up a test. Before this diff the best we could do was editing configs in `default_hgrc.py`, but this already does some file manipulation for all tests.
4. This allows modernizing only debugruntest tests, since Mononoke tests aren't really compatible with it right now and just enabling more modern files breaks a number of those tests. Also, the option for using more modern configs in our own test without breaking the Mononoke ones possible.
Reviewed By: muirdm
Differential Revision: D56766291
fbshipit-source-id: dfa4a34e9dcb2784610d77cfeaa629bb6dea492d
Summary:
Now, the `SaplingBackingStore` know the source of each request. However, the sourced is available only for the finish event. The start and queue event doesn't know the source. In the last diff we used UNKNOW for these events. This diff changed the FetchedSource to a std::optional. Therefore for these events we don't need to populate it.
On the other hand, eden.thrift has a NOT_AVAILABLE_YET option. It chooses this option when the std::option doesn't have value.
The kFetchedSource map also update then if we have NOT_AVAILABLE_YET as the fetchedSource, it will give us a blank space character " " and the trace hg will print blank space char for start and queue events.
Reviewed By: kmancini
Differential Revision: D56942308
fbshipit-source-id: 732d5b4fd11cd2e9c5b8ff8e6dc1ec70bc262033