Skip to content

Commit

Permalink
switch to stable toolchain (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco authored Feb 17, 2023
1 parent 0f2142f commit e8fd6b4
Show file tree
Hide file tree
Showing 25 changed files with 59 additions and 58 deletions.
7 changes: 3 additions & 4 deletions .github/buildomat/jobs/build-and-test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "build-and-test (ubuntu-20.04)"
#: variety = "basic"
#: target = "ubuntu-20.04"
#: rust_toolchain = "nightly-2022-09-27"
#: rust_toolchain = "1.66.1"
#: output_rules = [
#: "/var/tmp/omicron_tmp/*",
#: "!/var/tmp/omicron_tmp/crdb-base*",
Expand Down Expand Up @@ -53,7 +53,7 @@ banner build
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
export TMPDIR=$TEST_TMPDIR
ptime -m cargo +'nightly-2022-09-27' build --locked --all-targets --verbose
ptime -m cargo build --locked --all-targets --verbose

#
# NOTE: We're using using the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid
Expand All @@ -63,8 +63,7 @@ ptime -m cargo +'nightly-2022-09-27' build --locked --all-targets --verbose
# from end-to-end-tests.
#
banner test
ptime -m cargo +'nightly-2022-09-27' test --locked --verbose \
--no-fail-fast
ptime -m cargo test --locked --verbose --no-fail-fast

#
# Make sure that we have left nothing around in $TEST_TMPDIR. The easiest way
Expand Down
7 changes: 3 additions & 4 deletions .github/buildomat/jobs/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "build-and-test (helios)"
#: variety = "basic"
#: target = "helios-latest"
#: rust_toolchain = "nightly-2022-09-27"
#: rust_toolchain = "1.66.1"
#: output_rules = [
#: "/var/tmp/omicron_tmp/*",
#: "!/var/tmp/omicron_tmp/crdb-base*",
Expand Down Expand Up @@ -53,7 +53,7 @@ banner build
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
export TMPDIR=$TEST_TMPDIR
ptime -m cargo +'nightly-2022-09-27' build --locked --all-targets --verbose
ptime -m cargo build --locked --all-targets --verbose

#
# NOTE: We're using using the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid
Expand All @@ -63,8 +63,7 @@ ptime -m cargo +'nightly-2022-09-27' build --locked --all-targets --verbose
# from end-to-end-tests.
#
banner test
ptime -m cargo +'nightly-2022-09-27' test --locked --verbose \
--no-fail-fast
ptime -m cargo test --locked --verbose --no-fail-fast

#
# Make sure that we have left nothing around in $TEST_TMPDIR. The easiest way
Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/build-end-to-end-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "helios / build-end-to-end-tests"
#: variety = "basic"
#: target = "helios-latest"
#: rust_toolchain = "nightly-2022-04-27"
#: rust_toolchain = "1.66.1"
#: output_rules = [
#: "=/work/*.gz",
#: ]
Expand Down
4 changes: 2 additions & 2 deletions .github/buildomat/jobs/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "clippy (helios)"
#: variety = "basic"
#: target = "helios-latest"
#: rust_toolchain = "nightly-2022-09-27"
#: rust_toolchain = "1.66.1"
#: output_rules = []
#:

Expand All @@ -24,4 +24,4 @@ ptime -m bash ./tools/install_builder_prerequisites.sh -y

banner clippy
# See the corresponding GitHub Actions job for more about these arguments.
ptime -m cargo +'nightly-2022-09-27' clippy --all-targets -- --deny warnings --allow clippy::style
ptime -m cargo clippy --all-targets -- --deny warnings --allow clippy::style
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "helios / package"
#: variety = "basic"
#: target = "helios-latest"
#: rust_toolchain = "nightly-2022-09-27"
#: rust_toolchain = "1.66.1"
#: output_rules = [
#: "=/work/package.tar.gz",
#: "=/work/zones/*.tar.gz",
Expand Down
11 changes: 7 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ db-macros = { path = "nexus/db-macros" }
debug-ignore = "1.0.5"
derive_more = "0.99.17"
diesel = { version = "2.0.3" }
diesel-dtrace = { git = "https://github.com/oxidecomputer/diesel-dtrace", rev = "18748d9f76c94e1f4400fbec0859b3e77a221a8d" }
diesel-dtrace = { git = "https://github.com/oxidecomputer/diesel-dtrace", rev = "309bd361d886a237fbdd5d74992bdbd783f98bff" }
dropshot = { git = "https://github.com/oxidecomputer/dropshot", branch = "main", features = [ "usdt-probes" ] }
expectorate = "1.0.6"
fatfs = "0.3.6"
fs-err = "2.9.0"
futures = "0.3.25"
gateway-client = { path = "gateway-client" }
gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", default-features = false, features = ["std"], rev = "482bae9bfa704282e981008abae9328344150d36" }
gateway-sp-comms = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "482bae9bfa704282e981008abae9328344150d36" }
gateway-messages = { git = "https://github.com/oxidecomputer/management-gateway-service", default-features = false, features = ["std"], rev = "e35df234f9db57b1b7fc0a8ca279fb2774ff1046" }
gateway-sp-comms = { git = "https://github.com/oxidecomputer/management-gateway-service", rev = "e35df234f9db57b1b7fc0a8ca279fb2774ff1046" }
headers = "0.3.8"
heck = "0.4"
hex = "0.4.3"
Expand Down
2 changes: 1 addition & 1 deletion common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2299,7 +2299,7 @@ mod test {
assert_eq!(2793, tb3.to_whole_gibibytes());
assert_eq!(2, tb3.to_whole_tebibytes());

let three_tebibytes = (3u64 * 1024 * 1024 * 1024 * 1024) as u64;
let three_tebibytes = 3u64 * 1024 * 1024 * 1024 * 1024;
let tib3 = ByteCount::try_from(three_tebibytes).unwrap();
assert_eq!(three_tebibytes, tib3.to_bytes());
assert_eq!(3 * 1024 * 1024 * 1024, tib3.to_whole_kibibytes());
Expand Down
2 changes: 1 addition & 1 deletion gateway/src/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ async fn sp_component_active_slot_set(
let component = component_from_str(&component)?;
let slot = body.into_inner().slot;

sp.set_component_active_slot(component, slot)
sp.set_component_active_slot(component, slot, false)
.await
.map_err(SpCommsError::from)?;

Expand Down
1 change: 1 addition & 0 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ oximeter-instruments = { workspace = true, features = ["http-instruments"] }
oximeter-producer.workspace = true

[dev-dependencies]
assert_matches.workspace = true
criterion.workspace = true
expectorate.workspace = true
hyper-rustls.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion nexus/src/app/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ impl super::Nexus {

#[cfg(test)]
mod tests {
use std::{assert_matches::assert_matches, num::NonZeroU32};
use assert_matches::assert_matches;
use std::num::NonZeroU32;

use crate::context::OpContext;
use crate::db::model::UpdateStatus;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/db/datastore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@ mod test {
};
use crate::db::queries::vpc_subnet::FilterConflictingVpcSubnetRangesQuery;
use crate::external_api::params;
use assert_matches::assert_matches;
use chrono::{Duration, Utc};
use nexus_test_utils::db::test_setup_database;
use omicron_common::api::external::{
self, ByteCount, Error, IdentityMetadataCreateParams, LookupType, Name,
};
use omicron_test_utils::dev;
use ref_cast::RefCast;
use std::assert_matches::assert_matches;
use std::collections::HashSet;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddrV6};
use std::sync::Arc;
Expand Down
2 changes: 0 additions & 2 deletions nexus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#![allow(clippy::unnecessary_wraps)]
// Clippy's style lints are useful, but not worth running automatically.
#![allow(clippy::style)]
// assert_matches! is pretty useful for tests so just enable it conditionally.
#![cfg_attr(test, feature(assert_matches))]

pub mod app; // Public for documentation examples
pub mod authn; // Public only for testing
Expand Down
4 changes: 2 additions & 2 deletions nexus/tests/integration_tests/subnet_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ async fn test_subnet_allocation(cptestctx: &ControlPlaneTestContext) {
objects_list_page_authz::<NetworkInterface>(client, &url_ips)
.await
.items;
assert_eq!(network_interfaces.len(), subnet_size as usize);
assert_eq!(network_interfaces.len(), subnet_size);

// Sort by IP address to simplify the checks
network_interfaces.sort_by(|a, b| a.ip.cmp(&b.ip));
for (iface, addr) in network_interfaces
.iter()
.zip(subnet.iter().skip(NUM_INITIAL_RESERVED_IP_ADDRESSES as usize))
.zip(subnet.iter().skip(NUM_INITIAL_RESERVED_IP_ADDRESSES))
{
assert_eq!(
iface.ip,
Expand Down
19 changes: 8 additions & 11 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[toolchain]
# NOTE: This toolchain is also specified in various jobs in
# .github/buildomat/jobs/. If you update it here, update those files too.
#
# We use nightly for the "asm" unstable Rust feature, used within Propolis for
# dtrace probes.
#
# We specify a specific, known-good nightly to avoid regular breakage.
# Once all unstable features that we use are stabilized, we should switch back
# to "stable".
# We choose a specific toolchain (rather than "stable") for repeatability. The
# intent is to keep this up-to-date with recently-released stable Rust.
#

[toolchain]
# NOTE: This toolchain is also specified within .github/buildomat/jobs/{build-and-test,package}.sh.
# If you update it here, update that file too.
channel = "nightly-2022-09-27"
# Right now, we skip 1.67 due to rust-lang/cargo#11629. There are workarounds
# for that but it's simpler to just skip this release.
channel = "1.66.1"
profile = "default"
2 changes: 1 addition & 1 deletion sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl From<omicron_common::api::external::Vni> for types::Vni {

impl From<types::Vni> for omicron_common::api::external::Vni {
fn from(s: types::Vni) -> Self {
Self::try_from(s.0 as u32).unwrap()
Self::try_from(s.0).unwrap()
}
}

Expand Down
1 change: 1 addition & 0 deletions sled-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ libefi-illumos = { git = "https://github.com/oxidecomputer/libefi-illumos", bran
opte-ioctl.workspace = true

[dev-dependencies]
assert_matches.workspace = true
expectorate.workspace = true
http.workspace = true
mockall.workspace = true
Expand Down
Loading

0 comments on commit e8fd6b4

Please sign in to comment.