Skip to content

Commit 90720e0

Browse files
committed
Bumps rust toolchain and resolves linting errors
1 parent 1e8764f commit 90720e0

File tree

12 files changed

+38
-182
lines changed

12 files changed

+38
-182
lines changed

.cargo/config renamed to .cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ ABQ_WORKSPACE_DIR = { value = "", relative = true }
88
# easily hit the number of open FDs (especially on MacOS) during our tests.
99
# Revisit this when we've made everything async on the worker side.
1010
RUST_TEST_THREADS = "1"
11+
12+
[workspace]
13+
resolver = "2"

.github/workflows/build_and_upload.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ on:
55
workflow_dispatch:
66
inputs:
77
ref:
8-
description: 'ref to build'
8+
description: "ref to build"
99
required: true
1010
type: string
1111
release_channel:
12-
description: 'release channel'
12+
description: "release channel"
1313
required: true
1414
type: choice
1515
options:
16-
- "v1"
17-
- "unstable"
16+
- "v1"
17+
- "unstable"
1818

1919
# for automatic release from main on the unstable release channel
2020
workflow_call:
2121
inputs:
2222
ref:
23-
description: 'ref to build'
23+
description: "ref to build"
2424
required: true
2525
type: string
2626
release_channel:
27-
description: 'release channel'
27+
description: "release channel"
2828
required: true
2929
type: string
3030
secrets:
@@ -61,24 +61,24 @@ jobs:
6161
deprecated-platform: linux_x86-64
6262
os: linux
6363
architecture: x86_64
64-
cross-target: 'x86_64-unknown-linux-musl'
64+
cross-target: "x86_64-unknown-linux-musl"
6565
install-musl-tools: true
6666
- runs-on: ubuntu-latest
6767
deprecated-platform: linux_aarch64
6868
os: linux
6969
architecture: aarch64
70-
cross-target: 'aarch64-unknown-linux-musl'
70+
cross-target: "aarch64-unknown-linux-musl"
7171
container: messense/rust-musl-cross:aarch64-musl@sha256:777bd4c61179c38dc213bb8472500584646d28fd4a7c3e0b30b9ef70cb446d58
7272
- runs-on: macos-11 # use an older version for broader osx support
7373
deprecated-platform: darwin_x86-64
7474
os: darwin
7575
architecture: x86_64
76-
cross-target: ''
76+
cross-target: ""
7777
- runs-on: macos-11 # first OS X to support arm64 -- so the first os for cross compilation
7878
deprecated-platform: darwin_aarch64
7979
os: darwin
8080
architecture: aarch64
81-
cross-target: 'aarch64-apple-darwin'
81+
cross-target: "aarch64-apple-darwin"
8282
runs-on: ${{ matrix.runs-on }}
8383
container: ${{ matrix.container }}
8484
outputs:
@@ -122,7 +122,7 @@ jobs:
122122
- name: Install Rust toolchain
123123
uses: rwx-research/rust-toolchain@abq
124124
with:
125-
toolchain: 1.65.0
125+
toolchain: 1.81.0
126126
target: ${{ matrix.cross-target }}
127127

128128
# We don't build a musl ABQ on MacOS
@@ -132,7 +132,7 @@ jobs:
132132
sudo apt-get install -y musl-tools
133133
134134
- name: Build release
135-
if: '!matrix.cross-target'
135+
if: "!matrix.cross-target"
136136
run: cargo build --release --all-features
137137

138138
- name: Build release

.github/workflows/test_and_package_development.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Install Rust toolchain
7777
uses: rwx-research/rust-toolchain@abq
7878
with:
79-
toolchain: 1.65.0
79+
toolchain: 1.81.0
8080
target: ${{ env.RUST_TARGET }}
8181
components: clippy, rustfmt
8282

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23

34
members = [
45
"crates/abq_cli",

crates/abq_cli/src/instance.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use signal_hook::consts::TERM_SIGNALS;
1919
use signal_hook::iterator::Signals;
2020
use std::net::{IpAddr, SocketAddr};
2121
use std::thread;
22-
use tempfile::TempDir;
2322
use tokio_cron_scheduler::JobScheduler;
2423

2524
use thiserror::Error;
@@ -280,12 +279,7 @@ enum AbqLocator {
280279
queue_negotiator: QueueNegotiatorHandle,
281280
server_addr: SocketAddr,
282281
},
283-
Local(Abq, EphemeralAbqGuards),
284-
}
285-
286-
struct EphemeralAbqGuards {
287-
_manifests_path: TempDir,
288-
_results_path: TempDir,
282+
Local(Abq),
289283
}
290284

291285
#[derive(Debug, Error)]
@@ -312,14 +306,14 @@ impl AbqInstance {
312306
AbqLocator::Remote {
313307
queue_negotiator, ..
314308
} => *queue_negotiator,
315-
AbqLocator::Local(abq, _) => abq.get_negotiator_handle(),
309+
AbqLocator::Local(abq) => abq.get_negotiator_handle(),
316310
}
317311
}
318312

319313
pub fn server_addr(&self) -> SocketAddr {
320314
match &self.locator {
321315
AbqLocator::Remote { server_addr, .. } => *server_addr,
322-
AbqLocator::Local(abq, _) => abq.server_addr(),
316+
AbqLocator::Local(abq) => abq.server_addr(),
323317
}
324318
}
325319

@@ -359,13 +353,9 @@ impl AbqInstance {
359353
config.server_options = ServerOptions::new(server_auth, server_tls);
360354

361355
let queue = Abq::start(config).await;
362-
let guards = EphemeralAbqGuards {
363-
_manifests_path: manifests_path,
364-
_results_path: results_path,
365-
};
366356

367357
AbqInstance {
368-
locator: AbqLocator::Local(queue, guards),
358+
locator: AbqLocator::Local(queue),
369359
client_options: ClientOptions::new(client_auth, client_tls),
370360
}
371361
}

crates/abq_queue/src/queue.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use abq_utils::net_protocol::queue::{
1717
AssociatedTestResults, CancelReason, GroupId, NativeRunnerInfo, NegotiatorInfo, Request,
1818
TestResultsResponse, TestSpec, TestStrategy,
1919
};
20-
use abq_utils::net_protocol::results::{self, OpaqueLazyAssociatedTestResults};
20+
use abq_utils::net_protocol::results::{self};
2121
use abq_utils::net_protocol::runners::{Manifest, MetadataMap, StdioOutput};
2222
use abq_utils::net_protocol::work_server::{self, RetryManifestResponse};
2323
use abq_utils::net_protocol::workers::{
@@ -2315,10 +2315,6 @@ impl QueueServer {
23152315
entity: Entity,
23162316
mut stream: Box<dyn net_async::ServerStream>,
23172317
) -> OpaqueResult<()> {
2318-
enum Response {
2319-
One(TestResultsResponse),
2320-
Chunk(OpaqueLazyAssociatedTestResults),
2321-
}
23222318
let results_cell = match queues.get_read_results_cell(&run_id).located(here!()) {
23232319
Ok(state) => match state {
23242320
ReadResultsState::ReadFromCell(cell) => cell,

crates/abq_test_support/native_runner_simulator/Cargo.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@ serde.workspace = true
2121
serde_derive.workspace = true
2222
serde_json.workspace = true
2323

24-
tokio.workspace = true
24+
tokio = { version = "1.26.0", features = [
25+
"fs",
26+
"io-util",
27+
"io-std",
28+
"net",
29+
"rt",
30+
"rt-multi-thread",
31+
"macros",
32+
"sync",
33+
"time",
34+
"process",
35+
] }
36+
2537
tempfile.workspace = true
2638

2739
abq_utils = { path = "../../abq_utils" }

crates/abq_utils/src/net_async/tcp.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use tokio::net::ToSocketAddrs;
1111
use super::UnverifiedServerStream;
1212
use crate::auth::{ClientAuthStrategy, Role, ServerAuthStrategy};
1313

14-
pub struct RawServerStream(tokio::net::TcpStream);
15-
1614
#[derive(Debug)]
1715
#[repr(transparent)]
1816
pub struct ClientStream(tokio::net::TcpStream);

crates/abq_utils/src/net_async/tls.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ use tokio::net::ToSocketAddrs;
1515
use super::UnverifiedServerStream;
1616
use crate::auth::{ClientAuthStrategy, Role, ServerAuthStrategy};
1717

18-
pub struct RawServerStream(tokio::net::TcpStream);
19-
2018
#[derive(Debug)]
2119
pub struct ServerStream(tokio_tls::server::TlsStream<tokio::net::TcpStream>, Role);
2220

crates/abq_workers/src/negotiate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use abq_utils::{
2525
auth::User,
2626
error::{EntityfulError, ErrorEntity, ResultLocation},
2727
exit::ExitCode,
28-
here, log_entityful, net, net_async,
28+
here, log_entityful, net_async,
2929
net_opt::ClientOptions,
3030
net_protocol::{
3131
self,
@@ -139,7 +139,7 @@ pub enum WorkersNegotiateError {
139139
}
140140

141141
/// The worker pool side of the negotiation.
142-
pub struct WorkersNegotiator(Box<dyn net::ClientStream>, WorkerContext);
142+
pub struct WorkersNegotiator();
143143

144144
pub enum NegotiatedWorkers {
145145
/// No more workers were created, because there is no more work to be done.

0 commit comments

Comments
 (0)