Skip to content

Setup OneFuzz for CI#10431

Merged
46 commits merged intomainfrom
dev/cazamor/onefuzz/setup
Jan 21, 2022
Merged

Setup OneFuzz for CI#10431
46 commits merged intomainfrom
dev/cazamor/onefuzz/setup

Conversation

@carlos-zamora
Copy link
Member

Summary of the Pull Request

This PR sets up a OneFuzz pipeline on Azure DevOps for our repo.

Detailed Description of the Pull Request / Additional comments

  • fuzz.yml: defines the stages and pipeline for ADO
  • build-console-fuzzing: builds the solution in the Fuzzing configuration
  • build-console-steps: omits a few tasks that are unnecessary for this build configuration
  • sln and vcxproj changes: the solution wasn't building in CI. This makes sure that's fixed.
  • fuzzing.md: a short guide on how to get OneFuzz set up and add a new fuzzer

References

#7638

@carlos-zamora carlos-zamora requested review from DHowett and miniksa June 15, 2021 18:29
@github-actions

This comment has been minimized.

@miniksa
Copy link
Member

miniksa commented Jun 15, 2021

This looks promising!


### Enabling notifications

**NOTE**: Our pipeline is already set up with this functionality. However, here is a quick guide on how to get it set up and modify it to our liking.
Copy link
Member Author

Choose a reason for hiding this comment

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

Discussion

This isn't strictly true yet. In fact, it seems like we won't be getting much benefit yet until we set up notifications. The question is, what do we want to see here.

Copy link
Member

Choose a reason for hiding this comment

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

I like the multiple notification systems. We for-sure need it to be writing our bugs to our Azure Devops path. But I think we could resurrect the Notifications channel in Teams for this sort of thing. Can it send email? I'm just concerned it needs to be someplace we look frequently because when we are running Helix tests nightly... we keep missing the failures since it doesn't have adequate notification capability set up.

Copy link
Member Author

Choose a reason for hiding this comment

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

I forget why exactly, but I remember speaking with Dustin about this over the summer, and there was some kind of issue with Teams specifically. For now, I've set up the notification system to generate ADO work items and assign them to me.

Copy link
Member

Choose a reason for hiding this comment

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

No idea honestly.

Comment on lines 50 to 54
- bash: |
set -ex
pip -q install onefuzz
onefuzz config --endpoint $(endpoint) --client_id $(client_id) --client_secret $(client_secret)
onefuzz template libfuzzer basic OpenConsole WriteCharsLegacy $(commitSHA1) windows --target_exe $(artifactsPath)/$(publishedArtifactsPath)/Fuzzing/x64/test/OpenConsoleFuzzer.exe
Copy link
Member Author

Choose a reason for hiding this comment

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

One limitation right now is that this is just running one fuzzer. But we also only have one fuzzer.

So we'll have to make a minor change here once we get more fuzzers.

Copy link
Member

Choose a reason for hiding this comment

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

Could you make the rest of the path one of your inputs so we can easily adapt it in the future? It could then just turn into a template super quick.

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

If it works, it works. Thanks for pulling this together, Carlos.


### Enabling notifications

**NOTE**: Our pipeline is already set up with this functionality. However, here is a quick guide on how to get it set up and modify it to our liking.
Copy link
Member

Choose a reason for hiding this comment

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

No idea honestly.

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 16, 2021
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Dec 24, 2021
@ghost
Copy link

ghost commented Dec 24, 2021

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@miniksa miniksa removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Dec 28, 2021
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 4, 2022
@zadjii-msft zadjii-msft removed their assignment Jan 4, 2022
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Let's do this!

@carlos-zamora
Copy link
Member Author

DO NOT AUTOMERGE

My internet is really bad this week since I'm working remotely. So I'm gonna hold off on merging this until I get back to a stable connection (since this PR will create ADO tasks and assign them to me).

NOTE: I still need to make that one-line change to activate notifications. So I'll do that next week and merge it so I can stay on top of it. Thanks all!

@carlos-zamora
Copy link
Member Author

@msftbot merge this in 5 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 21, 2022
@ghost
Copy link

ghost commented Jan 21, 2022

Hello @carlos-zamora!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 21 Jan 2022 17:52:49 GMT, which is in 5 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit 68ab807 into main Jan 21, 2022
@ghost ghost deleted the dev/cazamor/onefuzz/setup branch January 21, 2022 18:24
ghost pushed a commit that referenced this pull request Feb 15, 2022
## Summary of the Pull Request
Modifies the OneFuzz CI Job so that it attempts to read the notification config from a file rather than the command line.

## References
Potential oversight in #10431.

## PR Checklist
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA

## Detailed Description of the Pull Request / Additional comments
Noticed that the CI job was failing on main, so took a look. According to the [docs](https://github.com/microsoft/onefuzz/blob/7f7d76fa7fd0e351f8ffd8c7aa5c5729e30f9e8f/docs/notifications.md#implementation), files should be referenced using `@./` notation.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoMerge Marked for automatic merge by the bot when requirements are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants