ComplianceAsCode / auditree-framework

The Auditree framework tool to run compliance control checks as unit tests.
https://auditree.github.io/
Apache License 2.0
59 stars 23 forks source link

Re-run store_derived_evidence fetchers #161

Closed rhyshort closed 1 month ago

rhyshort commented 1 month ago

What

Ensure store_derived_evidence fetchers are re-run if dependent evidence is not yet available, this is achieved by get_evidence_dependency, rather than get_evidence_by_path.

Why

When running fetchers that store derived evidence, they often rely on evidence from previous fetchers, however if this evidence is not available the fetcher fails and is not automatically re-run because the store_derived_evidence function does not treat source evidence as dependency that can be re-run.

How

Test

Context

drsm79 commented 1 month ago

Good to hear from you Rhys. Is it possible to test the condition you describe? And show it fail before and succeed after the patch?

rhyshort commented 1 month ago

Yeah, I'll get the test case written

rhyshort commented 1 month ago

done

cletomartin commented 1 month ago

Thanks Rhys!

rhyshort commented 1 month ago

@cletomartin I don't have commit rights, could you merge please? 😄

drsm79 commented 1 month ago

Merging, thanks @rhyshort