Commit Graph

58404 Commits

Author SHA1 Message Date
Jun Wu
5344951764 tests: turn on mutation, disable obsstore for tests
Summary:
Incompatible tests are blacklisted.

The affects non-tests environment: `proxy-obsstore` is turned on.
That is in theory not very different from having an empty obsstore.
If it becomes an issue we can easily turn it off.

Reviewed By: sfilipco

Differential Revision: D21899139

fbshipit-source-id: e4a87ecced0542e7852b48b1a807775e523b3cc9
2020-06-10 19:30:01 -07:00
Jun Wu
74ff740a59 tests: migrate more tests to mutation
Summary: Those tests can be migrated with minor changes like rev number fixups.

Reviewed By: sfilipco

Differential Revision: D21913589

fbshipit-source-id: 0ee080ea9d70ded74c07ce6a93d309437b992bd6
2020-06-10 19:30:01 -07:00
Jun Wu
d388ab6674 test-amend: use mutation
Reviewed By: sfilipco

Differential Revision: D21899140

fbshipit-source-id: d1707ec91ee1802bda88a0b1c1be246dfc89ef97
2020-06-10 19:30:00 -07:00
Jun Wu
03a5255e56 test-drawdag: use modern setup
Summary: Some `x` commits become `o` because they don't have successors.

Reviewed By: sfilipco

Differential Revision: D21913601

fbshipit-source-id: 8d23edd4daa948433969460be9e6488865be7fb0
2020-06-10 19:30:00 -07:00
Jun Wu
4efd06e29b test-commit-revive: use modern configs
Reviewed By: sfilipco

Differential Revision: D21913593

fbshipit-source-id: fb83477fde8287da34e67c2e34c6269029d0469f
2020-06-10 19:30:00 -07:00
Jun Wu
41dd58675e tests: migrate some tests to use mutation
Summary:
Change `configure evolution` to `configure mutation-norecord`.
The tests pass without further modification.

Reviewed By: sfilipco

Differential Revision: D21913598

fbshipit-source-id: 93ac6ce21fb87482a388508f151520f4e6f0bd31
2020-06-10 19:29:59 -07:00
Jun Wu
19326b3489 run-tests: make output format friendly for adhoc scripts
Summary:
I found myself friendly editing the output of run-tests.py:

  Failed test-failure.t: output changed
  Failed test-failure-unicode.t: output changed

to extract file names:

  test-failure-unicode.t
  test-failure.t

Then use the file names as parameters to other commands, like `run-tests.py`
again, or `hg revert`, or `hg shelve`.

Change the output format to print the filenames directly to make it easier to
use.

Reviewed By: sfilipco

Differential Revision: D21913609

fbshipit-source-id: 4b1d2265f384ad9afbe478b7ff0d6e543eff00df
2020-06-10 19:29:59 -07:00
Jun Wu
812b9c546b contrib: remove obsstore related perf commands
Summary: This unblocks switching mutation on for test-contrib-perf.t

Reviewed By: sfilipco

Differential Revision: D21913605

fbshipit-source-id: 045e7ad7d71709e5f52171ab28b8da605fd2d540
2020-06-10 19:29:58 -07:00
Jun Wu
5140e6950b cleanobsstore: remove the extension
Summary: We're getting rid of obsstore. The extension is no longer needed.

Reviewed By: sfilipco

Differential Revision: D21899142

fbshipit-source-id: 6e4dd2b2ddfa9325c19d6d1d9951099748260904
2020-06-10 19:29:58 -07:00
Jun Wu
cb68b3c6a0 commitcloud: remove pullcreatemarkers feature
Summary:
The feature is off in production.

It calls the "scan changelog" code path in pullcreatemarkers.py, which
is also unused in production.

This allows us to remove a test that no longer passes with the mutation config.

Remove it.

Reviewed By: sfilipco

Differential Revision: D21913600

fbshipit-source-id: 23850fca2d1dc3d135d25954f00a08dc6d13972e
2020-06-10 19:29:58 -07:00
Jun Wu
38141700d8 test-fb-hgext-inhibit: remove the test
Summary:
The test uses `obsolete.revive`, which is no longer supported.
The alternative is to use unhide / undo which revives commits by changing
visibleheads directly.

Reviewed By: sfilipco

Differential Revision: D21913591

fbshipit-source-id: fea8c00692ba84c3a079012176970efb5aa29fae
2020-06-10 19:29:57 -07:00
Jun Wu
5fd229d2f1 test-obsolete-bounds-checking: remove the test
Summary: We're migrating off obsstore. The test is no longer relevant.

Reviewed By: sfilipco

Differential Revision: D21913592

fbshipit-source-id: 8a721a9eea19ad04027f014727cdf0e6fb9a6b60
2020-06-10 19:29:57 -07:00
Jun Wu
8a8e8a8948 test-histedit-obsolete: remove the test
Summary:
The test is mostly about obsmarkers and is not that valuable with mutation.
Delete it since we do have mutation + histedit test coverage.

Reviewed By: sfilipco

Differential Revision: D21913594

fbshipit-source-id: 8c785a698fcf7c0d9f947e961c66960c13ea1111
2020-06-10 19:29:57 -07:00
Jun Wu
530723b653 arcdiff: use core autopull API
Summary: This unblocks turning mutation on for test-commitcloud-lazypull-phab.t.

Reviewed By: sfilipco

Differential Revision: D21913590

fbshipit-source-id: 2580f2c054a3db753d40ea5aacdb8d2860e8cd3b
2020-06-10 19:29:56 -07:00
Jun Wu
f231cd0db3 unamend: use core autopull API
Summary: This unblocks turning on mutation for test-commitcloud-lazypull.t

Reviewed By: sfilipco

Differential Revision: D21913604

fbshipit-source-id: 5f52b179cea526f7260bf036323926b779da46f8
2020-06-10 19:29:56 -07:00
Jun Wu
842416e189 pullcreatemarkers: skip creating mutation entries less aggressively
Summary:
The old code only compares successors without checking predecessors, and skips
creating markers even if predecessors do not match.  Update it to also check
predecessors. This is needed to maintain the `x` commits in
test-fb-hgext-pull-createmarkers-hide-later.t when switched to use mutation.

Reviewed By: markbt

Differential Revision: D21913610

fbshipit-source-id: 1fec2f96544236dd675ceb8c1a399bcef6cd0ede
2020-06-10 19:29:56 -07:00
Jun Wu
7ed5a1ebfd test-bundle2-exchange: remove the test
Summary:
The test is coupled with legacy logic (obsmarker, phase exchange, over
ssh/http, bundle1, etc.), is flaky (6%-10% flaky score), and hard to maintain.
It provides little value since we probably want Thrift / Serde / HTTP protocols
instead of improving bundle2. Therefore remove it.

Reviewed By: sfilipco

Differential Revision: D21913603

fbshipit-source-id: 9d3d7410e60b67aadf816c917949772f991d2e65
2020-06-10 19:29:55 -07:00
Jun Wu
72881bf471 smartlog: remove obsolete templates
Summary:
They are no-op with mutation, which is enabled in production. Therefore remove
the template keywords and tests.

Reviewed By: sfilipco

Differential Revision: D21913602

fbshipit-source-id: 40ef3a915d591d6bcae2ca7931e388b5d5e00c25
2020-06-10 19:29:55 -07:00
Jun Wu
3c841e26c5 obsolete: ignore prune markers if visibility is on
Summary:
Pruned commits are handled by visibility. Ignore them when calculating
`obsolete()`.

This change makes transition to mutation smoother. The latter does not allow
obsoleting commits without successors.

Practically, this means some `x` commits will show as `o`s.

Reviewed By: sfilipco

Differential Revision: D21913596

fbshipit-source-id: 8a6495d040595ead1f6f08cf81e095e25cd8ff1f
2020-06-10 19:29:55 -07:00
Jun Wu
49c75cfa9d debugobsolete: stop printing obsmarkers
Summary: This makes transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913599

fbshipit-source-id: 74cc0b7f0608a952eded4a40291b56b291a221e5
2020-06-10 19:29:54 -07:00
Jun Wu
ff888f03a6 repair: remove "saved backup bundle to" message
Summary:
The code path printing that message is rarely used in production setup.  This
makes transition to mutation easier.

Reviewed By: sfilipco

Differential Revision: D21913595

fbshipit-source-id: 3aa22575c11e38dbb7d4c4cbc7aad8dde2e755ed
2020-06-10 19:29:54 -07:00
Jun Wu
9044ccc3da bundle2: remove 'n new obsolescence markers' message
Summary: This makes transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913608

fbshipit-source-id: b9ba470572ed68dff75104bba9dbb5c8622dcfb0
2020-06-10 19:29:54 -07:00
Jun Wu
9cd4491c02 transaction: remove summary callback
Summary:
The summary callback is only used to display "obsoleted n changesets".
Remove it to make transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913597

