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
2 changes: 2 additions & 0 deletions crates/feldera-types/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ pub struct CheckpointMetadata {
/// An optional name for the checkpoint.
pub identifier: Option<String>,
/// Fingerprint of the circuit at the time of the checkpoint.
// Uses the full 64-bit range.
#[schema(format = "uint64")]
pub fingerprint: u64,
/// Total size of the checkpoint files in bytes.
pub size: Option<u64>,
Expand Down
20 changes: 20 additions & 0 deletions crates/rest-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@
use feldera_observability::ReqwestTracingExt;

include!(concat!(env!("OUT_DIR"), "/codegen.rs"));

#[cfg(test)]
mod tests {
use super::types::CheckpointMetadata;

/// Reproduces issue #6841: `fda pipelines`/`fda status` failed to parse
/// any pipeline's checkpoint list once one checkpoint's fingerprint had
/// the high bit set, because the generated `fingerprint` field was `i64`.
/// `format: uint64` on that field (checkpoint.rs) makes progenitor/typify
/// generate `u64` instead, so this must deserialize without error.
#[test]
fn checkpoint_metadata_accepts_fingerprint_above_i64_max() {
let raw = r#"{
"uuid": "00000000-0000-0000-0000-000000000000",
"fingerprint": 14128757731148314856
}"#;
let metadata: CheckpointMetadata = serde_json::from_str(raw).unwrap();
assert_eq!(metadata.fingerprint, 14128757731148314856);
}
}
2 changes: 1 addition & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8475,7 +8475,7 @@
"properties": {
"fingerprint": {
"type": "integer",
"format": "int64",
"format": "uint64",
"description": "Fingerprint of the circuit at the time of the checkpoint.",
"minimum": 0
},
Expand Down
Loading