Add Continuous Fuzzing via Fuzzit#5890
Conversation
1159d6e to
23ba2f9
Compare
|
@juliusv @mseinhur ping. Can you review this? |
msiebuhr
left a comment
There was a problem hiding this comment.
While I implemented the first round of fuzzing some time (years?) ago, I must admit not being up to speed with Prometheus nor familiar with fuzzit, so I've stuck to general observations.
There was a problem hiding this comment.
The first comment in fuzzit.sh says it should be called with either "fuzzing" or "local-regression".
There was a problem hiding this comment.
Ah. I see from the bottom of fuzzit.sh that it will auto-select "local-regression" for pull-requests and "fuzzing" for everything else. Perhaps this should be encoded in a special argument? ./fuzzit.sh auto-select-for-travis, so there's no doubt?
There was a problem hiding this comment.
Removed. This is old docs.
There was a problem hiding this comment.
Yes probably we will add something like this in the near future but for now I'm trying to avoid CI specific logic inside the CLI.
There was a problem hiding this comment.
Does it make better sense to write it in a single loop?
TARGETS=("FuzzParseMetric" "...")
for TARGET in "${TARGETS[@]}"
do
go-fuzz-build -libfuzzer -func "$TARGET" -o "$TARGET.a" ./promql
clang -fsanitize=fuzzer "$TARGET".a -o "$TARGET"
rm "$TARGET".a
doneThere was a problem hiding this comment.
Yes this would be better but the problem is that the name of targets on fuzzit and the function names are not the same. i.e -func $TARGET won't work. maybe I can do another array with FUZZ_FUNCTIONS?
There was a problem hiding this comment.
@msiebuhr I change it to one loop, let me know if you think this is better?
There was a problem hiding this comment.
Many places don't install wget by default. curl -s -o fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.23/fuzzit_Linux_x86_64 usually brings better luck.
There was a problem hiding this comment.
I can change this.
There was a problem hiding this comment.
The curl command doesnt work:( so I changed it back to wget it's available in travis so I hope it's not a problem.
9cd54c0 to
298ecda
Compare
There was a problem hiding this comment.
Could you add a comment what this env var is for (since you can't read its contents in the encrypted form here)?
There was a problem hiding this comment.
Could you add more comments here, and also for the go-fuzz-build steps above, to explain what their purpose is (for someone who isn't familiar with all the fuzz tools and steps of fuzzing)?
298ecda to
342ee3f
Compare
|
Thanks! General Prometheus style comment: aim to make comments sentence-style (start capitalized, end with period). Otherwise looks good, though I'm neither a fuzzing nor CI expert. @simonpasquier you are the one with the most touched lines in |
1197af4 to
6eb8b7d
Compare
Signed-off-by: Krzysztof Kowalczyk <kkowalczyk@gmail.com>
6eb8b7d to
4e02365
Compare
|
All checks passes! Let's merge!:) |
simonpasquier
left a comment
There was a problem hiding this comment.
I haven't reviewed the PR in details but in general I'm in favor of consolidating on Circle CI (nothing against Travis but Circle handles the build/release workflow in addition to test while Travis only runs tests). Would it be possible to apply this to .circleci/config.yml instead?
|
Hi @simonpasquier I guess it would be possible. Though It was harder to do that in circle for some reason I don't recall now. Would it be possible to do that in another PR? |
|
I'd rather see it in Circle as eventually we don't want to maintain duplicate CI systems. |
|
Ok, got it. will try to migrate this to Circle now. |
345cbbb to
3a37309
Compare
|
@simonpasquier done. The fuzzing regression passes. This is ready for review. Also some of you need to sign up to https://app.fuzzit.dev and let me know what's your username so I can put as an admin of prometheus. once that done you will need to copy the api key from fuzzit to CircleCI secret as |
|
All checks passes! |
|
@yevgenypats Thanks for all the adjustments, especially the CircleCI port! Looks great to my naive eyes now - in principle ready to merge from my perspective, could you just add the DCO Signed-Off-By line to your last commit so that our DCO check passes? I created a Fuzzit account for my GitHub user (juliusv - julius.volz@gmail.com). |
Signed-off-by: Yevgeny Pats <yp@fuzzit.dev>
3a37309 to
09f6e28
Compare
|
Done. Added you to Prometheus org. You need to copy the api key from here https://app.fuzzit.dev/orgs/prometheus/settings to CircleCi Environment as |
|
@yevgenypats Thanks! I added the environment variable on CircleCI. Gonna merge once the last check turns green :) |
|
Nice!
…On Wed, Aug 21, 2019, 11:44 AM Julius Volz ***@***.***> wrote:
Merged #5890 <#5890> into
master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5890?email_source=notifications&email_token=AD52CDWFTFXIFUOOKW2APJTQFT6ATA5CNFSM4ILRVR62YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTFIZNMA#event-2572261040>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD52CDXF3454HMWZM76SPSLQFT6ATANCNFSM4ILRVR6Q>
.
|
|
Thanks! Could you add me too (simonpasquier - pasquier.simon_at_gmail.com) please? |
|
@simonpasquier done. you should have access now to https://app.fuzzit.dev/orgs/prometheus/dashboard |
|
feel free to RT:) |
This PR adds a continuous fuzzing integration to prometheus's travis pipeline via Fuzzit service.
This means the following:
To take ownership of the organisation, please login to https://app.fuzzit.dev and let me know your account.
Please review and feel free to comment/ask questions.