Versions and compatibility
Downrange writes files people keep (mission files, recordings) and speaks a protocol between two programs that can be installed separately. Each of those has its own version number. downranged --version prints all of them:
downranged 0.2.0-alpha.1 (stream protocol 4, mission schema 2, recording format 1)
The constants live in one place: crates/downrange-core/src/version.rs.
What is versioned #
| Thing | Where the number is | Current | Checked when |
|---|---|---|---|
| Application | Cargo.toml workspace version; --version on every binary; HELLO.daemon_version; downrange_version in recordings |
0.1.0-alpha.1 | Shown, never used to refuse |
| Client stream protocol | HELLO.protocol |
4 | A client connects |
| Mission schema | downrange_schema = 2, first line of the mission file |
2 (reads 1 and 2) | A mission file is loaded |
| Dashboard layout | downrange_layout = 1, first line of a layout file |
1 | A layout file is loaded. A missing key means 1 |
| Configuration format | The mission file is the only configuration file, so this is the mission schema | 2 | |
| Recording format | recording_format in the downrange.mission metadata record of the MCAP file |
1 | A recording is opened |
| Analysis models | Component ids such as vertical-kf/0.1, sent in HELLO.analysis.components, attached to every prediction and event, and written to recordings as analysis_models |
see downranged verify |
A recording is verified or replayed |
| VTP wire format | Version byte in every frame header | 0 | Every frame |
Rules #
- A newer file is refused, with a message that says what to do. A build that understands recording format 1 will not open format 2. It says the file is newer and that Downrange should be upgraded. It never guesses.
- An older file is read if this build still knows how. Recordings made before version keys existed (0.1.0-dev) have no
recording_format. They are read as before and reported asrecording_format: null. - A mission file without
downrange_schemais read as schema 1, with a warning. Add the key. A later release will require it. - The stream protocol must match exactly. The daemon and the workstation ship together. On a mismatch the client reports both versions and which side to upgrade. It does not try to interpret the stream.
- Different analysis models are a warning, not an error. A recording holds raw frames, so it can always be decoded. If the models that produced the live results differ from the ones in this build,
verifyandreplaysay so (analysis_models_differ), because the replayed analysis will not match what the operator saw live. With the same data, mission file and models, live and replay results are identical, and tests check that by digest. - Any change to a number above is listed in
CHANGELOG.mdunder "Breaking".
Before 1.0 #
- The stream protocol, mission schema and recording format may each change in any 0.x release. Each change bumps the number.
- Recordings are the thing people keep longest. The aim is that every 0.x release can read every recording made by an earlier 0.x release. That is an aim, covered by a test for the pre-version layout, and not yet a promise.
- The Rust API of the crates is not stable. Nothing is published to crates.io yet.
- Alpha releases are for evaluation and development. See the release notes for what that means.
Tests #
| Test | What it shows |
|---|---|
version::tests::newer_versions_are_refused_with_a_message_that_says_what_to_do |
The shared check |
schema::tests::schema_version_is_checked |
Mission schema 7 and 0 are refused |
release::a_mission_file_from_a_newer_schema_is_refused_and_a_missing_key_is_a_warning |
Same through downranged run; missing key warns |
release::a_recording_from_a_newer_format_is_refused_with_a_message_that_says_what_to_do |
verify, replay and export all fail cleanly on format 99 |
release::a_recording_written_before_version_keys_existed_still_reads |
Backward compatibility with 0.1.0-dev recordings |
release::a_recording_made_with_different_analysis_models_says_so_on_verify |
Model mismatch is reported; a fresh recording matches |
ipc::tests::hello_round_trip_and_version_check |
Protocol mismatch names both versions and the side to upgrade |
release::every_binary_reports_its_version |
--version |