Summary:
These tests constantly fail because people add new logging from C++. Overriding
XLOG is not that easy, so let's just grep for lines we are interested in.
Reviewed By: HarveyHunt
Differential Revision: D13650651
fbshipit-source-id: 419ad55b1087212debb7aaba652b49ba24763fc4
Summary:
After some discussion with Pavel Aslanov, Lukas Piatkowski and Stanislau Hlebik, it was evident that shared future is the best approach for the bookmarks cache.
The cache in this implementation maintains a shared future for each repo, fetching the full list of bookmarks. When a list of bookmarks with a given prefix is required, a filter is applied to a full list future.
Two locks are used in this implementation: one for adding new repos to the hashtable and one for updating the cache. In both cases the optimistic strategy: "let's first first grab a read lock and try checking if it is good enough" is applied.
Reviewed By: StanislavGlebik
Differential Revision: D13573105
fbshipit-source-id: 4e084bee13ff4941d1a42d1f75fe501575858a63
Summary:
Lazy way of filling the db may cause multiple mononoke hosts
writing the same phases data to the db, which is not good
Reviewed By: aslpavel
Differential Revision: D13598328
fbshipit-source-id: 9fc76adc71929cf37d8144844770f6a964173787
Summary: BlobRepo is cloneable and there is no reason to use Arc<BlobRepo>
Reviewed By: StanislavGlebik
Differential Revision: D13607918
fbshipit-source-id: 454778cb02ada87082de78e0d29ebf49e1b38d56
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