-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align version of dependencies when Fuzzing #2552
Comments
Hi @pjbgf , why is this a good first issue? I am looking around for good first issue to look at. |
Hey @ilanpillemer, this is a straightforward change that needs to be consistent across all repositories. The first part is pretty much ensure that we remove Feel free to propose a PR and tag me for review. |
@pjbgf I did a grep on the first file in the list (for
|
@ilanpillemer that's correct, in the |
@pjbgf as far as I could understand when eyeballing the |
@ilanpillemer I think the only additional thing was the |
@pjbgf I didnt use the |
@ilanpillemer that should not be a problem, as it is simply updating the reference against "itself" locally. |
@pjbgf I didn't think it was a problem, as I was assuming it was ephemeral either way. Just mentioned it, in case there was some edge case funny that was not intuitive to me. |
The fuzz testing should be running against the same dependency versions that are used during testing and release of controllers, for improved reliability of the results.
In projects that depend on
libgit2
(e.g.source-controller
andimage-automation-controller
) this is even more so, as bothgit2go
andlibgit2
must be within a specific version range for them to work together.The current implementation manages the fuzzing test code into a secondary go module (i.e.
./tests/fuzz
) to avoid contaminating themain
go.mod
with numerous dependencies that are not required for the controllers to run. This resulted in a few adhoc solutions which are not currently fully aligned across the projects.The main change required is for
go mod tidy
to be replaced with ago get -d github.com/AdaLogics/go-fuzz-headers
in projects in which the fuzzing code is copied back into the main modules:https://github.com/fluxcd/pkg/blob/main/tests/fuzz/oss_fuzz_build.sh#L37
https://github.com/fluxcd/notification-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L48
https://github.com/fluxcd/kustomize-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L41
https://github.com/fluxcd/image-reflector-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L29
https://github.com/fluxcd/helm-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L33
In some projects the fuzz test runs on its own module, meaning that it requires a copy of the current project
go.mod
on top of the removal ofgo mod tidy
:https://github.com/fluxcd/source-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L57-L81
https://github.com/fluxcd/image-automation-controller/blob/main/tests/fuzz/oss_fuzz_build.sh#L92
This should no longer be required once #2417 lands.
The text was updated successfully, but these errors were encountered: