Skip to content

Commit

Permalink
Fix release error (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenqi Mou authored Mar 22, 2021
1 parent 6355497 commit e4f7beb
Show file tree
Hide file tree
Showing 33 changed files with 89 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Generate Pravega Python API documentation.
run: |
pip install maturin virtualenv pdoc3
pip install 'maturin==0.8.3' virtualenv pdoc3
virtualenv venv
source venv/bin/activate
maturin develop -m bindings/Cargo.toml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
java-version: '11' # The JDK version to make available on the path.
- name: Download and Run Pravega standalone
run: |
wget https://github.com/Tristan1900/pravega/releases/download/hostname/pravega-0.9.0-2711.b899fe6-SNAPSHOT.tgz
tar -xzvf pravega-0.9.0-2711.b899fe6-SNAPSHOT.tgz
pravega-0.9.0-2711.b899fe6-SNAPSHOT/bin/pravega-standalone > pravega.log 2>&1 &
wget https://github.com/pravega/pravega/releases/download/v0.9.0/pravega-0.9.0.tgz
tar -xzvf pravega-0.9.0.tgz
pravega-0.9.0/bin/pravega-standalone > pravega.log 2>&1 &
sleep 120 && echo "Started standalone"
- name: Set up Python
uses: actions/setup-python@v2
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "pravega-client"
# - Create git tag.
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "README.md"
documentation = "https://docs.rs/pravega-client/0.1.0/"
Expand Down Expand Up @@ -38,14 +38,14 @@ members = [
]

[dependencies]
pravega-client-shared = { path = "./shared"}
pravega-controller-client = { path = "./controller-client"}
pravega-wire-protocol = { path = "./wire_protocol"}
pravega-client-retry = {path = "./retry"}
pravega-connection-pool = {path = "connection_pool" }
pravega-client-channel = {path = "./channel"}
pravega-client-auth = {path = "./auth"}
pravega-client-config = {path = "./config"}
pravega-client-shared = { path = "./shared", version = "0.1"}
pravega-controller-client = { path = "./controller-client", version = "0.1"}
pravega-wire-protocol = { path = "./wire_protocol", version = "0.1"}
pravega-client-retry = {path = "./retry", version = "0.1"}
pravega-connection-pool = {path = "./connection_pool", version = "0.1" }
pravega-client-channel = {path = "./channel", version = "0.1"}
pravega-client-auth = {path = "./auth", version = "0.1"}
pravega-client-config = {path = "./config", version = "0.1"}
async-trait = "0.1"
futures = "0.3"
snafu = "0.6"
Expand Down
8 changes: 4 additions & 4 deletions auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-client-auth"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client for Pravega."
Expand All @@ -14,8 +14,8 @@ authors = ["Tom Kaitchuck <[email protected]>", "Wenqi Mou <wenqi.mou@dell.
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pravega-client-shared = { path = "../shared"}
pravega-controller-client = { path = "../controller-client"}
pravega-client-shared = { path = "../shared", version = "0.1"}
pravega-controller-client = { path = "../controller-client", version = "0.1"}
async-trait = "0.1"
tokio = { version = "1.1", features = ["full"] }
base64 = "0.12"
Expand Down
2 changes: 2 additions & 0 deletions auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Authentication and Authorization
Authentication and Authorization utilities for Pravega Rust client.
14 changes: 7 additions & 7 deletions bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "Pravega client"
Expand All @@ -31,12 +31,12 @@ python_binding = ["pyo3"]
tracing = "0.1.17"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.2"
pravega-client = { path = "../" }
pravega-wire-protocol = { path = "../wire_protocol"}
pravega-controller-client = { path = "../controller-client"}
pravega-client = { path = "../"}
pravega-client-shared = { path = "../shared"}
pravega-client-retry = {path = "../retry"}
pravega-connection-pool = {path= "../connection_pool" }
pravega-controller-client = { path = "../controller-client"}
pravega-wire-protocol = { path = "../wire_protocol"}
pravega-client-retry = {path = "../retry", version = "0.1"}
pravega-connection-pool = {path = "../connection_pool"}
pravega-client-config = {path = "../config"}
tokio = { version = "1.1", features = ["full"] }
lazy_static = "1.4.0"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-client-channel"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client for Pravega."
Expand Down
2 changes: 2 additions & 0 deletions channel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# channel
Provides a channel with back pressure.
5 changes: 5 additions & 0 deletions channel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ impl<T> ChannelSender<T> {
Ok(())
}

pub fn send_without_bp(&self, message: T) -> Result<(), SendError<(T, usize)>> {
self.sender.send((message, 0))?;
Ok(())
}

pub fn remain(&self) -> usize {
self.semaphore.permits()
}
Expand Down
10 changes: 5 additions & 5 deletions config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-client-config"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client for Pravega."
Expand All @@ -14,13 +14,13 @@ authors = ["Tom Kaitchuck <[email protected]>", "Wenqi Mou <wenqi.mou@dell.
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pravega-client-shared = { path = "../shared"}
pravega-client-retry = {path= "../retry"}
pravega-client-shared = { path = "../shared", version = "0.1"}
pravega-client-retry = {path = "../retry", version = "0.1"}
derive_builder = "0.9"
getset = "0.0.9"
serde_json = "1.0"
serde = "1.0"
reqwest = { version = "0.10", features = ["json"]}
reqwest = { version = "0.11", features = ["json"]}
base64 = "0.12"
tokio = "1.1"
async-trait = "0.1"
2 changes: 2 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# config
Config for the client.
2 changes: 1 addition & 1 deletion config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl ClientConfigBuilder {
}

fn default_timeout(&self) -> Duration {
Duration::from_secs(3600)
Duration::from_secs(30)
}
}

Expand Down
6 changes: 3 additions & 3 deletions connection_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-connection-pool"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "A connection pool used by the Pravega Rust client."
Expand All @@ -14,7 +14,7 @@ authors = ["Tom Kaitchuck <[email protected]>", "Wenqi Mou <wenqi.mou@dell.
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
pravega-client-shared = { path = "../shared"}
pravega-client-shared = { path = "../shared", version = "0.1"}
async-trait = "0.1"
uuid = {version = "0.8", features = ["v4"]}
snafu = "0.6"
Expand Down
2 changes: 2 additions & 0 deletions connection_pool/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# connection pool
A generic connection pool
15 changes: 7 additions & 8 deletions controller-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name = "pravega-controller-client"
version = "0.1.0"
edition = "2018"
build = "build.rs"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client for Pravega to talk to the Pravega controller."
authors = ["Tom Kaitchuck <[email protected]>", "Wenqi Mou <[email protected]>",
"Sandeep Shridhar <[email protected]>", "Wenxiao Zhang <[email protected]>"]

[dependencies]
pravega-client-shared = { path = "../shared"}
pravega-wire-protocol = { path = "../wire_protocol"}
pravega-connection-pool = {path= "../connection_pool" }
pravega-client-retry = {path = "../retry"}
pravega-client-config = { path = "../config"}
pravega-client-shared = { path = "../shared", version = "0.1"}
pravega-wire-protocol = { path = "../wire_protocol", version = "0.1"}
pravega-client-retry = {path = "../retry", version = "0.1"}
pravega-connection-pool = {path = "../connection_pool", version = "0.1" }
pravega-client-config = {path = "../config", version = "0.1"}
async-trait = "0.1"
prost = "0.7"
snafu = "0.6"
Expand All @@ -32,7 +32,6 @@ im = "15"
tracing = "0.1"
jsonwebtoken = "7"
serde = {version = "1.0", features = ["derive"] }
h2 = "0.2"

[build-dependencies]
tonic-build = "0.3"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion controller-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ mod test {

#[test]
fn test_controller_client() {
let mut rt = Runtime::new().unwrap();
let rt = Runtime::new().unwrap();
rt.spawn(run_server());

let config = ClientConfigBuilder::default()
Expand Down
8 changes: 4 additions & 4 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pravega-rust-client-examples"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
repository = "https://github.com/pravega/pravega-client-rust"
Expand All @@ -14,9 +14,9 @@ authors = ["Tom Kaitchuck <[email protected]>", "Wenqi Mou <wenqi.mou@dell.
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dev-dependencies]
pravega-client = { path = "../" }
pravega-client-config = { path = "../config"}
pravega-client-shared = { path = "../shared"}
pravega-client = { path = "../", version = "0.1"}
pravega-client-config = { path = "../config", version = "0.1"}
pravega-client-shared = { path = "../shared", version = "0.1"}
tokio = "1.1"

[[example]]
Expand Down
4 changes: 2 additions & 2 deletions integration_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pravega-client-integration-test"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
repository = "https://github.com/pravega/pravega-client-rust"
Expand Down Expand Up @@ -33,4 +33,4 @@ tracing = "0.1"
flate2 = "1.0"
tar = "0.4"
pkg-config = "0.3"
reqwest = {version = "0.10", features = ["blocking"]}
reqwest = {version = "0.11", features = ["blocking"]}
6 changes: 3 additions & 3 deletions integration_test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use tar::Archive;
use tracing::info;

const LIBRARY: &str = "pravega";
const VERSION: &str = "0.9.0-2711.b899fe6-SNAPSHOT";
const TAG: &str = "hostname";
const VERSION: &str = "0.9.0";
const TAG: &str = "v0.9.0";
const BASE: &str = "./";

fn main() {
Expand Down Expand Up @@ -47,7 +47,7 @@ fn remove_suffix(value: &mut String, suffix: &str) {
/// Downloads and unpacks a prebuilt binary. Only works for certain platforms.
fn install_prebuilt() {
let url = format!(
"https://github.com/Tristan1900/pravega/releases/download/{}/pravega-{}.tgz",
"https://github.com/pravega/pravega/releases/download/{}/pravega-{}.tgz",
TAG, VERSION
);
let short_file_name = url.split('/').last().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions integration_test/src/disconnection_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use tokio::runtime::Runtime;
use tracing::info;

pub fn disconnection_test_wrapper() {
let mut rt = tokio::runtime::Runtime::new().expect("create runtime");
let rt = tokio::runtime::Runtime::new().expect("create runtime");
rt.block_on(test_retry_with_no_connection());
rt.shutdown_timeout(Duration::from_millis(100));

Expand All @@ -48,7 +48,7 @@ pub fn disconnection_test_wrapper() {
pravega.stop().unwrap();
wait_for_standalone_with_timeout(false, 10);

let mut rt = tokio::runtime::Runtime::new().expect("create runtime");
let rt = tokio::runtime::Runtime::new().expect("create runtime");
rt.block_on(test_with_mock_server());
}

Expand Down
4 changes: 2 additions & 2 deletions retry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-client-retry"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client for Pravega."
Expand Down
2 changes: 2 additions & 0 deletions retry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Retry
Provides generic retry functions.
4 changes: 2 additions & 2 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "pravega-client-shared"
version = "0.1.0"
edition = "2018"
categories = ["Network programming"]
categories = ["network-programming"]
keywords = ["streaming", "client", "pravega"]
readme = "Readme.md"
readme = "README.md"
repository = "https://github.com/pravega/pravega-client-rust"
license = "Apache-2.0"
description = "An internal library used by the Rust client."
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/byte_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl Seek for ByteStreamReader {

impl Drop for ByteStreamWriter {
fn drop(&mut self) {
let _res = self.sender.send((Incoming::Close(), 0));
let _res = self.sender.send_without_bp(Incoming::Close());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/event_stream_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl EventStreamWriter {

impl Drop for EventStreamWriter {
fn drop(&mut self) {
let _res = self.sender.send((Incoming::Close(), 0));
let _res = self.sender.send_without_bp(Incoming::Close());
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/segment_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use std::sync::Arc;
use tokio::runtime::Handle;
use tokio::sync::oneshot::error::TryRecvError;
use tokio::sync::{oneshot, Mutex};
use tracing::warn;
use tracing::{debug, warn};

#[derive(Debug, Snafu)]
pub enum ReaderError {
Expand Down Expand Up @@ -226,12 +226,13 @@ impl AsyncSegmentReader for AsyncSegmentReaderImpl {
let endpoint = controller
.get_endpoint_for_segment(&self.segment)
.await
.expect("get endpoint for async semgnet reader");
.expect("get endpoint for async segment reader");
let mut guard = self.endpoint.lock().await;
*guard = endpoint;
if e.refresh_token() {
self.delegation_token_provider.signal_token_expiry();
}
debug!("retry due to {:?}", e);
RetryResult::Retry(e)
} else {
RetryResult::Fail(e)
Expand Down
Loading

0 comments on commit e4f7beb

Please sign in to comment.