flux2
flux2 copied to clipboard
Refactor fuzzing implementations to support go native feature
Flux has recently implemented an initial coverage of fuzzing across its repositories (xref https://github.com/fluxcd/flux2/issues/2002). At the time of implementation golang did not offer native fuzz testing support, which is yet to be released in golang 1.18.
The proposed refactoring would:
- Build fuzzers using
compile_native_go_fuzzer
instead ofcompile_go_fuzzer
. - Review need to depend on
github.com/AdaLogics/go-fuzz-headers
. - Better integrate with existing tests and reuse private funcs used within controller testing.
- Reuse
testenv
instances across multiple executions to decrease test setup time.
Repositories to be refactored:
- [x] source-controller
- [x] kustomize-controller
- [x] helm-controller
- [x] notification-controller
- [x] pkg
- [x] image-reflector-controller
- [ ] image-automation-controller
Dependencies for this work:
- [x]
oss-fuzz
to support golang native fuzzing - [x]
golang 1.18
to be officially released - [x] Target repository to be upgraded to
golang 1.18
@pjbgf Go 1.18
has officially landed.
@ilanpillemer thanks for the nudge, issue updated accordingly.
We probably will need some upstream dependencies to move on to Go 1.18
before we can do the same - last time around the key dependency was Kubernetes-related if my memory serves me well.
Source controller is the only outstanding controller, which will be dealt with after https://github.com/fluxcd/source-controller/pull/879 is merged.
Now that https://github.com/fluxcd/source-controller/pull/944 has been merged, this is no longer blocked and the SC work is now set to "up-next".