Skip to content

Commit f203b03

Browse files
lalitbTommyCpp
andauthored
Replace unmaintained actions-rs/toolchain action. (#1655)
Co-authored-by: Zhongyang Wu <[email protected]>
1 parent d5392dc commit f203b03

File tree

24 files changed

+24
-103
lines changed

24 files changed

+24
-103
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
- uses: actions/checkout@v4
2525
with:
2626
submodules: true
27-
- uses: actions-rs/toolchain@v1
27+
- uses: dtolnay/rust-toolchain@master
2828
with:
2929
toolchain: ${{ matrix.rust }}
3030
components: rustfmt
31-
profile: minimal
31+
- name: "Set rustup profile"
32+
run: rustup set profile minimal
3233
- uses: arduino/setup-protoc@v3
3334
- name: Test
3435
run: ./scripts/test.sh
@@ -38,11 +39,9 @@ jobs:
3839
- uses: actions/checkout@v4
3940
with:
4041
submodules: true
41-
- uses: actions-rs/toolchain@v1
42+
- uses: dtolnay/rust-toolchain@stable
4243
with:
43-
toolchain: stable
4444
components: rustfmt
45-
profile: minimal
4645
- uses: arduino/setup-protoc@v3
4746
- uses: actions-rs/cargo@v1
4847
with:
@@ -57,11 +56,9 @@ jobs:
5756
runs-on: ubuntu-latest
5857
steps:
5958
- uses: actions/checkout@v4
60-
- uses: actions-rs/toolchain@v1
59+
- uses: dtolnay/rust-toolchain@nightly
6160
with:
62-
toolchain: nightly-2024-02-07
6361
components: rustfmt
64-
override: true
6562
- name: external-type-check
6663
run: |
6764
cargo install cargo-check-external-types
@@ -76,11 +73,9 @@ jobs:
7673
- uses: actions/checkout@v4
7774
with:
7875
submodules: true
79-
- uses: actions-rs/toolchain@v1
76+
- uses: dtolnay/rust-toolchain@stable
8077
with:
81-
toolchain: stable
8278
components: rustfmt
83-
profile: minimal
8479
- uses: arduino/setup-protoc@v3
8580
- name: Build
8681
run: |
@@ -92,11 +87,7 @@ jobs:
9287
- uses: actions/checkout@v4
9388
with:
9489
submodules: true
95-
- uses: actions-rs/toolchain@v1
96-
with:
97-
profile: minimal
98-
toolchain: 1.65.0
99-
override: true
90+
- uses: dtolnay/[email protected]
10091
- name: Patch dependencies versions # some dependencies bump MSRV without major version bump
10192
run: ./scripts/patch_dependencies.sh
10293
- name: Run tests
@@ -117,11 +108,9 @@ jobs:
117108
runs-on: ubuntu-latest
118109
steps:
119110
- uses: actions/checkout@v4
120-
- uses: actions-rs/toolchain@v1
111+
- uses: dtolnay/rust-toolchain@nightly
121112
with:
122-
toolchain: nightly
123113
components: rustfmt
124-
override: true
125114
- uses: arduino/setup-protoc@v3
126115
- name: doc
127116
run: cargo doc --no-deps --all-features
@@ -136,11 +125,10 @@ jobs:
136125
- uses: actions/checkout@v4
137126
with:
138127
submodules: true
139-
- uses: actions-rs/toolchain@v1
128+
- uses: dtolnay/rust-toolchain@stable
140129
with:
141130
toolchain: stable
142131
components: rustfmt,llvm-tools-preview
143-
override: true
144132
- uses: arduino/setup-protoc@v3
145133
- name: cargo install cargo-llvm-cov
146134
uses: taiki-e/install-action@cargo-llvm-cov

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
submodules: true
23-
- uses: actions-rs/toolchain@v1
23+
- uses: dtolnay/rust-toolchain@stable
2424
with:
25-
toolchain: stable
2625
components: rustfmt
27-
profile: minimal
2826
- uses: arduino/setup-protoc@v3
2927
- name: Run integration tests using docker compose
3028
run: ./scripts/integration_tests.sh

opentelemetry-http/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ pub trait HttpClient: Debug + Send + Sync {
6767
#[cfg(feature = "reqwest")]
6868
mod reqwest {
6969
use super::{async_trait, Bytes, HttpClient, HttpError, Request, Response};
70-
use std::convert::TryInto;
7170

7271
#[async_trait]
7372
impl HttpClient for reqwest::Client {

opentelemetry-jaeger-propagator/src/propagator.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,7 @@ impl TextMapPropagator for Propagator {
214214
#[cfg(test)]
215215
mod tests {
216216
use super::*;
217-
use opentelemetry::{
218-
propagation::{Injector, TextMapPropagator},
219-
testing::trace::TestSpan,
220-
trace::{SpanContext, SpanId, TraceContextExt, TraceFlags, TraceId, TraceState},
221-
Context,
222-
};
217+
use opentelemetry::testing::trace::TestSpan;
223218
use std::collections::HashMap;
224219

225220
const LONG_TRACE_ID_STR: &str = "000000000000004d0000000000000016";

opentelemetry-jaeger/src/exporter/config/agent.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ use std::sync::Arc;
44
use std::{env, net};
55

66
use opentelemetry::trace::TraceError;
7+
use opentelemetry_sdk::trace::{BatchConfig, Config, TracerProvider};
78
use opentelemetry_sdk::trace::{BatchSpanProcessor, Tracer};
8-
use opentelemetry_sdk::{
9-
self,
10-
trace::{BatchConfig, Config, TracerProvider},
11-
};
129

1310
use crate::exporter::agent::{AgentAsyncClientUdp, AgentSyncClientUdp};
1411
use crate::exporter::config::{

opentelemetry-jaeger/src/exporter/config/collector/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::borrow::BorrowMut;
2-
use std::convert::TryFrom;
32
use std::env;
43
use std::sync::Arc;
54
#[cfg(feature = "collector_client")]

opentelemetry-otlp/src/logs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use opentelemetry::{
1616
global,
1717
logs::{LogError, LoggerProvider},
1818
};
19-
use opentelemetry_sdk::{self, export::logs::LogData, runtime::RuntimeChannel};
19+
use opentelemetry_sdk::{export::logs::LogData, runtime::RuntimeChannel};
2020

2121
/// Compression algorithm to use, defaults to none.
2222
pub const OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: &str = "OTEL_EXPORTER_OTLP_LOGS_COMPRESSION";

opentelemetry-sdk/src/logs/log_emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ mod tests {
248248
use opentelemetry::global::{logger, set_logger_provider, shutdown_logger_provider};
249249
use opentelemetry::logs::Logger;
250250
use opentelemetry::{Key, KeyValue, Value};
251-
use std::sync::{Arc, Mutex};
251+
use std::sync::Mutex;
252252
use std::thread;
253253

254254
#[test]

opentelemetry-sdk/src/metrics/view.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> Result<Box<dyn View>> {
177177
#[cfg(test)]
178178
mod tests {
179179
use super::*;
180-
use crate::metrics::Instrument;
181180
#[test]
182181
fn test_new_view_matching_all() {
183182
let criteria = Instrument::new().name("*");

opentelemetry-sdk/src/propagation/baggage.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ impl TextMapPropagator for BaggagePropagator {
155155
#[cfg(test)]
156156
mod tests {
157157
use super::*;
158-
use opentelemetry::{
159-
baggage::BaggageMetadata, propagation::TextMapPropagator, Key, KeyValue, StringValue, Value,
160-
};
158+
use opentelemetry::{baggage::BaggageMetadata, Key, KeyValue, StringValue, Value};
161159
use std::collections::HashMap;
162160

163161
#[rustfmt::skip]

0 commit comments

Comments
 (0)