Skip to content

deps unexpectedly rebuilt after running cargo nextest run differently #4392

Closed
@davepacheco

Description

@davepacheco

I noticed all this working on branch "dap/nexus-inventory-2". Commit 376a37b is sync'd up with "main" from this morning. From there, I ran a full test suite run that failed one test:

$ ptime -m cargo nextest run --no-fail-fast
info: experimental features enabled: setup-scripts
    Finished test [unoptimized + debuginfo] target(s) in 1.08s
    Starting 892 tests across 99 binaries (2 skipped)
       SETUP [      1/1] crdb-seed: cargo run -p crdb-seed
             [ 00:00:00] [                                                                                            ]   0/894:          Finished dev [unoptimized + debuginfo] target(s) in 0.53s
     Running `target/debug/crdb-seed`
Oct 30 20:25:03.262 INFO Using existing CRDB seed tarball: `/dangerzone/omicron_tmp/crdb-base-dap/3af8e1b0d6d99d1eb564ed4f736ee088e760afd006b09b3fb54a50ef98d608b1.tar`
  SETUP PASS [      1/1] crdb-seed: cargo run -p crdb-seed
        PASS [   0.083s] authz-macros::proc-macro/authz-macros test_authz_dump
...
------------
     Summary [ 403.723s] 892 tests run: 891 passed (3 slow, 1 leaky), 1 failed, 2 skipped
        FAIL [  18.704s] omicron-nexus::test_all integration_tests::schema::dbinit_equals_sum_of_all_up
error: test run failed

real     6:47.092637560
user  1:19:44.454769533
sys     14:08.574488939
trap       41.302586601
tflt        0.500335124
dflt        3.788205567
kflt        0.048879750
lock 365:06:39.566636121
slp  16:25:43.533571797
lat   1:03:17.653685989
stop    26:13.939275810

I then tried to fix this test, which changed these files: nexus/db-model/src/schema.rs, schema/crdb/dbinit.sql, schema/crdb/9.0.0/ (a whole tree).

Then I tried to rerun just the failing test. But it looks like a whole lot of stuff got rebuilt, including a bunch of deps from outside the workspace:

