This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
Onefuzz reports a 'missing field' error for the optional field preserve_existing_outputs #1672
Labels
bug
Something isn't working
Information
Provide detailed reproduction steps (if any)
onefuzz template libfuzzer merge my_project my_build v1.0 my_pool --existing_inputs azure-container-with-files --output_container azure-output-container --target_exe my_libfuzzer.exe --preserve_existing_outputs
This will launch the job without any visible errors:
onefuzz jobs list
to notice that the job immediately fails with a state of stopped. Use the job_id to retrieve the relevant tasks via:onefuzz jobs tasks list {job_id}
.It is worth noting that in the above output, that the task flags show that
preserve_existing_outputs
is set to true which is what is expected when the flag is set in the command line.--preserve_existing_outputs
flag will also produce the same error regarding the missing field. In the task section of the output, thepreserve_existing_outputs
flag is correctly marked as false since the flag was omitted.Expected result
The
preserve_existing_outputs
field is a boolean. As such, it should always have a default value and setting the flag is only necessary when overriding the value. Asonefuzz template libfuzzer merge --help
points out:The libfuzzer merge task should execute appropriately and pass the value for preserve_existing_outputs through the entire workflow.
Actual result
The libfuzzer task is recognizing the flag from the command line since it is correctly showing up in the task output for the job. However, that value is not being passed all the way through the execution flow which results in a missing field error. This error is showing up regardless of whether the flag was passed on the command line.
Other notes
The missing field error appears to come from the handlers.py file for job_templates:
onefuzz/src/cli/onefuzz/job_templates/handlers.py
Line 135 in 1822acf
In the tasks defs for the Azure functions app, preserve_existing_outputs does show up in the
generic_merge
definition:onefuzz/src/api-service/__app__/onefuzzlib/tasks/defs.py
Line 335 in 338b541
However, that field is missing from the
libfuzzer_merge
definition in the same file:onefuzz/src/api-service/__app__/onefuzzlib/tasks/defs.py
Line 216 in 338b541
The field does show up in both the Rust libfuzzer_merge code:
onefuzz/src/agent/onefuzz-agent/src/tasks/merge/libfuzzer_merge.rs
Line 34 in 94e2904
onefuzz/src/cli/onefuzz/templates/libfuzzer.py
Line 399 in b49d140
AB#35875
The text was updated successfully, but these errors were encountered: