Commit Graph

199 Commits

Author SHA1 Message Date
Simon Farnsworth
06009cf378 Add blobstore name information to logging
Summary:
With the upcoming rollout of C++ Manifold client, it's useful to know which blobstores are which in our Scuba log, `mononoke_blobstore_trace`.

Pass a debug name down to help

Reviewed By: krallin

Differential Revision: D26673162

fbshipit-source-id: e7c16ad217d8daf21565939a45ac82204459055a
2021-03-02 03:40:54 -08:00
David Tolnay
92f96c6555 Format fbsource with rustfmt-2.0.0-rc.2
Reviewed By: zertosh

Differential Revision: D26711985

fbshipit-source-id: 68e6482d041846bc0215b0984c03ef5fed043ebc
2021-02-27 18:46:09 -08:00
Lukas Piatkowski
f317302b0f autocargo v1: reformating of oss-dependencies, workspace and patch sections and thrift files to match v2
Summary:
For dependencies V2 puts "version" as the first attribute of dependency or just after "package" if present.
Workspace section is after patch section in V2 and since V2 autoformats patch section then the third-party/rust/Cargo.toml manual entries had to be formatted manually since V1 takes it as it is.
The thrift files are to have "generated by autocargo" and not only "generated" on their first line. This diff also removes some previously generated thrift files that have been incorrectly left when the corresponding Cargo.toml was removed.

Reviewed By: ikostia

Differential Revision: D26618363

fbshipit-source-id: c45d296074f5b0319bba975f3cb0240119729c92
2021-02-25 15:10:56 -08:00
Alex Hornby
aa8f84ad4c mononoke: async myrouter_ready()
Summary: Small clean up. Allows us to pass Logger by reference, removing the FIXME in blobrepo factory

Reviewed By: farnz

Differential Revision: D26551592

fbshipit-source-id: d6bb04b8bb3034ad056f071b67b5ae0ce3c6f224
2021-02-23 10:55:42 -08:00
Stefan Filip
89bb87ef20 segmented_changelog: add in process updating segmented changelog configuration
Summary:
Adding a new configuration that instantiates SegmentedChangelog by downloading
a dag from a prebuilt blob. It then updates in process.

Reviewed By: krallin

Differential Revision: D26508428

fbshipit-source-id: 09166a3c6de499d8813a29afafd4dfe19a19a2a5
2021-02-22 18:17:21 -08:00
Stefan Filip
b8c6580054 segmented_changelog: add ConcurrentMemIdMap
Summary:
The `MemIdMap` is not a valid `IdMap` implementation because it takes `&mut
self` when doing inserts. Wrapping the IdMap in a `RwLock` allows us to
implement the `IdMap` trait.

Reviewed By: krallin

Differential Revision: D26417643

fbshipit-source-id: cb5e3513841fa1dd7c8b8004ce7b2fe1467983d7
2021-02-22 18:17:21 -08:00
Thomas Orozco
097e4ad00c mononoke: remove tokio-compat (i.e. use tokio 0.2 exclusively)
Summary:
The earlier diffs in this stack have removed all our dependencies on the Tokio
0.1 runtime environment (so, basically, `tokio-executor` and `tokio-timer`), so
we don't need this anymore.

We do still have some deps on `tokio-io`, but this is just traits + helpers,
so this doesn't actually prevent us from removing the 0.1 runtime!

Note that we still have a few transitive dependencies on Tokio 0.1:

- async-unit uses tokio-compat
- hg depends on tokio-compat too, and we depend on it in tests

This isn't the end of the world though, we can live with that :)

Reviewed By: ahornby

Differential Revision: D26544410

fbshipit-source-id: 24789be2402c3f48220dcaad110e8246ef02ecd8
2021-02-22 09:22:42 -08:00
Alex Hornby
8ea6f3131f mononoke: async make_metadata_sql_factory
Summary: Remove some compat()

Reviewed By: farnz

Differential Revision: D26548790

fbshipit-source-id: 325a2f9b2411c4e99297d781ed5f58650bb07ba3
2021-02-22 00:21:13 -08:00
Lukas Piatkowski
cd0b6d50e2 autocargo v1: changes to match autocargo v2 generation results.
Summary:
The changes (and fixes) needed were:
- Ignore rules that are not rust_library or thrift_library (previously only ignore rust_bindgen_library, so that binary and test dependencies were incorrectly added to Cargo.toml)
- Thrift package name to match escaping logic of `tools/build_defs/fbcode_macros/build_defs/lib/thrift/rust.bzl`
- Rearrange some attributes, like features, authors, edition etc.
- Authors to use " instead of '
- Features to be sorted
- Sort all dependencies as one instead of grouping third party and fbcode dependencies together
- Manually format certain entries from third-party/rust/Cargo.toml, since V2 formats third party dependency entries and V1 just takes them as is.

Reviewed By: zertosh

Differential Revision: D26544150

fbshipit-source-id: 19d98985bd6c3ac901ad40cff38ee1ced547e8eb
2021-02-19 11:03:55 -08:00
Alex Hornby
5f01efbe75 mononoke: return shard count from MetadataSqlFactory::tier_name_shardable and rename it
Summary: Expose a way to get the shard count for a table.  Used later by walker to limit number of steps that try to access the same SQL shard.

Differential Revision: D26497839

fbshipit-source-id: 45ad09527b82a36a76068aace5fff5ef504b7a12
2021-02-19 07:55:43 -08:00
Thomas Orozco
737e98580e common/rust/shed/futures_ext: split FbFutureExt
Summary:
For streams we have `FbStreamExt` and `FbTryStreamExt`. Let's be a little
consistent and do the same with the future extension trait.

Reviewed By: StanislavGlebik

Differential Revision: D26485589

fbshipit-source-id: 5ebbda11d02e16709958a99a806aa70a8354672e
2021-02-19 07:00:49 -08:00
Alex Hornby
97a7a08637 mononoke: update MetadataSqlFactory methods to async
Summary: makes it a bit easier to work with

Reviewed By: farnz

Differential Revision: D26497840

fbshipit-source-id: bccd248aa9a4caa4e5274f7f9e166ef17196e12f
2021-02-18 08:11:47 -08:00
Alex Hornby
b7a245dad7 mononoke: remove Clone from CacheBlobstore inner
Summary: Noticed we can relax this constraint

Reviewed By: farnz

Differential Revision: D26490862

fbshipit-source-id: 59e9af6e2b8ebd433f9536e8c0ebec3f401e360e
2021-02-18 08:05:38 -08:00
Mateusz Kwapich
adba5b3e30 add BonsaiSvnrevMapping to blobrepo
Summary: now that we have the bonsai svn mapping let's thread it through blobrepo

Reviewed By: StanislavGlebik

Differential Revision: D26453409

fbshipit-source-id: 4100a9b16ffb3186735e20a766a1ef486d3c26c5
2021-02-17 12:43:00 -08:00
Egor Tkachenko
d1ced5c38d repo_commit: Limit parents check concurrency
Summary: There was unlimited `try_join_all` call during parents_check. With a big number of parents to check (i.e. `6fa5806aefccf8f6c5500d943ce214f1aaf170ce` in www) it may affect performance. In case of S3 blobstore it leads to huge increase of TCP connections. Let's limit it to 100 concurrent futures.

Reviewed By: krallin

Differential Revision: D26455123

fbshipit-source-id: 6d84831ea0de437527e1abd234a05ca4ba03c01d
2021-02-16 07:32:30 -08:00
Egor Tkachenko
0fdf60c6f6 Add scuba-dataset and fb303 to blobimport
Summary:
There are existing metrics within blobimport, but it is not exported. Also there is scuba logging during commit which we can use to monitor backup blobimport process for large repos, which cause some trouble.
In the next diff in the stack I'm updating tw spec to add thrift port.

Reviewed By: StanislavGlebik

Differential Revision: D26452381

fbshipit-source-id: f5f0056760673e323d4e327327479ca5c95ff15c
2021-02-15 16:30:57 -08:00
Lukas Piatkowski
87ddbe2f74 autocargo v1: update autocargo field format to allow transition to autocargo v2
Summary:
Autocargo V2 will use a more structured format for autocargo field
with the help of `cargo_toml` crate it will be easy to deserialize and handle
it.

Also the "include" field is apparently obsolete as it is used for cargo-publish (see https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields). From what I know this might be often wrong, especially if someone tries to publish a package from fbcode, then the private facebook folders might be shipped. Lets just not set it and in the new system one will be able to set it explicitly via autocargo parameter on a rule.

Reviewed By: ahornby

Differential Revision: D26339606

fbshipit-source-id: 510a01a4dd80b3efe58a14553b752009d516d651
2021-02-12 23:28:25 -08:00
Thomas Orozco
2a21e4fb17 third-party/rust: update Tokio to 0.2.25 + add a patch to disable coop scheduling
Summary:
See the patch & motivation here:

818f943db3

Reviewed By: StanislavGlebik

Differential Revision: D26399890

fbshipit-source-id: e184a3f6c1dd03cb4cdb7ea18073c3392d7ce355
2021-02-12 04:56:23 -08:00
Thomas Orozco
762ce0fe86 mononoke: redaction: set server data
Summary: Like it says in the title. This is useful.

Reviewed By: StanislavGlebik

Differential Revision: D26318916

fbshipit-source-id: 22160d1c9b01ace2e2e6e0cd2d41071465884325
2021-02-09 09:09:52 -08:00
Stefan Filip
0a308f9f84 update Cargo.toml after assert_matches update
Summary: cargo autocargo

Reviewed By: fanzeyi

Differential Revision: D26316542

fbshipit-source-id: f9e12a9d7b3b4e03a6f7b074ea2873ad6dcc82ad
2021-02-08 10:23:00 -08:00
Thomas Orozco
45fb30f125 mononoke: fix stall in blobrepo creation when instantiating Memcache
Summary:
You can't start Mononoke in mode/dev right now: the startup stalls because
creating Memcache takes ~15 seconds, and if it overlaps between acquiring a SQL
connection and dispatching a query (highly likely when instantiating repos),
you get a connection that sits unused for too long.

Reviewed By: farnz

Differential Revision: D26250069

fbshipit-source-id: fec67cd98895db0358e3f47a6e7d1d6b1cef61a1
2021-02-04 10:40:04 -08:00
Thomas Orozco
c88a08b9df mononoke: add futures_watchdog, a crate to help find stalls
Summary:
Like it says in the title. This adds a crate that provides a combinator that
lets us easily find stalls caused by futures that stay in `poll()` for too
long.

The goal is to make this minimal overhead for whoever is using it: all you need
is to import it + give it a logger. It automatically looks up the line where
it's called and gives it back to you in logs. This uses the `track_caller`
functionality to make this work.

Reviewed By: farnz

Differential Revision: D26250068

fbshipit-source-id: a1458e5adebac7eab6c2de458f679c7215147937
2021-02-04 10:40:04 -08:00
Alex Hornby
5e53c637a1 mononoke: fix warning in blobrepo factory
Summary: spotted this while building all of mononoke

Differential Revision: D26201077

fbshipit-source-id: 259534a84c09c21bd853ec19cf5f078adf37dbf7
2021-02-02 12:43:47 -08:00
Stefan Filip
549ba8cac3 segmented_changelog: setup caching at the application layer
Summary: Configure segmented changelog to use caching when caching is requested.

Reviewed By: krallin

Differential Revision: D26121496

fbshipit-source-id: d0711a5939b5178b3a93d081019cfab47996da40
2021-01-29 16:41:42 -08:00
Iván Yesid Castellanos
e58c8e819c Removed static lifetime constants
Summary: removed the static lifetime constants in mononoke code source base

Reviewed By: krallin

Differential Revision: D26123507

fbshipit-source-id: 9e1689c42603bd17d44924f92219378340ab082b
2021-01-29 04:40:27 -08:00
Stanislau Hlebik
21963bbc1b mononoke: make listkeyspatterns use warm bookmark cache
Summary:
krallin noticed that we aren't using warm bookmark cache anymore. Turned out
the reason was in the fact that client uses `listkeyspatterns` call to fetch
bookmarks and not `listkeys`. This diff makes `listkeyspatterns` use warm
bookmark cache as well.

Reviewed By: markbt

Differential Revision: D26124605

fbshipit-source-id: 637db8d66934cabc1793f9f615fefddd07c3af62
2021-01-29 00:20:14 -08:00
Daniel Xu
5715e58fce Add version specificiation to internal dependencies
Summary:
Lots of generated code in this diff. Only code change was in
`common/rust/cargo_from_buck/lib/cargo_generator.py`.

Path/git-only dependencies (ie `mydep = { path = "../foo/bar" }`) are not
publishable to crates.io. However, we are allowed to specify both a path/git
_and_ a version. When building locally, the path/git is chosen. When publishing,
the version on crates.io is chosen.

See https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations .

Note that I understand that not all autocargo projects are published on crates.io (yet).
The point of this diff is to allow projects to slowly start getting uploaded.
The end goal is autocargo generated `Cargo.toml`s that can be `cargo publish`ed
without further modification.

Reviewed By: lukaspiatkowski

Differential Revision: D26028982

fbshipit-source-id: f7b4c9d4f4dd004727202bd98ab10e201a21e88c
2021-01-25 22:10:24 -08:00
Thomas Orozco
4dd3461824 third-party/rust: update Tokio 0.2.x to 0.2.24 & futures 1.x to 1.30
Summary:
When we tried to update to Tokio 0.2.14, we hit lots of hangs. Those were due
to incompatibilities between Tokio 0.2.14 and Futures 1.29. We fixed some of
the bugs (and others had been fixed and were pending a release), and Futures
1.30 have now been released, which unblocks our update.

This diff updates Tokio accordingly (the previous diff in the stack fixes an
incompatibility).

The underlying motivation here is to ease the transition to Tokio 1.0.
Ultimately we'll be pulling in those changes one or way or another, so let's
get started on this incremental first step.

Reviewed By: farnz

Differential Revision: D25952428

fbshipit-source-id: b753195a1ffb404e0b0975eb7002d6d67ba100c2
2021-01-25 08:06:55 -08:00
Ilia Medianikov
7370db0552 Make it possible to filter bookmark log entries by timestamp
Summary:
Add `start-time` and `end-time` arguments to `mononoke_admin bookmarks log` command.

Example: `mononoke_admin bookmarks log master --start-time 2h --end-time 1h` to log entries that are from 2 to 1 hour old.

Reviewed By: StanislavGlebik

Differential Revision: D26001141

fbshipit-source-id: 1ad2f9347a4414800ee4830961df188b447a673a
2021-01-25 05:26:13 -08:00
Radu Szasz
5fb5d23ec8 Make tokio-0.2 include test-util feature
Summary:
This feature is useful for testing time-dependent stuff (e.g. it
allows you to stop/forward time). It's already included in the buck build.

Reviewed By: SkyterX

Differential Revision: D25946732

fbshipit-source-id: 5e7b69967a45e6deaddaac34ba78b42d2f2ad90e
2021-01-18 10:38:08 -08:00
Evgenii Kazakov
b873f821ca mononoke/cmds/admin: Add entry_id to admin bookmark log
Summary:
Output of BookmarkUpdateLog.list_bookmark_log_entries method in eden/mononoke/blobrepo/src/repo.rs was extended with bundle_id.

