Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #25: Switch to Bincode2 #36

Merged
merged 38 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
685f522
Move some files around
tkaitchuck Dec 20, 2019
da97390
Move main method for controller
tkaitchuck Dec 20, 2019
0ac4546
Upgrade versions and orginize deps
tkaitchuck Dec 20, 2019
8b16a0e
Adapt tests/docs to new tokio version
tkaitchuck Dec 20, 2019
42a803d
Move controller-client into a its own crate
tkaitchuck Dec 21, 2019
6967b81
Fix docs examples
tkaitchuck Jan 6, 2020
3b243eb
Add comment
tkaitchuck Jan 6, 2020
e201118
formating
tkaitchuck Jan 6, 2020
8e2ddbc
save the change
Jan 7, 2020
b9f9f5d
develop serialize error
Jan 7, 2020
a8dd0b8
Merge branch 'master' of github.com:pravega/pravega-client-rust
tkaitchuck Jan 7, 2020
a5186db
finish serialize error handling
Jan 8, 2020
7cc11e5
add deserialize error handling
Jan 9, 2020
08a25fb
add deserialize error handling and fix fmt error
Jan 9, 2020
5954d01
change snafu description
Jan 9, 2020
7647885
Merge branch 'master' into issue-15-error-handling
Jan 9, 2020
1e8c0a5
fix conflict
Jan 9, 2020
d500acc
Add additional lints from clippy. (and fix some hilighted problems)
tkaitchuck Jan 9, 2020
916f210
Merge branch 'master' of github.com:pravega/pravega-client-rust into …
tkaitchuck Jan 9, 2020
867eb40
Merge branch 'master' into issue-15-error-handling
tkaitchuck Jan 10, 2020
6d75581
Avoid some clippy warnings
tkaitchuck Jan 10, 2020
3d99e4e
Avoid calling expect when not needed.
tkaitchuck Jan 10, 2020
d4a8302
Remove more unneeded error cases.
tkaitchuck Jan 10, 2020
b795313
More idomatic way to allocate an array of zeros.
tkaitchuck Jan 10, 2020
3890e3b
Create local variable
tkaitchuck Jan 10, 2020
6c9de97
Merge branch 'issue-15-error-handling' of github.com:pravega/pravega-…
tkaitchuck Jan 11, 2020
9fad598
Propigate errors properly
tkaitchuck Jan 11, 2020
eb29d50
Add some additional information for Cargo
tkaitchuck Jan 11, 2020
86c21a8
Enable clippy checks on our PRs
tkaitchuck Jan 11, 2020
2f77e87
Remove redundant licence declaration
tkaitchuck Jan 11, 2020
cf537d1
Disallow unsafe code
tkaitchuck Jan 11, 2020
efc8d6c
Merge branch 'master' into clippy
tkaitchuck Jan 18, 2020
796c126
Add output dir to gitignore
tkaitchuck Jan 20, 2020
f3d6085
Switch to bincode
tkaitchuck Jan 20, 2020
01dffeb
Use results in unit tests.
tkaitchuck Jan 20, 2020
76172bc
Remove JavaString and use Bincode2's custom length.
tkaitchuck Jan 20, 2020
b719c2e
Add backtraces to errors.
tkaitchuck Jan 20, 2020
54defa4
Merge branch 'master' into bincode2
tkaitchuck Jan 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
/controller-client/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ members = [
[dependencies]
async-stream = "0.1.2"
async-trait = "0.1.17"
bincode = "1.2"
bincode2 = "2.0.1"
byteorder = "1.3"
futures = "0.3"
lazy_static = "1.4.0"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_repr = "0.1"
snafu = "0.5.0"
snafu = "0.6.2"
tokio = { version = "0.2.8", features = ["full"] }

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion controller-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub use controller::{
scaling_policy::ScalingPolicyType, CreateScopeStatus, CreateStreamStatus, ScalingPolicy,
ScopeInfo, StreamConfig, StreamInfo,
};
use snafu::Snafu;
use snafu::{Backtrace, Snafu};
use tonic::transport::channel::Channel;
use tonic::{Code, Status};

Expand All @@ -36,12 +36,14 @@ pub enum ControllerError {
can_retry: bool,
operation: String,
error_msg: String,
backtrace: Backtrace,
},
#[snafu(display("Could not connect to controller {}", endpoint))]
ConnectionError {
can_retry: bool,
endpoint: String,
error_msg: String,
backtrace: Backtrace,
},
}

Expand Down
4 changes: 2 additions & 2 deletions controller-client/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn test_create_scope_error() {
};
let fut = create_scope(request, &mut client);

rt.block_on(fut);
rt.block_on(fut).unwrap();
}

#[test]
Expand All @@ -41,5 +41,5 @@ fn test_create_stream_error() {
};
let fut = create_stream(request, &mut client);

rt.block_on(fut);
rt.block_on(fut).unwrap();
}
Loading