Skip to content

Commit c2f3515

Browse files
authored
update to Rust 1.78.0 / bump OPTE to 0.29.250 (#5722)
1 parent e2d9575 commit c2f3515

File tree

30 files changed

+44
-132
lines changed

30 files changed

+44
-132
lines changed
File renamed without changes.

.github/buildomat/jobs/a4x2-deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#:
33
#: name = "a4x2-deploy"
44
#: variety = "basic"
5-
#: target = "lab-2.0-opte-0.27"
5+
#: target = "lab-2.0-opte-0.29"
66
#: output_rules = [
77
#: "/out/falcon/*.log",
88
#: "/out/falcon/*.err",

.github/buildomat/jobs/a4x2-prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "a4x2-prepare"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = [
88
#: "=/out/cargo-bay-ce.tgz",
99
#: "=/out/cargo-bay-cr1.tgz",

.github/buildomat/jobs/build-and-test-helios.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "build-and-test (helios)"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = [
88
#: "%/work/*",
99
#: "%/var/tmp/omicron_tmp/*",

.github/buildomat/jobs/build-and-test-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "build-and-test (ubuntu-22.04)"
44
#: variety = "basic"
55
#: target = "ubuntu-22.04"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = [
88
#: "%/work/*",
99
#: "%/var/tmp/omicron_tmp/*",

.github/buildomat/jobs/clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "clippy (helios)"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = []
88

99
# Run clippy on illumos (not just other systems) because a bunch of our code

.github/buildomat/jobs/omicron-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "omicron-common (helios)"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = []
88

99
# Verify that omicron-common builds successfully when used as a dependency

.github/buildomat/jobs/package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "helios / package"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = [
88
#: "=/work/package.tar.gz",
99
#: ]

.github/buildomat/jobs/tuf-repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#: name = "helios / build TUF repo"
44
#: variety = "basic"
55
#: target = "helios-2.0"
6-
#: rust_toolchain = "1.77.2"
6+
#: rust_toolchain = "1.78.0"
77
#: output_rules = [
88
#: "=/work/manifest.toml",
99
#: "=/work/repo.zip",

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@ omicron-sled-agent = { path = "sled-agent" }
347347
omicron-test-utils = { path = "test-utils" }
348348
omicron-zone-package = "0.11.0"
349349
oxide-client = { path = "clients/oxide-client" }
350-
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9", features = [ "api", "std" ] }
350+
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "194a8d1d6443f78d59702a25849607dba33db732", features = [ "api", "std" ] }
351351
once_cell = "1.19.0"
352352
openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" }
353353
openapiv3 = "2.0.0"
354354
# must match samael's crate!
355355
openssl = "0.10"
356356
openssl-sys = "0.9"
357-
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9" }
357+
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "194a8d1d6443f78d59702a25849607dba33db732" }
358358
oso = "0.27"
359359
owo-colors = "4.0.0"
360360
oximeter = { path = "oximeter/oximeter" }

certificates/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ mod tests {
412412
// Valid certs: either no key usage values, or valid ones.
413413
for ext_key_usage in &valid_ext_key_usage {
414414
let mut params = CertificateParams::new(vec![HOST.to_string()]);
415-
params.extended_key_usages = ext_key_usage.clone();
415+
params.extended_key_usages.clone_from(ext_key_usage);
416416

417417
assert!(
418418
validate_cert_with_params(params, &[HOST]).is_ok(),
@@ -431,7 +431,7 @@ mod tests {
431431

432432
for ext_key_usage in &invalid_ext_key_usage {
433433
let mut params = CertificateParams::new(vec![HOST.to_string()]);
434-
params.extended_key_usages = ext_key_usage.clone();
434+
params.extended_key_usages.clone_from(ext_key_usage);
435435

436436
assert!(
437437
matches!(

dev-tools/omdb/src/bin/omdb/db.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,16 +1273,6 @@ async fn cmd_db_disk_physical(
12731273

12741274
// SERVICES
12751275

1276-
#[derive(Tabled)]
1277-
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
1278-
struct ServiceInstanceRow {
1279-
#[tabled(rename = "SERVICE")]
1280-
kind: String,
1281-
instance_id: Uuid,
1282-
addr: String,
1283-
sled_serial: String,
1284-
}
1285-
12861276
// Snapshots
12871277
fn format_snapshot(state: &SnapshotState) -> impl Display {
12881278
match state {
@@ -1438,15 +1428,6 @@ async fn cmd_db_snapshot_info(
14381428

14391429
// SLEDS
14401430

1441-
#[derive(Tabled)]
1442-
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
1443-
struct ServiceInstanceSledRow {
1444-
#[tabled(rename = "SERVICE")]
1445-
kind: String,
1446-
instance_id: Uuid,
1447-
addr: String,
1448-
}
1449-
14501431
#[derive(Tabled)]
14511432
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
14521433
struct SledRow {

dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,6 @@ trait Attributes: DynClone {
101101
fn y_axis_label(&self) -> String;
102102
fn axis_value(&self, val: f64) -> String;
103103
fn legend_value(&self, val: f64) -> String;
104-
105-
fn increase(&mut self, _ndx: usize) -> Option<u8> {
106-
None
107-
}
108-
109-
fn decrease(&mut self, _ndx: usize) -> Option<u8> {
110-
None
111-
}
112-
113-
fn clear(&mut self) {}
114104
}
115105

116106
dyn_clone::clone_trait_object!(Attributes);

dev-tools/omdb/src/bin/omdb/mgs/sensors.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,10 @@ fn sp_info_csv<R: std::io::Read>(
480480
}
481481

482482
if let Some(sensor) = Sensor::from_string(&record[1], &record[2]) {
483-
if sensors.get(&sensor).is_some() {
483+
if !sensors.insert(sensor.clone()) {
484484
break;
485485
}
486486

487-
sensors.insert(sensor.clone());
488-
489487
for (ndx, sp) in sps.iter().enumerate() {
490488
if let Some(sp) = sp {
491489
let value = match record[ndx + len].parse::<f32>() {

nexus/db-model/src/omicron_zone_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl OmicronZone {
9292
let (first_port, last_port) = snat_cfg.port_range_raw();
9393
ntp_ntp_servers = Some(ntp_servers.clone());
9494
ntp_dns_servers = Some(dns_servers.clone());
95-
ntp_ntp_domain = domain.clone();
95+
ntp_ntp_domain.clone_from(domain);
9696
snat_ip = Some(IpNetwork::from(snat_cfg.ip));
9797
snat_first_port = Some(SqlU16::from(first_port));
9898
snat_last_port = Some(SqlU16::from(last_port));
@@ -162,7 +162,7 @@ impl OmicronZone {
162162
} => {
163163
ntp_ntp_servers = Some(ntp_servers.clone());
164164
ntp_dns_servers = Some(dns_servers.clone());
165-
ntp_ntp_domain = domain.clone();
165+
ntp_ntp_domain.clone_from(domain);
166166
(ZoneType::InternalNtp, address, None)
167167
}
168168
OmicronZoneType::Nexus {

nexus/db-queries/src/db/datastore/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,8 @@ mod test {
984984
// This is a little goofy, but it catches a bug that has
985985
// happened before. The returned columns share names (like
986986
// "id"), so we need to process them in-order.
987-
assert!(regions.get(&dataset.id()).is_none());
988-
assert!(disk_datasets.get(&region.id()).is_none());
987+
assert!(!regions.contains(&dataset.id()));
988+
assert!(!disk_datasets.contains(&region.id()));
989989

990990
// Dataset must not be eligible for provisioning.
991991
if let Some(kind) =

nexus/db-queries/src/db/explain.rs

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
//! Utility allowing Diesel to EXPLAIN queries.
66
7+
// These utilities can be useful during development, so we don't want to
8+
// `#[cfg(test)]` the module, but it's likely they won't be used outside of
9+
// tests.
10+
#![cfg_attr(not(test), allow(dead_code))]
11+
712
use super::pool::DbConnection;
813
use async_bb8_diesel::AsyncRunQueryDsl;
914
use async_trait::async_trait;
@@ -17,33 +22,6 @@ use diesel::result::Error as DieselError;
1722
/// Q: The Query we're explaining.
1823
///
1924
/// EXPLAIN: <https://www.cockroachlabs.com/docs/stable/explain.html>
20-
pub trait Explainable<Q> {
21-
/// Syncronously issues an explain statement.
22-
fn explain(
23-
self,
24-
conn: &mut DbConnection,
25-
) -> Result<String, diesel::result::Error>;
26-
}
27-
28-
impl<Q> Explainable<Q> for Q
29-
where
30-
Q: QueryFragment<Pg>
31-
+ QueryId
32-
+ RunQueryDsl<DbConnection>
33-
+ Sized
34-
+ 'static,
35-
{
36-
fn explain(
37-
self,
38-
conn: &mut DbConnection,
39-
) -> Result<String, diesel::result::Error> {
40-
Ok(ExplainStatement { query: self }
41-
.get_results::<String>(conn)?
42-
.join("\n"))
43-
}
44-
}
45-
46-
/// An async variant of [`Explainable`].
4725
#[async_trait]
4826
pub trait ExplainableAsync<Q> {
4927
/// Asynchronously issues an explain statement.
@@ -185,7 +163,8 @@ mod test {
185163
logctx.cleanup_successful();
186164
}
187165

188-
// Tests that ".explain()" can tell us when we're doing full table scans.
166+
// Tests that ".explain_async()" can tell us when we're doing full table
167+
// scans.
189168
#[tokio::test]
190169
async fn test_explain_full_table_scan() {
191170
let logctx = dev::test_setup_log("test_explain_full_table_scan");

nexus/db-queries/src/db/raw_query_builder.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ enum TrustedStrVariants {
6969
ValidatedExplicitly(String),
7070
}
7171

72-
trait SqlQueryBinds {
73-
fn add_bind(self, bind_counter: &BindParamCounter) -> Self;
74-
}
75-
76-
impl<'a, Query> SqlQueryBinds
77-
for diesel::query_builder::BoxedSqlQuery<'a, Pg, Query>
78-
{
79-
fn add_bind(self, bind_counter: &BindParamCounter) -> Self {
80-
self.sql("$").sql(bind_counter.next().to_string())
81-
}
82-
}
83-
8472
type BoxedQuery = diesel::query_builder::BoxedSqlQuery<
8573
'static,
8674
Pg,

nexus/src/app/background/sync_switch_configuration.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ impl BackgroundTask for SwitchPortSettingsManager {
551551

552552
// Same thing as above, check to see if we've already built the announce set,
553553
// if so we'll skip this step
554-
if bgp_announce_prefixes.get(&bgp_config.bgp_announce_set_id).is_none() {
554+
#[allow(clippy::map_entry)]
555+
if !bgp_announce_prefixes.contains_key(&bgp_config.bgp_announce_set_id) {
555556
let announcements = match self
556557
.datastore
557558
.bgp_announce_list(

nexus/src/app/sagas/snapshot_create.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,12 +1572,9 @@ fn create_snapshot_from_disk(
15721572

15731573
if let Some(socket_map) = socket_map {
15741574
for target in &mut opts.target {
1575-
*target = socket_map
1576-
.get(target)
1577-
.ok_or_else(|| {
1578-
anyhow!("target {} not found in map!", target)
1579-
})?
1580-
.clone();
1575+
target.clone_from(socket_map.get(target).ok_or_else(
1576+
|| anyhow!("target {} not found in map!", target),
1577+
)?);
15811578
}
15821579
}
15831580

oximeter/db/src/oxql/ast/table_ops/group_by.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ mod tests {
496496
)
497497
.unwrap();
498498
ts0.points.start_times = None;
499-
ts0.points.timestamps = timestamps.clone();
499+
ts0.points.timestamps.clone_from(&timestamps);
500500
*ts0.points.values_mut(0).unwrap() = ValueArray::Double(vec![
501501
Some(1.0),
502502
if matches!(

oximeter/db/src/oxql/ast/table_ops/limit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ mod tests {
150150
MetricType::Gauge,
151151
)
152152
.unwrap();
153-
timeseries.points.timestamps = timestamps.clone();
153+
timeseries.points.timestamps.clone_from(&timestamps);
154154
timeseries.points.values[0].values.as_integer_mut().unwrap().extend([
155155
Some(1),
156156
Some(2),
@@ -166,7 +166,7 @@ mod tests {
166166
MetricType::Gauge,
167167
)
168168
.unwrap();
169-
timeseries.points.timestamps = timestamps.clone();
169+
timeseries.points.timestamps.clone_from(&timestamps);
170170
timeseries.points.values[0].values.as_integer_mut().unwrap().extend([
171171
Some(4),
172172
Some(5),

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
#
55
# We choose a specific toolchain (rather than "stable") for repeatability. The
66
# intent is to keep this up-to-date with recently-released stable Rust.
7-
channel = "1.77.2"
7+
channel = "1.78.0"
88
profile = "default"

0 commit comments

Comments
 (0)