Skip to content

Commit

Permalink
Upgrade dependencies. (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjoy committed Aug 14, 2022
1 parent b8a4a18 commit c64097d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 60 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
- fmt
- check-and-test
- doc
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

license-check:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -59,7 +59,7 @@ jobs:
config: .github/licenserc.yaml

fmt:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -76,11 +76,13 @@ jobs:
features:
- ""
- "--all-features"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler=3.6.1.3-2ubuntu5
- name: Install Rust toolchain
run: rustup toolchain install stable --component clippy
- name: Run check
Expand All @@ -91,11 +93,13 @@ jobs:
run: cargo test --workspace --release ${{ matrix.features }}

doc:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler=3.6.1.3-2ubuntu5
- name: Install Rust toolchain
run: rustup toolchain install stable
- name: Run docs
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ on:
- 'v*'
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler=3.6.1.3-2ubuntu5
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:

jobs:
e2e-rust:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
Expand Down
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ mock = [] # For internal integration testing only, do not use.
[dependencies]
async-stream = "0.3.3"
base64 = "0.13.0"
bytes = "1.1.0"
bytes = "1.2.1"
cfg-if = "1.0.0"
futures-core = "0.3.21"
futures-util = "0.3.21"
prost = "0.10.4"
prost-derive = "0.10.1"
serde = { version = "1.0.138", features = ["derive"] }
thiserror = "1.0.31"
tokio = { version = "1.18.2", features = ["parking_lot"] }
tonic = { version = "0.7.2", features = ["codegen"] }
tracing = "0.1.35"
uuid = { version = "1.1.0", features = ["serde", "v4"] }
prost = "0.11.0"
prost-derive = "0.11.0"
serde = { version = "1.0.143", features = ["derive"] }
thiserror = "1.0.32"
tokio = { version = "1.20.1", features = ["parking_lot"] }
tonic = { version = "0.8.0", features = ["codegen"] }
tracing = "0.1.36"
uuid = { version = "1.1.2", features = ["serde", "v4"] }

[build-dependencies]
tonic-build = "0.7.2"
tonic-build = "0.8.0"

[dev-dependencies]
tokio = { version = "1.18.2", features = ["rt-multi-thread", "signal"] }
tokio-stream = { version = "0.1.8", features = ["net"] }
tokio = { version = "1.20.1", features = ["rt-multi-thread", "signal"] }
tokio-stream = { version = "0.1.9", features = ["net"] }

[[test]]
name = "trace_context"
Expand Down
2 changes: 1 addition & 1 deletion e2e/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.
#
FROM rust:1.57
RUN apt-get update && apt-get install -y cmake
RUN apt-get update && apt-get install -y cmake protobuf-compiler=3.12.4-1
WORKDIR /build
COPY . /build/
RUN cargo build --release --workspace
Expand Down
11 changes: 9 additions & 2 deletions src/reporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
//

pub mod grpc;
pub mod once_cell;
pub mod print;

use crate::skywalking_proto::v3::{LogData, SegmentObject};
use serde::{Deserialize, Serialize};
use std::{ops::Deref, sync::Arc};
use tokio::sync::OnceCell;

#[derive(Debug)]
#[derive(Debug, Serialize, Deserialize)]
#[non_exhaustive]
pub enum CollectItem {
Trace(SegmentObject),
Expand Down Expand Up @@ -51,3 +52,9 @@ impl<T: Report> Report for Arc<T> {
Report::report(self.deref(), item)
}
}

impl<T: Report> Report for OnceCell<T> {
fn report(&self, item: CollectItem) {
Report::report(self.get().expect("OnceCell is empty"), item)
}
}
38 changes: 0 additions & 38 deletions src/reporter/once_cell.rs

This file was deleted.

0 comments on commit c64097d

Please sign in to comment.