Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/buildomat/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,25 +105,25 @@ export TMPDIR="$TEST_TMPDIR"
export RUST_BACKTRACE=1
# We're building once, so there's no need to incur the overhead of an incremental build.
export CARGO_INCREMENTAL=0
# This allows us to build with unstable options, which gives us access to some
# timing information.
#
# If we remove "--timings=json" below, this would no longer be needed.
# This allows us to use -Zbuild-analysis to collect per-crate build timing
# data in JSONL format.
export RUSTC_BOOTSTRAP=1

# Build all the packages and tests, and keep track of how long each took to build.
# We report build progress to stderr, and the "--timings=json" output goes to stdout.
#
# The build graph ends up building several bin/test targets that depend on
# omicron-nexus at the same time, which uses significant memory to compile on
# illumos. To mitigate this we build everything except omicron-nexus's bin/test
# targets first, then finish the build after.
ptime -m cargo build -Z unstable-options --timings=json \
--workspace --exclude=omicron-nexus --tests --locked --verbose \
1>> "$OUTPUT_DIR/crate-build-timings.json"
ptime -m cargo build -Z unstable-options --timings=json \
--workspace --tests --locked --verbose \
1>> "$OUTPUT_DIR/crate-build-timings.json"
#
# Both invocations use the same flags to avoid cache invalidation.
# We collect timing data only from the second (full workspace) build.
ptime -m cargo --config 'build.analysis.enabled=true' build -Zbuild-analysis \
--workspace --exclude=omicron-nexus --tests --locked --verbose
ptime -m cargo --config 'build.analysis.enabled=true' build -Zbuild-analysis \
--workspace --tests --locked --verbose
cp "$(ls -t "${CARGO_HOME:-$HOME/.cargo}/log/"*.jsonl | head -1)" \
"$OUTPUT_DIR/cargo-build-analysis.jsonl"

#
# We apply our own timeout to ensure that we get a normal failure on timeout
Expand Down
4 changes: 2 additions & 2 deletions .github/buildomat/jobs/build-and-test-helios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#:
#: [[publish]]
#: series = "build-info-helios"
#: name = "crate-build-timings.json"
#: from_output = "/work/crate-build-timings.json"
#: name = "cargo-build-analysis.jsonl"
#: from_output = "/work/cargo-build-analysis.jsonl"
#:
#: [[publish]]
#: series = "live-tests"
Expand Down
4 changes: 2 additions & 2 deletions .github/buildomat/jobs/build-and-test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#:
#: [[publish]]
#: series = "build-info-linux"
#: name = "crate-build-timings.json"
#: from_output = "/work/crate-build-timings.json"
#: name = "cargo-build-analysis.jsonl"
#: from_output = "/work/cargo-build-analysis.jsonl"
#:
#: [[publish]]
#: series = "nextest-recording-linux"
Expand Down
5 changes: 2 additions & 3 deletions nexus/db-queries/src/db/datastore/db_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3103,12 +3103,11 @@ mod test {
)
.await;

if second_result.is_err() {
if let Err(err) = second_result {
eprintln!(
"test_add_column_concurrent_rejected: \
second connection correctly rejected \
(attempt {attempt}): {:?}",
second_result.unwrap_err()
(attempt {attempt}): {err:?}",
);
second_errored = true;
break;
Expand Down
9 changes: 5 additions & 4 deletions nexus/db-queries/src/db/datastore/trust_quorum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,14 +771,15 @@ impl DataStore {
// 2. We are transitioning from preparing to committed state.

// Should we write secrets?
if db_config.encrypted_rack_secrets_salt.is_none()
&& config.encrypted_rack_secrets.is_some()
{
if let (None, Some(encrypted_rack_secrets)) = (
&db_config.encrypted_rack_secrets_salt,
config.encrypted_rack_secrets,
) {
Self::update_tq_encrypted_rack_secrets_conn(
&c,
db_config.rack_id,
db_config.epoch,
config.encrypted_rack_secrets.unwrap(),
encrypted_rack_secrets,
)
.await
.map_err(|txn_error| txn_error.into_diesel(&err))?;
Expand Down
3 changes: 1 addition & 2 deletions nexus/test-utils/src/nexus_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use omicron_uuid_kinds::SledUuid;
use oximeter_collector::Oximeter;
use oximeter_producer::Server as ProducerServer;
use sled_agent_types::early_networking::SwitchSlot;
use slog::debug;
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::sync::{Arc, RwLock};
Expand Down Expand Up @@ -358,7 +357,7 @@ pub async fn omicron_dev_setup_with_config<N: NexusServer>(
let starter = ControlPlaneStarter::<N>::new("omicron-dev", config);

let log = &starter.logctx.log;
debug!(log, "Ensuring seed tarball exists");
slog::debug!(log, "Ensuring seed tarball exists");

// Start up a ControlPlaneTestContext, which tautologically sets up
// everything needed for a simulated control plane.
Expand Down
4 changes: 1 addition & 3 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[toolchain]
# We choose a specific toolchain (rather than "stable") for repeatability. The
# intent is to keep this up-to-date with recently-released stable Rust.
#
# Rust 1.92.0 runs into https://github.com/rust-lang/rust/issues/147648.
channel = "1.91.1"
channel = "1.94.0"
profile = "default"
4 changes: 2 additions & 2 deletions sled-hardware/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn detect_cpu_family(log: &Logger) -> sled_hardware_types::SledCpuFamily {

// Read leaf 0 to figure out the processor's vendor and whether leaf 1
// (which contains family, model, and stepping information) is available.
let leaf_0 = unsafe { __cpuid_count(0, 0) };
let leaf_0 = __cpuid_count(0, 0);

info!(log, "read CPUID leaf 0 to detect CPU vendor"; "values" => ?leaf_0);

Expand Down Expand Up @@ -197,7 +197,7 @@ pub fn detect_cpu_family(log: &Logger) -> sled_hardware_types::SledCpuFamily {
// - If the base family value is 0xF, eax[27:20] contains the "extended"
// family value, and the actual family value is the sum of the base and
// the extended values.
let leaf_1 = unsafe { __cpuid_count(1, 0) };
let leaf_1 = __cpuid_count(1, 0);
let mut family = (leaf_1.eax & 0x00000F00) >> 8;
if family == 0xF {
family += (leaf_1.eax & 0x0FF00000) >> 20;
Expand Down
1 change: 0 additions & 1 deletion trust-quorum/test-utils/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ impl TqState {
let baseboards: BTreeSet<_> = config
.members
.iter()
.cloned()
.map(|id| {
Baseboard::new_pc(
id.serial_number.clone(),
Expand Down
Loading