This allows to improve bookmark logs in admin tool: now it prints bundle_id as a first column:

```
I0114 16:53:00.592448 413912 [main] eden/mononoke/cmdlib/src/args/mod.rs:1477] using repo "instagram-server_test" repoid RepositoryId(502)
12637312 (master) 296a8f7c7ac785eeb2437d4676aeb3fbf6e690b1 pushrebase Nov 27 09:06:23 2020
12637526 (master) 4be9b55e41af535128e53eb04fedc830522799f6 pushrebase Nov 27 09:43:10 2020
12637462 (master) ffff84c16fcc81ee5d3eb6ea037c58f2c0f7ac04 pushrebase Nov 27 09:32:14 2020
12637540 (master) 7859f7b8beefab7fb44f771fa733694e6b8fa2d4 pushrebase Nov 27 09:44:59 2020
10095754 (master) dcf7c54125b29a0d4ea404f6c056c9ccb0d27666 pushrebase Sep 10 17:41:48 2020
12637464 (master) 747f205265ca52d2fc98fbba82c18ca17b4dd02e pushrebase Nov 27 09:32:36 2020
12637527 (master) b1a1500888f4d49ad1bc29be84c285eddd26b1ce pushrebase Nov 27 09:43:25 2020
12637520 (master) 440863d2b0a43cd039e26442e9c5786a6d933b21 pushrebase Nov 27 09:42:15 2020
12637522 (master) 2349c7c21b40b06547085f2a76ddef55a1ab4379 pushrebase Nov 27 09:42:38 2020
12637466 (master) 5c607e8575b2e6488b09b1580ff614d67ab1c723 pushrebase Nov 27 09:32:51 2020
```

Reviewed By: ikostia

Differential Revision: D25918315

fbshipit-source-id: 22955e6b839a93e3e3c5b53ee73486f599cf5bda
2021-01-15 14:38:28 -08:00
Simon Farnsworth
b4a234bbe5 convert changesets to new type futures
Summary: Convert `Changsets` trait and all its uses to new type futures

Reviewed By: krallin

Differential Revision: D25638875

fbshipit-source-id: 947423e2ee47a463861678b146641bcc6b899a4a
2021-01-06 07:11:36 -08:00
Alex Hornby
45d9b20949 mononoke: simplify open_blobrepo_given_datasources parameters
Summary: Simplify open_blobrepo_given_datasources  parameters to pass less arguments, make it so can pass the sql_factory by reference.

Reviewed By: krallin

Differential Revision: D25524254

fbshipit-source-id: c324127f42c53a52f388d303e310014f4fa0d7bb
2020-12-23 02:08:22 -08:00
Aida Getoeva
e9f3284b5b mononoke/mysql: make mysql options not copyable
Summary:
In the next diff I'm going to add Mysql connection object to `MysqlOptions` in order to pass it down from `MononokeAppData` to the code that works with sql.
This change will make MysqlOptions un-copyable.

This diff fixed all issues produced by the change.

Reviewed By: ahornby

Differential Revision: D25590772

fbshipit-source-id: 440ae5cba3d49ee6ccd2ff39a93829bcd14bb3f1
2020-12-17 15:46:30 -08:00
Thomas Orozco
db4c8fa924 mononoke/bonsai_hg_mapping: get rid of futures 0.1
Summary:
Like it says in the title. This is nice to do because we had old futures
wrapping new futures here, so this lets us get rid of a lot of cruft.

Reviewed By: ahornby

Differential Revision: D25502648

fbshipit-source-id: a34973b32880d859b25dcb6dc455c42eec4c2f94
2020-12-17 14:30:57 -08:00
Pavel Aslanov
ade7d57425 convert blobrepo tests to new type futures
Summary: convert blobrepo tests to new type futures

Reviewed By: StanislavGlebik

Differential Revision: D25589260

fbshipit-source-id: 49a49dac6ad98b52a7800010cd08f30e4853c44f
2020-12-17 07:45:26 -08:00
Pavel Aslanov
0fc5c3aca7 convert BlobRepoHg to new type futures
Summary: Convert all BlobRepoHg methods to new type futures

Reviewed By: StanislavGlebik

Differential Revision: D25471540

fbshipit-source-id: c8e99509d39d0e081d082097cbd9dbfca431637e
2020-12-17 07:45:26 -08:00
Thomas Orozco
6c6d7705be mononoke: actually check that we have all the content in client uploads
Summary:
Right now, when we upload a hg commit, we check that we have all the content
the client is referencing.

The only problem is we do this by checking that the filenodes the client
mentions exist, but the way we store filenodes right now is we write them
concurrently with content blobs, so it is in fact possible to have a filenode
that references a piece of content that doesn't actually exist.

That isn't quite what one might call satisfactory when it comes to checking the
content does in fact exist, so this diff updates our content checking

In practice, with the way Mononoke works right now this should be quite free:
the client uploads everything all the time, and then we check later, so this
will just hit in the blobstore cache.

In a future world where clients don't upload stuff they already know we have,
that could be slower, but doing it the way is we do it before is simply not
correct, so that's not much better. The ways to make it faster would be:

- Trust that we'll hit in cache when checking for presence (could work out).
- Have the client prove to us that we have this content, and thread it through.

To do the latter, IMO the code here could actually look at the entries that
were actually uploaded, and not check them for presence again, but right now we
have a few layers of indirection that make this a bit tricky (technically, when
`process_one_entry` gets called, that means "I uploaded this", but nothing in
the signature of any of the functions involved really enforces that).

Reviewed By: StanislavGlebik

Differential Revision: D25422596

fbshipit-source-id: 3cf34d38bd6ed1cd83d93c778f04395c942b26c0
2020-12-16 07:29:00 -08:00
Mark Juggurnauth-Thomas
73cdac45e3 derived_data: use new derived data configuration format
Summary:
Change derived data config to have "enabled" config and "backfilling" config.

The `Mapping` object has the responsibility of encapsulating the configuration options
for the derived data type.  Since it is only possible to obtain a `Mapping` from
appropriate configuration, ownership of a `Mapping` means derivation is permitted,
and so the `DeriveMode` enum is removed.

Most callers will use `BonsaiDerived::derive`, or a default `derived_data_utils` implementation
that requires the derived data to be enabled and configured on the repo.

Backfillers can additionally use `derived_data_utils_for_backfill` which will use the
`backfilling` configuration in preference to the default configuration.

Reviewed By: ahornby

Differential Revision: D25246317

fbshipit-source-id: 352fe6509572409bc3338dd43d157f34c73b9eac
2020-12-14 09:24:58 -08:00
Mark Juggurnauth-Thomas
9e1b1448e6 derived_data: split BonsaiDerived trait
Summary:
The `BonsaiDerived` trait is split in two:

* The new `BonsaiDerivable` trait encapsulates the process of deriving the data, either
  a single item from its parents, or a batch.
* The `BonsaiDerived` trait is used only as an entry point for deriving with the default
  mapping and config.

This split will allow us to use `BonsaiDerivable` in batch backfilling with non-default
config, for example when backfilling a new version of a derived data type.

Reviewed By: krallin

Differential Revision: D25371964

fbshipit-source-id: 5874836bc06c18db306ada947a690658bf89723c
2020-12-14 09:24:57 -08:00
Pavel Aslanov
32585287f1 convert changeset creation to new type futures
Summary: Convert changeset creation to new type futures

Reviewed By: krallin

Differential Revision: D25430405

fbshipit-source-id: 64eb6dbc324846408e60c77e273c5d5edfd59318
2020-12-11 13:55:46 -08:00
Stefan Filip
e7be876b6f blobrepo: update factory to set SegmentedChagelog on the production setup
Summary:
Same as development branch. Without configuration changes, nothing changes for
the production codepath.

Reviewed By: quark-zju

Differential Revision: D25405026

fbshipit-source-id: aff705aa5f96814f1f1d7552454ab1d0c13afd92
2020-12-08 18:30:25 -08:00
Lukas Piatkowski
00fe313eff mononoke/unbundle: get rid of futures 0.1
Summary: Also added a TryShared future to futures_ext. The problem with regular Shared is that if you want to share anyhow::Result the Error part of it is not cloneable. This TryShared will work nicely when returning anyhow::Result, which most of our code does.

Reviewed By: aslpavel

Differential Revision: D25223317

fbshipit-source-id: cf21141701884317a87dc726478dcd7a5a820c73
2020-12-07 20:41:26 -08:00
Thomas Orozco
16bac45a07 mononoke/bonsai_globalrev_mapping: set perf counters
Summary:
Like it says in the title. This is helpful to measure the number of SQL queries
we make. This required actually threading in a CoreContext, which we didn't
have before.

Reviewed By: StanislavGlebik

Differential Revision: D25336069

fbshipit-source-id: 35677c55550e95b5126de29c2a824b4eda32092c
2020-12-07 08:23:19 -08:00
Thomas Orozco
482ab2d2a6 eden/mononoke: allow turning on the bonsai / globalrev cache
Summary: Like it says in the title.

Reviewed By: StanislavGlebik

Differential Revision: D25336068

fbshipit-source-id: 113050215c28a28c820d938348a0a3e54c14c3ee
2020-12-07 08:23:19 -08:00
Thomas Orozco
1ec5537e9e mononoke/bonsai_globalrev_mapping: update to futures 0.3
Summary: Like it says in the title.

Reviewed By: StanislavGlebik

Differential Revision: D25333450

fbshipit-source-id: 49ad4b1964a4dfd9f3e0108fa421d451ef905256
2020-12-07 08:23:18 -08:00
Pavel Aslanov
70bfc4abd0 convret to new type futures
Summary: convert blobrepo:blobrepo_common to new type futures

Reviewed By: StanislavGlebik

Differential Revision: D25245426

fbshipit-source-id: d3db0e417545b2b0043e48a536737586005ac4bb
2020-12-03 07:15:04 -08:00
Thomas Orozco
15d3670d72 mononoke: UploadHgFileEntry: allow calling it without a path
Summary:
I'd like to experiment with splitting this into its own service. To do that, I
don't want to have to include a path, since it's only used for reporting an
error that will never occur (because for that service I'll be using the
"generate" variant of the filenode id). Let's just make it optional.

Reviewed By: lukaspiatkowski

Differential Revision: D25220901

fbshipit-source-id: 6d3cf70a63b077de18a7d43f3b65766b453c425e
2020-12-03 06:19:31 -08:00
Thomas Orozco
5765030c7e mononoke: asyncify UploadHgFileEntry
Summary: Like it says in the title. Let's turn this into an async fn.

Reviewed By: lukaspiatkowski

Differential Revision: D25220902

fbshipit-source-id: b5de783adaca05919eb5cd6858c8b0aaf03ddfc2
2020-12-03 06:19:31 -08:00
Thomas Orozco
bf4dc18009 mononoke: UploadHgFileEntry::upload: just return a plain future
Summary:
This returns a Result of a tuple, but:

- This never errs.
- Nothing ever reads the left side of the tuple.

So let's stop doing that.

Reviewed By: StanislavGlebik

Differential Revision: D25219887

fbshipit-source-id: f33dcf6f6e68cb17b40c4638470312afae0662e6
2020-12-03 06:19:31 -08:00