updater #1

Merged
ghe0 merged 13 commits from updater into master 2024-12-25 23:00:16 +00:00
3 changed files with 4 additions and 5 deletions
Showing only changes of commit 29e5de8424 - Show all commits

@ -54,7 +54,6 @@ message UpdateVMReq {
message UpdateVMResp { message UpdateVMResp {
string uuid = 1; string uuid = 1;
string timestamp = 2;
string error = 3; string error = 3;
} }
@ -72,6 +71,7 @@ message VMContract {
string kernel_sha = 11; string kernel_sha = 11;
string dtrfs_sha = 12; string dtrfs_sha = 12;
string created_at = 13; string created_at = 13;
string updated_at = 14;
} }
message ListVMContractsReq { message ListVMContractsReq {

@ -54,7 +54,6 @@ message UpdateVMReq {
message UpdateVMResp { message UpdateVMResp {
string uuid = 1; string uuid = 1;
string timestamp = 2;
string error = 3; string error = 3;
} }
@ -72,6 +71,7 @@ message VMContract {
string kernel_sha = 11; string kernel_sha = 11;
string dtrfs_sha = 12; string dtrfs_sha = 12;
string created_at = 13; string created_at = 13;
string updated_at = 14;
} }
message ListVMContractsReq { message ListVMContractsReq {

@ -148,7 +148,6 @@ async fn handle_update_vm_requests(
while let Some(update_vm) = req.recv().await { while let Some(update_vm) = req.recv().await {
let confirmation = UpdateVmResp { let confirmation = UpdateVmResp {
uuid: update_vm.uuid, uuid: update_vm.uuid,
timestamp: "brain's job".to_string(),
error: "No errors yet".to_string(), error: "No errors yet".to_string(),
}; };
ghe0 marked this conversation as resolved Outdated
Outdated
Review

The timestamp must be set from the brain, for security reasons.
Also, this does not require chrono.

Check this:

src/data.rs Line 191 in 7905c1c165
created_at: format!("{:?}", std::time::SystemTime::now()),

The timestamp must be set from the brain, for security reasons. Also, this does not require chrono. Check this: https://gitea.detee.cloud/ghe0/brain-mock/src/commit/7905c1c165ca6911ad8f3d9f83ff160b2d9dc9bb/src/data.rs#L191
info!("Sending UpdateVmResp: {confirmation:?}"); info!("Sending UpdateVmResp: {confirmation:?}");