Summary: Fix TODO, BlobRepo is cloneable and there is no reason to use Arc<BlobRepo>
Reviewed By: ikostia
Differential Revision: D13607214
fbshipit-source-id: ba280823e8b232d4bf6e62ac2ce8d8cd3ee64c96
Summary:
At the moment it's very hard to understand where the request came from. Let's
log useful information like hostname, tw task etc.
Reviewed By: aslpavel
Differential Revision: D13597544
fbshipit-source-id: 88ad837b61f1dc3d0b2e295774848128a498d9d3
Summary: These config options weren't used at all. Let's delete them from the configs
Reviewed By: aslpavel
Differential Revision: D13597545
fbshipit-source-id: 5e99b38e2e9fc4ba6d836322ceba38a8b65ad2f4
Summary:
We have decided that this will be used to transport phases to the client
Hg client already supports this part.
Reviewed By: StanislavGlebik
Differential Revision: D13507921
fbshipit-source-id: 621e93bb6e1a0c87d4f4963ba7fa635b77a5b6ec
Summary:
See representation from Mercurial.
```
gboptsmap = {
"heads": "nodes",
"bookmarks": "boolean",
"common": "nodes",
"obsmarkers": "boolean",
"phases": "boolean",
"bundlecaps": "scsv",
"listkeys": "csv",
"cg": "boolean",
"cbattempted": "boolean",
}
```
Some logic might need to check what caps client supports. So convenient lookup is needed.
For example for phases, when we choose to transport phases via a separate bundle2 section called "phase-heads", we need to check that it is a supported on the client side.
Reviewed By: StanislavGlebik
Differential Revision: D13519888
fbshipit-source-id: 6471f2a5057cc3bb2dd72d9318a6f253a447b758
Summary:
D13166085 breaks Mononoke builds. We got errors
```
rustfmt may have failed to format. See previous 119 errors.
```
These errors happen on formatting thrift files. It looks like the problem is
in the fact that rustfmt for linting is different from rustfmt we are using
while building rust thrift files - https://fburl.com/hn0g95wt. But they seem to
use the same config files, which are incompatible.
For now revert the diff to unblock the builds. Also we have to revert D13584553 and D13175922
because it depends on D13166085.
Reviewed By: lukaspiatkowski
Differential Revision: D13589633
fbshipit-source-id: 78c68068ddcb4c594fd1463e98b48f8f438e46a2
Summary:
These calls make network requests which make our integration tests flaky, this
fix is a followup of D13580144
Reviewed By: StanislavGlebik
Differential Revision: D13580562
fbshipit-source-id: 110563c0360154a86cfc098a05240d7fd023f2c8
Summary:
Currently some tests are failing intermittently due to a timeout, this timeout
is caused by the integration tests making an external call to AclChecker which
is intermittently very slow.
For our integration tests we disable this call since it's not part of the test
suite to stop our tests from being flaky.
Reviewed By: StanislavGlebik
Differential Revision: D13580144
fbshipit-source-id: 0c26bb14dd222b888ca2638319071f4d99eab6df
Summary:
When receiving and infinitepush bundle, don't store the filenodes for the
commit in the filenodes table.
When a client pulls these commits, we will reconstruct the filenode info from
the blobstore data. However, they will receive null linknodes, and will need
to use adjustlinknode to compute the correct linknode.
Reviewed By: StanislavGlebik
Differential Revision: D13467110
fbshipit-source-id: 739b06f30a530a159352ffbf612d136c9c831aeb
Summary:
For draft commits we will stop storing the filenodeinfo for filenodes
introduced by that commit in the database. This means the filenodeinfo lookup
may fail. For these cases, reconstruct the filenodeinfo from the blob in the
blobstore, setting the missing linknode to the null changeset id.
Reviewed By: StanislavGlebik
Differential Revision: D13467112
fbshipit-source-id: 27ad406723a6affd80e7c3b2dc538b03004451ec
Summary:
Adds a mononoke integration test demonstrating the problem with linknodes and
commit cloud commits, where linknodes may refer to draft commits you don't have
locally, because the filenode was first created with a draft commit that was
pushed to commit cloud.
This results in Mercurial having to do expensive adjustlinkrev operations
on public commits.
Reviewed By: StanislavGlebik
Differential Revision: D13026613
fbshipit-source-id: c2b8e5369a1ba69a175a49b57a70c3e35f92567f
Summary:
Basically if any of the bookmarks is reachable, all other bookmarks are not
interesting to check, so those futures should be skipped.
Reviewed By: StanislavGlebik
Differential Revision: D13538511
fbshipit-source-id: 193a7ea8d505690aeb96247a07c8f2688cd7a59f
Summary:
D13494406 modified the Debug implementation for MPath, which broke the
integration tests.
Update them to fix this.
Reviewed By: rlangst
Differential Revision: D13527774
fbshipit-source-id: b86436b0fdd6653b0123e6da93a8da20e4ca65ba
Summary: Fix Debug formatting for MPath - no need to include the full hex name
Reviewed By: aslpavel
Differential Revision: D13494406
fbshipit-source-id: fc2b5e8f2737f3cb5ac0a804b4e9b69ffca49553
Summary:
All revsets should use bonsai changesets and not hg chnagesets.
This diff replaces usages of SingleNodeHash with SingleChangesetId.
It doesn't remove all of the usages, but it removes most of them
Reviewed By: aslpavel
Differential Revision: D13467116
fbshipit-source-id: 92c5b8f63f07e13af642a8cdb91fc77c46cdd595
Summary:
It's a test function, and passing additional parameter is annoying. Let's just
create mock context
Reviewed By: ikostia
Differential Revision: D13467118
fbshipit-source-id: fd27893d80f6b0ba59c2b7e5083d4ec7727a0e89
Summary: There's nothing Mercurial-specific about identifying a repo. This also outright removes some dependencies on mercurial-types.
Reviewed By: StanislavGlebik
Differential Revision: D13512616
fbshipit-source-id: 4496a93a8d4e56cd6ca319dfd8effc71e694ff3e
Summary:
Some params in getbundle requests were ignored in Mononoke
we are going to use "phases" param to check if we need provide phases or not
Mercurial uses 1/0:
```
elif keytype == "boolean":
value = "%i" % bool(value)
```
Reviewed By: aslpavel
Differential Revision: D13517508
fbshipit-source-id: b066b335d1b972e9845be9fa3862bbf4d11817cd
Summary:
Tests don't close the child process stdout. On newer versions of Python, this
can lead to ResourceWarnings when the test runner thread terminates.
Reviewed By: HarveyHunt
Differential Revision: D13517425
fbshipit-source-id: 6cedf4f39efe1299c41dbde784daf8c159309640
Summary:
Some of the escape sequences in run-tests.py are invalid. These cause
DeprecationWarnings on newer versions of Python.
In both cases, there are `\` characters that need to be escaped as `\\`.
Reviewed By: HarveyHunt
Differential Revision: D13517137
fbshipit-source-id: a899c3c28d55210f5972a515474a2fa69d051671
Summary: This method is needed by `MultplexedBlobstore` to disambiguate unassigned key from not synced one
Reviewed By: StanislavGlebik
Differential Revision: D13415231
fbshipit-source-id: 9918ca255b3ed3486660e303546a897622a42950
Summary:
As discussed RepoClient should own phases_hit. Initialize it correspondingly.
Some rustfmt is unrelated.
Reviewed By: lukaspiatkowski
Differential Revision: D13488572
fbshipit-source-id: 3d2c0169c06220bcd4b3f8845d6db7f357052e0a
Summary: the test we will use to check phases implementation
Reviewed By: lukaspiatkowski
Differential Revision: D13467516
fbshipit-source-id: 89760b6b965e8de8ad3e4dd7ff4cf6d3216597fd
Summary:
This diff fixes TODO. Previously there was a bookmark on every commit in the repo. This is not necessary
and make testing harder (in particular, testing phases). Let's clean it up
Reviewed By: HarveyHunt
Differential Revision: D13454832
fbshipit-source-id: c7d545841073d2030431ef4aed2307a55785f8db
Summary: We have the same commit a few lines above
Reviewed By: HarveyHunt
Differential Revision: D13457024
fbshipit-source-id: 5a3262abf7d39a34c858b2bbc6c0a9ba78afe181
Summary: PhantomData only used for test builds.
Reviewed By: StanislavGlebik
Differential Revision: D13460298
fbshipit-source-id: e712e468a4dacd6ddad3b6159c3020d49e87306f
Summary: No need to print the hex.
Reviewed By: StanislavGlebik
Differential Revision: D13457386
fbshipit-source-id: f6063b94e4f095d9ffed06b9de6e302b38e29334
Summary:
New HintPhases api that will be used for tests vs CachingHintPhases that will be used in prod.
The api will be owned by RepoClient.
We will check what type of BlobRepo we have (i.e. blob:rocks, blob:files, blob:remote etc) and build the phases depending on the type of the BlobRepo.
We will use either CachingHintPhases backed by real db / MyRouter or HintPhases backed by Sqlite.
Reviewed By: StanislavGlebik
Differential Revision: D13466225
fbshipit-source-id: 06ea565171d8ea8d7335fbbd91d86fbdcc01c8fc
Summary: Calculation is based on beeing ancestor of a public bookmark
Reviewed By: StanislavGlebik
Differential Revision: D13441622
fbshipit-source-id: e20df656847913bc124b491aaeb2660d21c85da1
Summary:
This diff includes the logic on how we will receive a phase for a given commit based on memcahe / db lookup and refresh, and slow path calculation.
It has a blank place of slow path (not found in the memcache, not found in the db => we have to calculate the phase based on being ancestor of public bookmark).
Collecting the stats should be added separately.
Reviewed By: StanislavGlebik
Differential Revision: D13415481
fbshipit-source-id: 6a4cb5b8dfbb0d7b2535d903c653bbf7a088c422
Summary:
mononoke_admin output was changed, so we have to change the parsing.
Also previously failure to fetch the bookmark would be silently ignored.
Instead let's log the failure to scuba.
Also fix "compact" logging to make sure it's output goes to stderr instead of stdout
Reviewed By: aslpavel
Differential Revision: D13464728
fbshipit-source-id: a36a9bd68c2fcb77617b2db0246c5d5ef359fc28
Summary:
Made changes to SetDifferenceNodeStream struct, and associated member functios.
Also ran :RustFmt on quickcheck.rs and setdifferencenodestream.rs
Reviewed By: StanislavGlebik
Differential Revision: D13448043
fbshipit-source-id: c38567ad8fb94d55b463b28abf4bd78987a9c68a
Summary: similar to get_bookmarks_maybe_stale but read from master db
Reviewed By: markbt
Differential Revision: D13417055
fbshipit-source-id: 805cbe3953a6c0a2380c0168eb403c6e9e0551c9
Summary:
We already had a few diffs that added or removed
```
Ignoring setSSLLockTypes after initialization
```
line.
I'm not sure why we have them, but we don't want to see them anyway, so disable
it via minloglevel glog option (level 2 means see only ERROR and FATAL).
Reviewed By: HarveyHunt
Differential Revision: D13416156
fbshipit-source-id: 362153385b77e133e404b21faa1735a9544fe13e
Summary:
Currently it creates too many commits and stress run times out. Besides it also
creates random filenames, so even if we find a failure we won't be able to
repro it.
Let's create just two commits instead of 200.
Reviewed By: HarveyHunt
Differential Revision: D13415238
fbshipit-source-id: 927bd69b55761e4dd4ea6e5f459df58a95918955
Summary:
As we no longer use a config repo, rename the argument
to --config_path.
Reviewed By: rlangst, StanislavGlebik
Differential Revision: D13415205
fbshipit-source-id: 8c7d335373c0ba33131d4476ee72fcd914097385
Summary:
Now that mononoke's config can be built using normal fbpkg tools,
we can remove the ability for mononoke_admin to build configuration.
Reviewed By: StanislavGlebik
Differential Revision: D13399189
fbshipit-source-id: 17aff327773b9c904916f99030a732a99aa34134
Summary: add/get api for adding phases to mysql phases table
Reviewed By: lukaspiatkowski
Differential Revision: D13376701
fbshipit-source-id: b71e52db2c30b59b0070f49327bfdd189c28d6cc