fbshipit-source-id: e47fa9df0033d1302ffc8dfa3b9885eb75861f4b
2020-06-10 19:29:53 -07:00
Jun Wu
45c6e5635e pushrebase: wrap mutationobsstore to get commit mapping
Summary: This is needed to enable mutation and disable the old obsstore in more places.

Reviewed By: sfilipco

Differential Revision: D21913607

fbshipit-source-id: 2e1ef1e7df58fb134d541f550b6fb90508b9289a
2020-06-10 19:29:53 -07:00
Jun Wu
2323f845c7 mutation: add a proxy obsstore implementation that writes to mutation
Summary:
This makes code relying on `repo.obsstore` work with the new mutation backend.
Namely, commands like `debugobsolete` will work in tests.

Reviewed By: sfilipco

Differential Revision: D21899149

fbshipit-source-id: b4906ededdc32cfd9c9b7efbf2c85600a0c4a8f4
2020-06-10 19:29:52 -07:00
Arun Kulshreshtha
7ef8f7bc9d edenapi_types: remove superfluous tests
Summary:
These particular unit tests essentially just verify that these types (which are trivial wrapper structs around `Vec`s) implement `IntoIterator`. As such, they don't really provide value (the `IntoIterator` implementations are trivial*) but require updates whenever the format of the items produced by the iterators changes. This adds a maintenance burden with little value to show for it, so let's just get rid of these.

*The only thing non-trivial is that for `HistoryResponse`, the iterator does convert the entries from `WireHistory` to `HistoryEntry`, but the actual logic of this conversion is tested separately in `api.rs`, so testing it here is redundant.

Reviewed By: quark-zju

Differential Revision: D21983471

fbshipit-source-id: beebad53abb9ce5801b1738af92f250405c50990
2020-06-10 19:29:52 -07:00
Zeyi (Rice) Fan
ab26fb2b83 fix eden rage on Windows
Summary:
This diff fixes `eden rage` command on Windows.

`eden doctor` and `eden redirect` related rage items are disabled as they are not implemented on Windows yet.

Reviewed By: chadaustin

Differential Revision: D21962673

fbshipit-source-id: 14399a89c26eead8fe5114e0a3764644ee86a1ed
2020-06-10 19:29:52 -07:00
svcscm
6f288126b7 Updating submodules
Summary:
GitHub commits:

2b01cd8487
a9c64947e3
fbe2d259cb
f7da303a12
7e72820713
763661d6df
def9bd8d4a

Reviewed By: jurajh-fb

fbshipit-source-id: 4587f1afb2d2b22f1e07fa7d64c345c3d187c33c
2020-06-10 19:29:51 -07:00
Chad Austin
a06da8f73c ensure that EdenError messages are always valid UTF-8
Summary:
Some Thrift clients require that values of type `string` must contain
valid UTF-8, and fail to decode otherwise. Ensure that EdenError's
message is always valid UTF-8.

Reviewed By: fanzeyi

Differential Revision: D21890761

fbshipit-source-id: 93b554e0bc6648c685f5fa54612576bd95d95ae5
2020-06-10 19:29:51 -07:00
Chad Austin
ab3b2be7bf add some utf-8 helper functions
Summary:
Add some functions for validating and producing valid UTF-8 to be used
in an upcoming diff.

Reviewed By: fanzeyi

Differential Revision: D21890510

fbshipit-source-id: b25144a34f1df91c72e8ed776b1ee7c1d68344c8
2020-06-10 19:29:51 -07:00
Jun Wu
33b497c035 remotefilelog: fix type of missingids
Summary: `getpack` requires list and will crash on set.

Reviewed By: xavierd

Differential Revision: D21968128

fbshipit-source-id: 75956f5adfcdb8082608e65f041007e58fc36c5c
2020-06-10 19:29:50 -07:00
Xavier Deguillard
4b8809c786 win: handle moving files in and out of the repo
Summary:
The documentation for PRJ_NOTIFICATION_FILE_RENAMED points out that the
filenames can be empty strings to represent files moved to and from the
repository itself. By not special casing this we were trying to create and/or
remove an empty file at the root of the repo which would lead to an overlay
corruption.

Reviewed By: genevievehelsel

Differential Revision: D21961579

fbshipit-source-id: fbfd872ca0377cb90224eba5505ff406812d51a7
2020-06-10 19:29:50 -07:00
Xavier Deguillard
e05de75a3f revlogindex: revert "do not use mmap to read .i on Windows"
Summary:
Reading the 00changelog.i entirely can be very expensive both in time and
memory. Since the 00changelog.i is now copied, then truncated and copied back
in place, we no longer have the limitation that prevents Windows from using
mmap for it, so let's do it.

Reviewed By: quark-zju

Differential Revision: D21968805

fbshipit-source-id: c0d19593e1f565c93b9243a63c87d03cfbc821d8
2020-06-10 19:29:50 -07:00
svcscm
1d4f72d8c8 Updating submodules
Summary:
GitHub commits:

331535f203
8d424c5404
9385c34221
eedd8e678d
d645862871
9fb396c554

Reviewed By: jurajh-fb

fbshipit-source-id: c766acaec4cdceb997e4ae05827527eab4bd439f
2020-06-10 19:29:49 -07:00
David Tolnay
5609aa9509 cargo_from_buck: Hide generated code from rustfmt
Differential Revision: D21966217

fbshipit-source-id: f540a2e233cc2645ae71df5134b1a810d4425053
2020-06-10 19:29:49 -07:00
Ailin Zhang
1b159d58b9 fix __isset deprecated problem
Summary: This diff fixes `'__isset' is deprecated` problem when building `//eden/fs/service:edenfs`

Reviewed By: simpkins

Differential Revision: D21966922

fbshipit-source-id: c3b12134f3f84db0a97f3975dae5d64a2c98641a
2020-06-10 19:29:49 -07:00
Aida Getoeva
81e7b76475 mononoke/apiserver: remove content sha1 cache
Summary: It was used by APIServer only, now when it's decomissioned we can delete this.

Reviewed By: HarveyHunt

Differential Revision: D21954670

fbshipit-source-id: a16bbbbb9dfe17eda5ff1ee6267251708ee4d562
2020-06-10 19:29:48 -07:00
Durham Goode
9473b487b5 tests: enable treemanifest for ~100 more tests
Summary:
Enables treemanifest for about 100 more tests. To make them pass I had
to expose the gettreepack capability from peers, which just works, and enable
treeonly and sendtrees by default in the tests, which I probably should've done
before anyway.

Reviewed By: quark-zju

Differential Revision: D21894955

fbshipit-source-id: 7a6a4d453824fb8c81a797a5487bf2ecc2b67761
2020-06-10 19:29:48 -07:00
Aida Getoeva
4776c29077 mononoke/fastlog: clean up ops module
Summary: This diff resolves TODO to make a helper function a crate private function as the only dependency (APIServer) is now gone.

Reviewed By: StanislavGlebik

Differential Revision: D21954238

fbshipit-source-id: 7cfc49534b7ab8af6035f7a87fdc763127dce318
2020-06-10 19:29:48 -07:00
Aida Getoeva
11c4601550 mononoke: remove apiserver source code
Summary:
APIServer is deprecated, tw jobs stopped and deleted.
This diffs removes the source code.

Reviewed By: krallin

Differential Revision: D21839442

fbshipit-source-id: 5a4089d9205d8b0061c8aa01dcd74674fe9baca8
2020-06-10 19:29:47 -07:00
svcscm
ddf450e9a7 Updating submodules
Summary:
GitHub commits:

de41f58aaa
aa1b6eb533
263f93f432
e7fcd11721
639938b925
77fb3bc40c

Reviewed By: jurajh-fb

fbshipit-source-id: 03db857a72e244e00ed3e591a5fccff2b96c8e55
2020-06-10 19:29:47 -07:00
Egor Tkachenko
d72c2b0b60 mononoke: opsfiles: Port deny_from_corp.sh hook
Summary: Ported deny_from_corp hook into mononoke.

Reviewed By: krallin

Differential Revision: D21329467

fbshipit-source-id: f5fa7a745b09a83b2624dd074155901f0bd31a55
2020-06-10 19:29:47 -07:00
svcscm
1f8cc4977d Updating submodules
Summary:
GitHub commits:

b767869eff
f3e4e9df4c
09357e1dd3
dc2ef325b5

Reviewed By: jurajh-fb

fbshipit-source-id: e23f736d7bf7af09d85b3a805754c855e319c762
2020-06-10 19:29:46 -07:00
svcscm
5d45a63cf3 Updating submodules
Summary:
GitHub commits:

0c4856b070
cb47018e71
3b500da5b4
367b2efbba
02db03af8d
ea6aa14363
dbda10691f
8e80fb3065
d9abd307c5
f4856eb824

Reviewed By: jurajh-fb