$ ptime -m cargo nextest run -p omicron-nexus integration_tests::schema::dbinit_equals_sum_of_all_up
info: experimental features enabled: setup-scripts
   Compiling serde_json v1.0.107
   Compiling schemars v0.8.13
   Compiling openapiv3 v1.0.3
   Compiling reqwest v0.11.20
   Compiling usdt-impl v0.3.5
   Compiling postgres-types v0.2.6
   Compiling slog-json v2.6.1
   Compiling olpc-cjson v0.1.3
   Compiling tinytemplate v1.2.1
   Compiling httptest v0.15.4
   Compiling slog-bunyan v2.4.0
   Compiling criterion v0.5.1
   Compiling tokio-postgres v0.7.10
   Compiling ipnetwork v0.20.0
   Compiling typify-impl v0.0.13 (https://github.com/oxidecomputer/typify#de16c423)
   Compiling omicron-passwords v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling crucible-client-types v0.1.0 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling usdt-attr-macro v0.3.5
   Compiling usdt-macro v0.3.5
   Compiling diesel v2.1.3
   Compiling progenitor-client v0.3.0 (https://github.com/oxidecomputer/progenitor?branch=main#5c941c0b)
   Compiling usdt v0.3.5
   Compiling omicron-zone-package v0.8.3
   Compiling dropshot v0.9.1-dev (https://github.com/oxidecomputer/dropshot?branch=main#fa728d07)
   Compiling slog-dtrace v0.2.3
   Compiling opte-api v0.1.0 (https://github.com/oxidecomputer/opte?rev=258a8b59902dd36fc7ee5425e6b1fb5fc80d4649#258a8b59)
   Compiling crucible-common v0.0.1 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling steno v0.4.0
   Compiling propolis_types v0.0.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling opte v0.1.0 (https://github.com/oxidecomputer/opte?rev=258a8b59902dd36fc7ee5425e6b1fb5fc80d4649#258a8b59)
   Compiling crucible-protocol v0.0.0 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling oxide-vpc v0.1.0 (https://github.com/oxidecomputer/opte?rev=258a8b59902dd36fc7ee5425e6b1fb5fc80d4649#258a8b59)
   Compiling gateway-sp-comms v0.1.1 (https://github.com/oxidecomputer/management-gateway-service?rev=2739c18e80697aa6bc235c935176d14b4d757ee9#2739c18e)
   Compiling opte-ioctl v0.1.0 (https://github.com/oxidecomputer/opte?rev=258a8b59902dd36fc7ee5425e6b1fb5fc80d4649#258a8b59)
   Compiling tough v0.12.5
   Compiling openapi-lint v0.4.0 (https://github.com/oxidecomputer/openapi-lint?branch=main#bb69a3a4)
   Compiling typify-macro v0.0.13 (https://github.com/oxidecomputer/typify#de16c423)
   Compiling typify v0.0.13 (https://github.com/oxidecomputer/typify#de16c423)
   Compiling progenitor-impl v0.3.0 (https://github.com/oxidecomputer/progenitor?branch=main#5c941c0b)
   Compiling progenitor-macro v0.3.0 (https://github.com/oxidecomputer/progenitor?branch=main#5c941c0b)
   Compiling progenitor v0.3.0 (https://github.com/oxidecomputer/progenitor?branch=main#5c941c0b)
   Compiling omicron-common v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling dns-service-client v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling propolis-client v0.1.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling crucible-agent-client v0.0.1 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling crucible-pantry-client v0.0.1 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling dpd-client v0.1.0 (/home/dap/omicron-inventory/clients/dpd-client)
   Compiling mg-admin-client v0.1.0 (/home/dap/omicron-inventory/clients/mg-admin-client)
   Compiling ddm-admin-client v0.1.0 (/home/dap/omicron-inventory/clients/ddm-admin-client)
   Compiling async-bb8-diesel v0.1.0 (https://github.com/oxidecomputer/async-bb8-diesel?rev=1446f7e0c1f05f33a0581abd51fa873c7652ab61#1446f7e0)
   Compiling diesel-dtrace v0.2.0 (https://github.com/oxidecomputer/diesel-dtrace?branch=main#c1252df7)
   Compiling nexus-client v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling oximeter v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling internal-dns v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling omicron-workspace-hack v0.1.0 (/home/dap/omicron-inventory/workspace-hack)
   Compiling omicron-rpaths v0.1.0 (/home/dap/omicron-inventory/rpaths)
   Compiling omicron-passwords v0.1.0 (/home/dap/omicron-inventory/passwords)
   Compiling dns-service-client v0.1.0 (/home/dap/omicron-inventory/clients/dns-service-client)
   Compiling gateway-client v0.1.0 (/home/dap/omicron-inventory/clients/gateway-client)
   Compiling oxide-client v0.1.0 (/home/dap/omicron-inventory/clients/oxide-client)
   Compiling api_identity v0.1.0 (/home/dap/omicron-inventory/api_identity)
   Compiling oximeter-macro-impl v0.1.0 (/home/dap/omicron-inventory/oximeter/oximeter-macro-impl)
   Compiling db-macros v0.1.0 (/home/dap/omicron-inventory/nexus/db-macros)
   Compiling authz-macros v0.1.0 (/home/dap/omicron-inventory/nexus/authz-macros)
   Compiling nexus-test-utils-macros v0.1.0 (/home/dap/omicron-inventory/nexus/test-utils-macros)
   Compiling nexus-db-model v0.1.0 (/home/dap/omicron-inventory/nexus/db-model)
   Compiling nexus-db-queries v0.1.0 (/home/dap/omicron-inventory/nexus/db-queries)
   Compiling omicron-nexus v0.1.0 (/home/dap/omicron-inventory/nexus)
   Compiling bootstore v0.1.0 (/home/dap/omicron-inventory/bootstore)
   Compiling omicron-common v0.1.0 (/home/dap/omicron-inventory/common)
   Compiling dns-server v0.1.0 (/home/dap/omicron-inventory/dns-server)
   Compiling oximeter-producer v0.1.0 (https://github.com/oxidecomputer/omicron?branch=main#3dcc8d2e)
   Compiling crucible v0.0.1 (https://github.com/oxidecomputer/crucible?rev=da534e73380f3cc53ca0de073e1ea862ae32109b#da534e73)
   Compiling illumos-utils v0.1.0 (/home/dap/omicron-inventory/illumos-utils)
   Compiling nexus-client v0.1.0 (/home/dap/omicron-inventory/clients/nexus-client)
   Compiling key-manager v0.1.0 (/home/dap/omicron-inventory/key-manager)
   Compiling oximeter v0.1.0 (/home/dap/omicron-inventory/oximeter/oximeter)
   Compiling nexus-types v0.1.0 (/home/dap/omicron-inventory/nexus/types)
   Compiling sled-agent-client v0.1.0 (/home/dap/omicron-inventory/clients/sled-agent-client)
   Compiling internal-dns v0.1.0 (/home/dap/omicron-inventory/internal-dns)
   Compiling ipcc-key-value v0.1.0 (/home/dap/omicron-inventory/ipcc-key-value)
   Compiling nexus-defaults v0.1.0 (/home/dap/omicron-inventory/nexus/defaults)
   Compiling omicron-certificates v0.1.0 (/home/dap/omicron-inventory/certificates)
   Compiling oximeter-client v0.1.0 (/home/dap/omicron-inventory/clients/oximeter-client)
   Compiling propolis v0.1.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling omicron-gateway v0.1.0 (/home/dap/omicron-inventory/gateway)
   Compiling oximeter-db v0.1.0 (/home/dap/omicron-inventory/oximeter/db)
   Compiling omicron-test-utils v0.1.0 (/home/dap/omicron-inventory/test-utils)
   Compiling oximeter-instruments v0.1.0 (/home/dap/omicron-inventory/oximeter/instruments)
   Compiling sled-hardware v0.1.0 (/home/dap/omicron-inventory/sled-hardware)
   Compiling oximeter-producer v0.1.0 (/home/dap/omicron-inventory/oximeter/producer)
   Compiling cpuid_profile_config v0.0.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling propolis-server-config v0.0.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling propolis-server v0.1.0 (https://github.com/oxidecomputer/propolis?rev=4019eb10fc2f4ba9bf210d0461dc6292b68309c2#4019eb10)
   Compiling bootstrap-agent-client v0.1.0 (/home/dap/omicron-inventory/clients/bootstrap-agent-client)
   Compiling sp-sim v0.1.0 (/home/dap/omicron-inventory/sp-sim)
   Compiling nexus-test-interface v0.1.0 (/home/dap/omicron-inventory/nexus/test-interface)
   Compiling oximeter-collector v0.1.0 (/home/dap/omicron-inventory/oximeter/collector)
   Compiling nexus-inventory v0.1.0 (/home/dap/omicron-inventory/nexus/inventory)
   Compiling gateway-test-utils v0.1.0 (/home/dap/omicron-inventory/gateway-test-utils)
   Compiling omicron-sled-agent v0.1.0 (/home/dap/omicron-inventory/sled-agent)
   Compiling nexus-test-utils v0.1.0 (/home/dap/omicron-inventory/nexus/test-utils)
    Finished test [unoptimized + debuginfo] target(s) in 12m 22s
    Starting 1 test across 4 binaries (340 skipped)
       SETUP [      1/1] crdb-seed: cargo run -p crdb-seed
             [ 00:00:00] [                                                                                            ]   0/341:         Compiling omicron-test-utils v0.1.0 (/home/dap/omicron-inventory/test-utils)
   Compiling crdb-seed v0.1.0 (/home/dap/omicron-inventory/dev-tools/crdb-seed)
    Finished dev [unoptimized + debuginfo] target(s) in 6.27s
     Running `target/debug/crdb-seed`
Oct 30 20:54:49.331 INFO cockroach temporary directory: /dangerzone/omicron_tmp/.tmpmWMw1W
Oct 30 20:54:49.331 INFO cockroach command line: cockroach start-single-node --insecure --http-addr=:0 --store=path=/dangerzone/omicron_tmp/crdb-base-dap/.tmp9slTAd,ballast-size=0 --listen-addr [::1]:0 --listening-url-file /dangerzone/omicron_tmp/.tmpmWMw1W/listen-url
Oct 30 20:54:49.332 INFO cockroach environment: BASH_SILENCE_DEPRECATION_WARNING=1 BAT_THEME=ansi BUNYAN_NO_PAGER=1 CARGO=/home/dap/.rustup/toolchains/1.72.1-x86_64-unknown-illumos/bin/cargo CARGO_HOME=/home/dap/.cargo CARGO_MANIFEST_DIR=/home/dap/omicron-inventory/dev-tools/crdb-seed CARGO_PKG_AUTHORS= CARGO_PKG_DESCRIPTION= CARGO_PKG_HOMEPAGE= CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICENSE_FILE= CARGO_PKG_NAME=crdb-seed CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY= CARGO_PKG_RUST_VERSION= CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE= CSCOPEOPTIONS=-r -p8 EDITOR=vim GOTRACEBACK=crash HOME=/home/dap HOST=ivanova LANG=en_US.UTF-8 LD_LIBRARY_PATH=/home/dap/omicron-inventory/target/debug/build/bzip2-sys-73f44f7f2703292f/out/lib:/home/dap/omicron-inventory/target/debug/build/ring-5495af41434671b7/out:/home/dap/omicron-inventory/target/debug/build/ring-d5da8041c384a28b/out:/home/dap/omicron-inventory/target/debug/deps:/home/dap/omicron-inventory/target/debug:/home/dap/.rustup/toolchains/1.72.1-x86_64-unknown-illumos/lib/rustlib/x86_64-unknown-illumos/lib:/home/dap/omicron-inventory/target/debug/build/bzip2-sys-4e554edf952aff8e/out/lib:/home/dap/omicron-inventory/target/debug/build/libgit2-sys-620730d494c5e2b4/out/build:/home/dap/omicron-inventory/target/debug/build/ring-9a5207eba4153586/out:/home/dap/omicron-inventory/target/debug/build/ring-c211d5d00c4c9cb1/out:/home/dap/omicron-inventory/target/debug/build/tofino-07050b6a5db31350/out:/home/dap/omicron-inventory/target/debug/deps:/home/dap/omicron-inventory/target/debug:/home/dap/.rustup/toolchains/1.72.1-x86_64-unknown-illumos/lib LESS=-P ?f%f .line %lb/%L .byte %bB?s/%s. ?e(END):?pB%pB\%..%t LOGNAME=dap MACH=i386 MACHINE_THAT_GOES_PING=1 NEXTEST=1 NEXTEST_ENV=/dangerzone/omicron_tmp/nextest-envD7MBUv NEXTEST_LD_LIBRARY_PATH=/home/dap/omicron-inventory/target/debug/build/bzip2-sys-4e554edf952aff8e/out/lib:/home/dap/omicron-inventory/target/debug/build/libgit2-sys-620730d494c5e2b4/out/build:/home/dap/omicron-inventory/target/debug/build/ring-9a5207eba4153586/out:/home/dap/omicron-inventory/target/debug/build/ring-c211d5d00c4c9cb1/out:/home/dap/omicron-inventory/target/debug/build/tofino-07050b6a5db31350/out:/home/dap/omicron-inventory/target/debug/deps:/home/dap/omicron-inventory/target/debug:/home/dap/.rustup/toolchains/1.72.1-x86_64-unknown-illumos/lib NEXTEST_RUN_ID=8df2ac74-7d2e-4630-b2cf-66cc60fb291f OLDPWD=/home/dap PAGER=less -X PATH=/home/dap/omicron-inventory/out/mgd/root/opt/oxide/mgd/bin:/home/dap/omicron-inventory/out/dendrite-stub/bin:/home/dap/omicron-inventory/out/clickhouse:/home/dap/omicron-inventory/out/cockroachdb/bin:/home/dap/omicron-inventory/out/dendrite-stub/bin:/home/dap/omicron-inventory/out/clickhouse:/home/dap/omicron-inventory/out/cockroachdb/bin:/home/dap/.cargo/bin::/home/dap/bin:/home/dap/install/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/opt/ooce/bin:/home/dap/tools/cockroachdb/bin:/home/dap/tools/clickhouse PS1=\[\033]0;\w (\h)\007\]\u@ivanova \[\]\W\[\] $  PWD=/home/dap/omicron-inventory RAWPS1=\u@ivanova \[\]\W\[\] $  RUSTUP_HOME=/home/dap/.rustup RUSTUP_TOOLCHAIN=1.72.1-x86_64-unknown-illumos RUST_RECURSION_COUNT=2 SHELL=/bin/bash SHLVL=1 SSH_AUTH_SOCK=/tmp/ssh-XXXXV2aaFT/agent.23288 SSH_CLIENT=172.20.17.110 54042 22 SSH_CONNECTION=172.20.17.110 54042 172.20.2.70 22 SSH_TTY=/dev/pts/4 SSL_CERT_DIR=/usr/ssl/certs SSL_CERT_FILE=/etc/ssl/cacert.pem TERM=xterm-256color TMPDIR=/dangerzone/omicron_tmp TZ=US/Pacific USER=dap VISUAL=vim _=/bin/ptime
Oct 30 20:54:49.685 INFO cockroach pid: 3866
Oct 30 20:54:49.685 INFO cockroach listen URL: postgresql://root@[::1]:56655/omicron?sslmode=disable
Oct 30 20:54:49.685 INFO cockroach: populating
Oct 30 20:54:50.620 INFO cockroach: populated
Oct 30 20:54:55.210 INFO Created CRDB seed tarball: `/dangerzone/omicron_tmp/crdb-base-dap/839a4a3e0f3eefa8978da64abad5c4e4c8b92841438e933548807cb809f5f2ad.tar`
  SETUP PASS [      1/1] crdb-seed: cargo run -p crdb-seed
        PASS [  15.303s] omicron-nexus::test_all integration_tests::schema::dbinit_equals_sum_of_all_up
------------
     Summary [  27.603s] 1 test run: 1 passed, 340 skipped

real    12:51.083406867
user    49:17.068366771
sys      5:07.239031904
trap        1.238737045
tflt        0.322437996
dflt        5.063060379
kflt        0.026255013
lock  2:06:34.034705988
slp   2:31:44.564452485
lat        30.308367863
stop       43.578906150

This was unexpected -- I thought hakari was supposed to prevent that. I wondered if mine was out of date. But I think not?

$ cargo hakari verify
info: omicron-workspace-hack works correctly
$ echo $?
0

Metadata

Metadata

Assignees

Labels

developmentBugs, paper cuts, feature requests, or other thoughts on making omicron development better

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions