Skip to content
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

fluxcd: Add auto discovery for Go Native fuzz targets #9064

Merged
merged 1 commit into from
Nov 25, 2022
Merged

fluxcd: Add auto discovery for Go Native fuzz targets #9064

merged 1 commit into from
Nov 25, 2022

Conversation

pjbgf
Copy link
Contributor

@pjbgf pjbgf commented Nov 24, 2022

Add support for auto discovery and build for all Go Native fuzz targets that exist within the range of Flux org repos defined.

Support for faster CI checks by only targeting the specific project when running against PRs.

(cc: @stefanprodan @hiddeco)


Would there be interest on having loop_through_org_repositories as part of infra?
This would enable Go Native projects to have auto discovery of fuzzers without the need of calling compile_native_go_fuzzer for each fuzzer they add into their repos.

@AdamKorcz
Copy link
Collaborator

Would there be interest on having loop_through_org_repositories as part of infra?

There are a few edge cases that would break if this would not be optional. I would not rule out the usefulness, though. Perhaps we can see how it runs on Flux and consider offering it as part of the infra?

@pjbgf
Copy link
Contributor Author

pjbgf commented Nov 25, 2022

@AdamKorcz the idea was to make it optional and just be a single call. But I agree with the approach, let see how it plays out.

I made a slight change, I added FLUX_CI as I want to build the fuzzers for a single repo when this is being executed within that repo's CI checks. The closest to that I found in use here was OSS_FUZZ_CI, but that also applies to the oss-fuzz checks. Is there a better way to know when this is being executed via the cifuzz GitHub actions in the target repo?

@pjbgf
Copy link
Contributor Author

pjbgf commented Nov 25, 2022

The build failure is due to the lack of libgit2 linking, which is resolved by #9063.

Add support for auto discovery and build of all Go Native
fuzz targets that exist within all repos from the target
org.

Support for faster CI checks by only targeting the specific project when
running against PRs.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
@DavidKorczynski DavidKorczynski enabled auto-merge (squash) November 25, 2022 17:28
@DavidKorczynski DavidKorczynski merged commit 254890e into google:master Nov 25, 2022
@pjbgf pjbgf deleted the auto-discovery branch November 25, 2022 18:07
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
Add support for auto discovery and build for all Go Native fuzz targets
that exist within the range of Flux org repos defined.

Support for faster CI checks by only targeting the specific project when
running against PRs.

(cc: @stefanprodan @hiddeco)

---
Would there be interest on having `loop_through_org_repositories` as
part of infra?
This would enable Go Native projects to have auto discovery of fuzzers
without the need of calling `compile_native_go_fuzzer` for each fuzzer
they add into their repos.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants