Skip to content

Commit

Permalink
chore(common): fix deny. (open-telemetry#919)
Browse files Browse the repository at this point in the history
* chore(common): fix deny.

Most of the warnings from deny are unmaintained/deprecated create which we depend on indirectly either in dev or build

I don't believe there are any action item for us to fix them.

Also split the doc as separate task in CI. It's confusing to fail the coverage because of the doc failures

* set log level of cargo deny to error

* remove unnecessary entry in deny.toml

* chore: generate proto files

* address comments

* try to fix unsoundness and manually ignore them one by one if needed

* fix(sdk): ignore error if the channel has already shutdown
  • Loading branch information
TommyCpp authored Dec 3, 2022
1 parent 3820284 commit 44b9020
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 15 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ jobs:
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
docs:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: arduino/setup-protoc@v1
- name: doc
run: cargo doc --no-deps --all-features
env:
CARGO_INCREMENTAL: '0'
RUSTDOCFLAGS: -Dwarnings
coverage:
continue-on-error: true
runs-on: ubuntu-latest
Expand All @@ -99,12 +115,6 @@ jobs:
toolchain: nightly
components: rustfmt
override: true
- uses: arduino/setup-protoc@v1
- name: doc
run: cargo doc --no-deps --all-features
env:
CARGO_INCREMENTAL: '0'
RUSTDOCFLAGS: -Dwarnings
- uses: actions-rs/cargo@v1
with:
command: test
Expand Down
14 changes: 9 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ exclude=[
"actix-http",
"actix-http-tracing",
"actix-udp",
"actix-udp-example"
"actix-udp-example",
"tracing-grpc",
"http"
]

[licenses]
Expand All @@ -28,7 +30,9 @@ license-files = [

[advisories]
ignore = [
# time/chrono problems, have not been a problem in practice, not much we can do at this moment.
"RUSTSEC-2020-0071",
"RUSTSEC-2020-0159"
]
# unsoundness in indirect dependencies without a safe upgrade below
"RUSTSEC-2021-0145",
"RUSTSEC-2019-0036"
]
unmaintained = "allow"
yanked = "allow"
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub mod logs_service_client {
pub mod logs_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
///Generated trait containing gRPC methods that should be implemented for use with LogsServiceServer.
/// Generated trait containing gRPC methods that should be implemented for use with LogsServiceServer.
#[async_trait]
pub trait LogsService: Send + Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub mod metrics_service_client {
pub mod metrics_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
///Generated trait containing gRPC methods that should be implemented for use with MetricsServiceServer.
/// Generated trait containing gRPC methods that should be implemented for use with MetricsServiceServer.
#[async_trait]
pub trait MetricsService: Send + Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub mod trace_service_client {
pub mod trace_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
///Generated trait containing gRPC methods that should be implemented for use with TraceServiceServer.
/// Generated trait containing gRPC methods that should be implemented for use with TraceServiceServer.
#[async_trait]
pub trait TraceService: Send + Sync + 'static {
/// For performance reasons, it is recommended to keep this RPC
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/testing/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl SpanExporter for TestSpanExporter {
}

fn shutdown(&mut self) {
self.tx_shutdown.send(()).unwrap();
let _ = self.tx_shutdown.send(()); // ignore error
}
}

Expand Down

0 comments on commit 44b9020

Please sign in to comment.