Skip to content

Commit 374f3d3

Browse files
committed
fix: resolve CI failures from new v1 test and gated import
- Update v1::tests::msgpack_roundtrip_preserves_attestation to initialize the newly-added `version`/`hash_input` fields on `TdxEvent` and the `version` field on `RuntimeEvent`. - Move the `cc_eventlog::EventLogVersion` import in attestation.rs behind `#[cfg(feature = "quote")]` since it is only referenced in that gated `impl` block; without the gate, the default `cargo clippy -- -D warnings` run fails with an unused-imports error.
1 parent 796683b commit 374f3d3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

dstack-attest/src/attestation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ pub const TDX_QUOTE_REPORT_DATA_RANGE: std::ops::Range<usize> = 568..632;
1212
use std::{borrow::Cow, time::SystemTime};
1313

1414
use anyhow::{anyhow, bail, Context, Result};
15-
use cc_eventlog::{EventLogVersion, RuntimeEvent, TdxEvent};
15+
#[cfg(feature = "quote")]
16+
use cc_eventlog::EventLogVersion;
17+
use cc_eventlog::{RuntimeEvent, TdxEvent};
1618
use dcap_qvl::{
1719
quote::{EnclaveReport, Quote, Report, TDReport10, TDReport15},
1820
verify::VerifiedReport as TdxVerifiedReport,

dstack-attest/src/v1.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ impl Attestation {
246246
#[cfg(test)]
247247
mod tests {
248248
use super::*;
249+
use dstack_types::EventLogVersion;
249250

250251
#[test]
251252
fn msgpack_roundtrip_preserves_attestation() {
@@ -258,13 +259,16 @@ mod tests {
258259
digest: vec![0xaa, 0xbb, 0xcc],
259260
event: "pod".into(),
260261
event_payload: vec![0xde, 0xad, 0xbe, 0xef],
262+
version: EventLogVersion::V1,
263+
hash_input: None,
261264
}],
262265
},
263266
StackEvidence::DstackPod {
264267
report_data: vec![7u8; 64],
265268
runtime_events: vec![RuntimeEvent {
266269
event: "pod".into(),
267270
payload: vec![0xca, 0xfe, 0xba, 0xbe],
271+
version: EventLogVersion::V1,
268272
}],
269273
config: "{}".into(),
270274
report_data_payload: "{\"hello\":\"world\"}".into(),

0 commit comments

Comments
 (0)