fbshipit-source-id: 7a86fbc7bc52e924aaf4b3af218abecbcdefa21b
2020-06-10 19:29:46 -07:00
Xavier Deguillard
edd44536ae transaction: copy files before truncation
Summary:
On Windows, if a file is memory mapped it cannot be truncated, unfortunately,
with the 00changelog.i being almost 500MB, this means that every time Mercurial
starts, the file needs to be read entirely. With the code being moved to Rust,
this read is done twice, resulting in a memory consumption of over 900MB.

Instead of always trying truncate the file in place, let's just try to truncate
it first, and then copy it, truncate it and then move it back in place. This
will allow us to memory map the 00changelog.i on Windows, which should
significantly reduce the memory consumption of Mercurial.

Reviewed By: DurhamG

Differential Revision: D21953553

fbshipit-source-id: e0f447fea017a34c8da8cdbbc6914cee7b5b2bee
2020-06-10 19:29:45 -07:00
Durham Goode
6f7b096d91 treemanifest: override root node during normal hg push
Summary:
We need to support pushing legacy flat manifets commits without push
rebase. Currently we rebuild the tree on the server and recompute it's hash,
which can result in a tree hash instead of a flat hash for the pushed commit.
Since we're provided with the correct hash via the push, we should just use that
directly.

Since the hash isn't validated, it opens some opportunities for receiving
incorrect data from the server, but we can disable this functionality at some
point, once all legacy repos have been merged in.  Then we can get rid of the
need for flat manifest hashes entirely once we switch to a new hash scheme.

Reviewed By: quark-zju

Differential Revision: D21962513

fbshipit-source-id: 8cdaf3a4e2aba73d5fc97fcb78821d2c88f5284f
2020-06-10 19:29:45 -07:00
Arun Kulshreshtha
9c689337cd edenapi_types: rename depth to length in history request
Summary: D21880220 renamed the `depth` parameter in Mononoke's history fetching functions to be `length`. This diff makes the same change for EdenAPI's `HistoryRequest` struct.

Reviewed By: StanislavGlebik

Differential Revision: D21948599

fbshipit-source-id: fe8649a5789f07d8262ad3d5e2f477a8b50f2c6f
2020-06-10 19:29:45 -07:00
Arun Kulshreshtha
898ddfe519 edenapi_server: add subtree endpoint
Summary:
Add a new `subtree` endpoint to the EdenAPI server, which fetches trees using the underlying server-side logic for the `gettreepack` wire protocol command. This is intended for use in situations where compatibility with `gettreepack` is desired when using HTTP for tree fetching.

The name of the endpoint is up for bikeshedding. It seemed weird to name the endpoint `gettreepack` since that name is a verb and refers to a "pack" which is not relevant in this context (there are no wirepacks or packfiles involved). I chose the name `subtree` since the endpoint logically returns all of the nodes underneath a given node in the tree (though in the most frequent case, the node will be the root node and therefore the subtree will be the entire tree).

In practice, this initial implementation is not ideal because it buffers the trees in memory, which is problematic because `gettreepack` requests are likely to produce a very large number of trees. Later in this stack, the endpoint will be updated to produce a streaming response instead.

Reviewed By: StanislavGlebik

Differential Revision: D21782764

fbshipit-source-id: 726925858352c33c923da1979da9d20fbcf930f6
2020-06-10 19:29:44 -07:00
Arun Kulshreshtha
cde0436ca9 edenapi_types: move EdenAPI types into separate crate
Summary:
Several of the structs used by EdenAPI were previously defined in Mercurial's
`types` crate. This is not ideal since these structs are used for data interchange
between the client and server, and changes to them can break Mononoke, Mercurial,
or both. As such, they are more fragile than other types and their use should be
limited to the EdenAPI server and client to avoid the need for extensive breaking
changes or costly refactors down the line.

I'm about to make a series of breaking changes to these types as part of the
migration to the new EdenAPI server, so this seemed like an ideal time to split
these types into their own crate.

Reviewed By: krallin

Differential Revision: D21857425

fbshipit-source-id: 82dedc4a2d597532e58072267d8a3368c3d5c9e7
2020-06-10 19:29:44 -07:00
Simon Farnsworth
335f5d6ebc Move sqlblob tests into a separate module.
Summary: There's over 150 lines of code here, or around 1/3rd of lib.rs. Move to a separate module, so that growth of tests won't make lib.rs too long

Reviewed By: ahornby

Differential Revision: D21952798

fbshipit-source-id: 4e4edf4fde5a6626e2c33c8ea30ec85e6f3c6bf1
2020-06-10 19:29:44 -07:00