diff --git a/packages/talos_certifier/src/services/certifier_service.rs b/packages/talos_certifier/src/services/certifier_service.rs index dde7df1f..bc1a041e 100644 --- a/packages/talos_certifier/src/services/certifier_service.rs +++ b/packages/talos_certifier/src/services/certifier_service.rs @@ -5,6 +5,7 @@ use async_trait::async_trait; use log::{debug, error, warn}; use talos_suffix::core::SuffixConfig; use talos_suffix::{get_nonempty_suffix_items, Suffix, SuffixTrait}; +use time::format_description::well_known::Rfc3339; use time::OffsetDateTime; use tokio::sync::mpsc; @@ -150,9 +151,14 @@ impl CertifierService { Some(ChannelMessage::Candidate(candidate)) => { let decision_message = self.process_candidate(&candidate.message)?; + let mut headers = candidate.headers.clone(); + if let Ok(cert_time) = OffsetDateTime::now_utc().format(&Rfc3339) { + headers.insert("certTime".to_owned(), cert_time); + } + let decision_outbox_channel_message = DecisionOutboxChannelMessage { message: decision_message.clone(), - headers: candidate.headers.clone(), + headers, }; Ok(self diff --git a/packages/talos_certifier/src/services/decision_outbox_service.rs b/packages/talos_certifier/src/services/decision_outbox_service.rs index 573bbd63..68c0e055 100644 --- a/packages/talos_certifier/src/services/decision_outbox_service.rs +++ b/packages/talos_certifier/src/services/decision_outbox_service.rs @@ -95,7 +95,6 @@ impl DecisionOutboxService { decision_publish_header.insert("certSafepoint".to_string(), safepoint.to_string()); } decision_publish_header.insert("certAgent".to_string(), decision_message.agent.to_owned()); - // decision_publish_header.insert("certTime".to_string(), decision_message.safepoint.to_owned()); debug!("Publishing message {}", decision_message.version); publisher