Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: Make db-run check CockroachDB version #427

Merged
merged 3 commits into from
Nov 24, 2021
Merged

dev: Make db-run check CockroachDB version #427

merged 3 commits into from
Nov 24, 2021

Conversation

teisenbe
Copy link
Contributor

This should help catch when developers forget to upgrade their version
to match the one in use by the repo.

Example failure:
$ cargo run --bin omicron-dev db-run
Compiling omicron-test-utils v0.1.0
Finished dev [unoptimized + debuginfo] target(s) in 5.94s
Running target/debug/omicron-dev db-run
omicron-dev: using temporary directory for database store (cleaned up on clean exit)
omicron-dev: will run this to start CockroachDB:
cockroach start-single-node --insecure --http-addr=:0 [...]
omicron-dev: temporary directory: /tmp/.tmpWJTKQn
omicron-dev: wrong version of CockroachDB installed. expected 'v21.1.11', found: 'Ok("v21.1.10")

This should help catch when developers forget to upgrade their version
to match the one in use by the repo.

Example failure:
$ cargo run --bin omicron-dev db-run
   Compiling omicron-test-utils v0.1.0
    Finished dev [unoptimized + debuginfo] target(s) in 5.94s
     Running `target/debug/omicron-dev db-run`
omicron-dev: using temporary directory for database store (cleaned up on clean exit)
omicron-dev: will run this to start CockroachDB:
cockroach start-single-node --insecure --http-addr=:0 [...]
omicron-dev: temporary directory: /tmp/.tmpWJTKQn
omicron-dev: wrong version of CockroachDB installed. expected 'v21.1.11', found: 'Ok("v21.1.10")
@teisenbe teisenbe requested a review from lzrd November 24, 2021 00:21
@@ -14,7 +14,7 @@ SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ARG0="$(basename ${BASH_SOURCE[0]})"

# If you change this, you must also update the md5sums below
CIDL_VERSION="v21.1.10"
CIDL_VERSION="$(cat "$SOURCE_DIR/cockroachdb_version")"

This comment was marked as resolved.

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did :) I think I raced catching that and uploading the file with you seeing the patch

@teisenbe teisenbe linked an issue Nov 24, 2021 that may be closed by this pull request
@teisenbe
Copy link
Contributor Author

Looks like this is failing in docker builds (on the include_str invocation). I'll try to sort out what's up there

@teisenbe
Copy link
Contributor Author

Oh, okay, that was from the first commit.

@david-crespo
Copy link
Contributor

I hate those run failure emails 😁

@teisenbe teisenbe merged commit 9a830b4 into main Nov 24, 2021
@teisenbe teisenbe deleted the check-db-version branch November 24, 2021 00:57
teisenbe added a commit that referenced this pull request Dec 2, 2021
This reverts commit 9a830b4.
The commit broke running under Helios
leftwo added a commit that referenced this pull request Jul 15, 2023
This includes fixes for

Crucible:
Add quota to agent created datasets
crucible issue #835

Propolis:
Ubuntu 22.04 guest: "segfault at 10 ip 00007f68a0fd5b41 sp 00007ffc956aa800 error 6 in libc.so.6" during first boot
Propolis issue #427
---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[omicron-dev] Verify the version of the databases on startup
2 participants