Commit Graph

10 Commits

Author SHA1 Message Date
Pulkit Goyal
fc880f518b Add Cargo.toml files to crates. (#7)
Summary:
This is a series of patches which adds Cargo.toml files to all the crates and tries to build them. There is individual patch for each crate which tells whether that crate build successfully right now using cargo or not, and if not, reason behind that.

Following are the reasons why the crates don't build:

  * failure_ext and netstring crates which are internal
  * error related to tokio_io, there might be an patched version of tokio_io internally
  * actix-web depends on httparse which uses nightly features

All the build is done using rustc version `rustc 1.27.0-dev`.
Pull Request resolved: https://github.com/facebookexperimental/mononoke/pull/7

Differential Revision: D8778746

Pulled By: jsgf

fbshipit-source-id: 927a7a20b1d5c9643869b26c0eab09e90048443e
2018-07-09 19:52:27 -07:00
Lukas Piatkowski
221d51465b hgcli/server: move session_uuid creation to hgcli and log more information
Summary:
hgcli will start logging stuff as well and it will use the same session_uuid as the server.
This also includes logging the user and source hostname.

Reviewed By: farnz

Differential Revision: D8750663

fbshipit-source-id: 7ebc8b6c10b7560d985fd23e9e3f2645f3bd0a1c
2018-07-09 15:39:09 -07:00
Lukas Piatkowski
567051928c sshrelay: move Stdio and SenderBytesWrite from mononoke server to sshrelay
Summary: those structures are sshrelay specific, move them there so it's easier to share them in future diffs

Reviewed By: farnz

Differential Revision: D8750666

fbshipit-source-id: b58596e63787d221a3970d5f1648e11d81949925
2018-07-09 15:39:08 -07:00
Stanislau Hlebik
1e8184e231 mononoke: fix sshrelay
Summary: put_slice panics if not enough space. This diff fixes it

Reviewed By: jsgf

Differential Revision: D7876156

fbshipit-source-id: b1e2cc520e5c598588df9a8090fb70efb413b381
2018-05-10 02:02:35 -07:00
Stanislau Hlebik
9756854215 mononoke: check Preamble reponame
Summary:
Curently hgcli can connect to Mononoke only if they are on the same host, because unix domain socket are used. Also Mononoke has to use separate unix domain socket for different repos.
The goal of this stack of diffs is to remove these limitations:
1 Make it possible to have hgcli and Mononoke server on different hosts
2 Make it possible to use one port/unix domain socket to connect to many repos.

Check that that reponame from Preamble is the same as Mononoke reponame, and raise an error if it isn't.

Reviewed By: jsgf

Differential Revision: D7845157

fbshipit-source-id: 6567d5417ce58c4fba0364108592eed5bf0223c1
2018-05-03 03:30:47 -07:00
Stanislau Hlebik
ce3719269f mononoke: add SshStream::Preamble
Summary:
Curently hgcli can connect to Mononoke only if they are on the same host,
because unix domain socket are used. Also Mononoke has to use separate unix
domain socket for different repos.
The goal of this stack of diffs is to remove these limitations:
1 Make it possible to have hgcli and Mononoke server on different hosts
2 Make it possible to use one port/unix domain socket to connect to many repos.

This diff adds a special message called Preamble. It will be the first message
sent by hgcli to Mononoke server. The most important information it contains is
reponame to tell Mononoke server what repo client it is interested in. Since
this is a crucial information, it is "required" i.e. Preamble will fail to
parse if reponame is not set. There can be other set in the `misc` field, for
example, user/host of a connecting user.

Currently Preamble is json encoded. We can change it in the future if we need
to.

Reviewed By: jsgf

Differential Revision: D7845158

fbshipit-source-id: 3cb98f0f7edcda8a0be2d5bfef1c7c4a18c8db6f
2018-05-03 03:30:47 -07:00
Stanislau Hlebik
0a15affb25 mononoke: small ssh_relay refactoring
Summary:
Curently hgcli can connect to Mononoke only if they are on the same host,
because unix domain socket are used. Also Mononoke has to use separate unix
domain socket for different repos.
The goal of this stack of diffs is to remove these limitations:
1 Make it possible to have hgcli and Mononoke server on different hosts
2 Make it possible to use one port/unix domain socket to connect to many repos.

This diff makes a small refactoring to make next diff smaller. There should be
no change in the functionality

Reviewed By: jsgf

Differential Revision: D7845155

fbshipit-source-id: 723a974e3e648b3e3200139aea27fc34691b8983
2018-05-03 03:30:47 -07:00
Stanislau Hlebik
f0dfa690b9 mononoke: make SshStream non-copyable and non-hashable
Summary:
Curently hgcli can connect to Mononoke only if they are on the same host,
because unix domain socket are used. Also Mononoke has to use separate unix
domain socket for different repos.
The goal of this stack of diffs is to remove these limitations:
1 Make it possible to have hgcli and Mononoke server on different hosts
2 Make it possible to use one port/unix domain socket to connect to many repos.

It's not required. And in the next diff we are going to add new SshStream
value, that will contain non-hashable and non-copyable struct in it.

Reviewed By: jsgf

Differential Revision: D7845160

fbshipit-source-id: 75bdd1706b1bd2f1b16a9e8c793c346a093bdd54
2018-05-03 03:30:47 -07:00
Stanislau Hlebik
0871d80126 mononoke: fix formatting
Reviewed By: jsgf

Differential Revision: D7845162

fbshipit-source-id: d097fb5cc540a9a9f9f29edc541f721f01c16c60
2018-05-02 13:03:33 -07:00
facebook-github-bot
2b6af6b941 Initial commit
fbshipit-source-id: f75baa4ff6aa71973f677b752d7aba582cf4927f
2017-07-27 18:00:19 -07:00