Skip to content

Commit 17873d4

Browse files
committed
fix da job error
1 parent 8fa355d commit 17873d4

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

orchestrator/src/worker/event_handler/jobs/snos.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,8 @@ impl JobHandlerTrait for SnosJobHandler {
180180
}
181181

182182
debug!("Storing SNOS outputs");
183-
if config.layer() == &Layer::L2 {
184-
// Store the Cairo Pie path
185-
self.store(internal_id.clone(), config.storage(), &snos_metadata, cairo_pie, os_output, program_output)
186-
.await?;
187-
}
183+
// Store the Cairo Pie path
184+
self.store(internal_id.clone(), config.storage(), &snos_metadata, cairo_pie, os_output, program_output).await?;
188185

189186
info!(log_type = "completed", job_id = %job.id, "✅ {:?} job {} processed successfully", JobType::SnosRun, internal_id);
190187

orchestrator/src/worker/utils/fact_info.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ mod tests {
281281
use cairo_vm::vm::runners::cairo_pie::CairoPie;
282282
use rstest::rstest;
283283

284-
use super::get_fact_info;
284+
use super::{get_fact_info, get_program_output};
285285

286286
#[rstest]
287287
#[case("fibonacci.zip", "0xca15503f02f8406b599cb220879e842394f5cf2cef753f3ee430647b5981b782")]
@@ -295,4 +295,16 @@ mod tests {
295295
let fact_info = get_fact_info(&cairo_pie, None, false).unwrap();
296296
assert_eq!(expected_fact, fact_info.fact.to_string());
297297
}
298+
299+
#[ignore]
300+
#[rstest]
301+
#[case("0.zip")]
302+
async fn test_program_output(#[case] cairo_pie_path: &str) {
303+
dotenvy::from_filename_override("../.env.test").expect("Failed to load the .env.test file");
304+
let cairo_pie_path: PathBuf =
305+
[env!("CARGO_MANIFEST_DIR"), "src", "tests", "artifacts", cairo_pie_path].iter().collect();
306+
let cairo_pie = CairoPie::read_zip_file(&cairo_pie_path).unwrap();
307+
let program_output = get_program_output(&cairo_pie, false).unwrap();
308+
println!("the program output is {:?}", program_output);
309+
}
298310
}

0 commit comments

Comments
 (0)