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

Add support for adhoc fuzzer job #7810

Closed
wants to merge 3 commits into from
Closed

Add support for adhoc fuzzer job #7810

wants to merge 3 commits into from

Conversation

kgpai
Copy link
Contributor

@kgpai kgpai commented Nov 30, 2023

This PR will allow us to run adhoc fuzzer job against ,
1 . Any branch / sha
2. Configure the build process for threads/linkjobs/ Cmake flags for additional customizability.

The job can be accessed via the Github Actions UI.
This should be useful for us in cases, where we would like to test more fuzzer coverage whithout having to have the code checked in and waiting for the nightly run.

Copy link

netlify bot commented Nov 30, 2023

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 9b4138a
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6568e18e642ab30008fe8093

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 30, 2023
@kgpai kgpai requested review from bikramSingh91, pedroerp, laithsakka and assignUser and removed request for pedroerp November 30, 2023 19:19
@facebook-github-bot
Copy link
Contributor

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Collaborator

@assignUser assignUser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, looks good overall, a few comments.

These are always a hassle to test as you have to merge them to the default branch before you can use them (or test on a fork...)

Comment on lines +19 to +21
branchRef:
description: 'Branch to checkout out'
default: 'main'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename to ref as the checkout action takes branches or refs for its ref: input.

Suggested change
branchRef:
description: 'Branch to checkout out'
default: 'main'
ref:
description: 'Branch or ref to checkout out'
default: 'main'

Comment on lines +53 to +54
submodules: 'recursive'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the other checkouts to enable running on a different ref:

Suggested change
submodules: 'recursive'
ref: "${{ inputs.ref }}"
submodules: 'recursive'


- name: "Build"
run: |
make debug NUM_THREADS="${{ github.event.inputs.numThreads }}" MAX_HIGH_MEM_JOBS="${{ github.event.inputs.maxHighMemJobs }}" MAX_LINK_JOBS="${{ github.event.inputs.maxLinkJobs }}" EXTRA_CMAKE_FLAGS="${{ github.event.inputs.extraCMakeFlags }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the inputs context directly. See https://docs.github.com/en/actions/learn-github-actions/contexts#inputs-context for details

Suggested change
make debug NUM_THREADS="${{ github.event.inputs.numThreads }}" MAX_HIGH_MEM_JOBS="${{ github.event.inputs.maxHighMemJobs }}" MAX_LINK_JOBS="${{ github.event.inputs.maxLinkJobs }}" EXTRA_CMAKE_FLAGS="${{ github.event.inputs.extraCMakeFlags }}"
make debug NUM_THREADS="${{ inputs.numThreads }}" MAX_HIGH_MEM_JOBS="${{ inputs.maxHighMemJobs }}" MAX_LINK_JOBS="${{ inputs.maxLinkJobs }}" EXTRA_CMAKE_FLAGS="${{ inputs.extraCMakeFlags }}"

submodules: 'recursive'

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also run this in the same docker container used in cci via container: but we can do that in a follow up as this job is not run regularly.

description: 'Additional CMake flags'
default: '-DVELOX_ENABLE_ARROW=ON'


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch is privileged trigger so we want to limit permissions to the necessary minimum.

Suggested change
permissions:
contents: read


name: "Adhoc Fuzzer Jobs"

on:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to also add pull_request with a path filter set to this workflow that changes to the workflow can be tested when submitting a PR but that will also require some additional defaults as there will be no inputs iirc.

@assignUser
Copy link
Collaborator

Closed in favor of #7842

@assignUser assignUser closed this Dec 8, 2023
facebook-github-bot pushed a commit that referenced this pull request Dec 8, 2023
Summary:
This PR tackles several issues with the scheduled fuzzer workflow:
- workaround compilation being OOMkilled by using only 8 threads and using `mold` as a linker
  - this is a stopgap measure only, we should really look at our build times/footprint and see how we can optimize that as a 45 minute build on an 8 core machine is pretty massive.
- only compile once (saves ~ 1.5h of CI time)
- use actions/cache to save the ccache to further improve build times
- add `workflow_dispatch` trigger to enable ad hoc runs of the fuzzer jobs
- add `pull_request` trigger to enable testing of the workflow in PRs (like this one ^^)
  - we could easily move the remaining CCI fuzzer job over to this workflow as well

Reverts #7811 to use 8-core machines again. Supersedes #7810

Pull Request resolved: #7842

Reviewed By: mbasmanova

Differential Revision: D51960006

Pulled By: kgpai

fbshipit-source-id: 0f493f80d5a87cca20bd53f1074a5f4622ee02b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants