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

ARROW-6581: [C++] Fix fuzzit job submission #5407

Closed
wants to merge 1 commit into from

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Sep 17, 2019

Also make it faster (we don't need Gandiva here).

@pitrou
Copy link
Member Author

pitrou commented Sep 17, 2019

@yevgenypats

@pitrou
Copy link
Member Author

pitrou commented Sep 17, 2019

@kszucs How do I run the crossbow fuzzit build here?

@pitrou
Copy link
Member Author

pitrou commented Sep 17, 2019

@ursabot crossbow submit -g fuzzit

@ursabot
Copy link

ursabot commented Sep 17, 2019

Invalid value for "--group" / "-g": invalid choice: fuzzit. (choose from docker, integration, cpp-python, conda, wheel, linux, gandiva, nightly)

@pitrou
Copy link
Member Author

pitrou commented Sep 17, 2019

@ursabot crossbow submit docker-cpp-fuzzit

@ursabot
Copy link

ursabot commented Sep 17, 2019

AMD64 Conda Crossbow Submit (#62855) builder has been succeeded.

Revision: 1306f15

Submitted crossbow builds: ursa-labs/crossbow @ ursabot-194

Task Status
docker-cpp-fuzzit CircleCI

@@ -40,11 +41,11 @@ cp ./relwithdebinfo/arrow-ipc-fuzzing-test ./relwithdebinfo/out/fuzzer
ldd ./relwithdebinfo/arrow-ipc-fuzzing-test | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./relwithdebinfo/out/.
cd ./relwithdebinfo/out/
tar -czvf fuzzer.tar.gz *
stat fuzzer.tar.gz
cd ../../

export TARGET_ID=u79f6bXYgNH4NkU99iWK
export FUZZIT_API_KEY=${FUZZIT_API_KEY:-ac6089a1bc2313679f2d99bb80553162c380676bff3f094de826b16229e28184a8084b86f52c95112bde6b3dbb07b9b7}
Copy link
Contributor

Choose a reason for hiding this comment

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

this is also no longer necessary. go to https://app.fuzzit.dev/orgs/apache-arrow/settings and copy the new API Key to crossbow environment variables (I don't have access to this)

Copy link
Member Author

Choose a reason for hiding this comment

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

But we'd like the docker-compose setup to be runnable from a local machine, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

so there are two workflows fuzzing and regression.

fuzzing usually should only run from the CI when you push new code to master as this update the fuzzer on Fuzzit servers.

Regression is currently not enabled as far as I can see in this project. to enable regression you need to run the same ./fuzzit create job .... but with --type local-regression. this you can run from local machine as well and you don't need an api key for that at all.

To setup the regression in the CI you want to run it on every pull-request or even every commit. the fuzzing workflow should be called only on new pushed to master. I'm not sure how to do it with crossbow but I guess it shouldn't be too complicated.

(Hope it wasn't too confusing:))

Copy link
Member Author

Choose a reason for hiding this comment

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

@kszucs How would we create an environment variable in crossbow?

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to have a separate docker-compose entries for the two fuzzit jobs.

  fuzzit:
    image: arrow:fuzzit
    build:
      context: .
      dockerfile: dev/fuzzit/Dockerfile
    environment:
      CI_ARROW_SHA: ${CI_ARROW_SHA}
      CI_ARROW_BRANCH: ${CI_ARROW_BRANCH}
    volumes: *ubuntu-volumes

  fuzzit-regression:
    image: arrow:fuzzit
    build:
      context: .
      dockerfile: dev/fuzzit/Dockerfile
    environment:
      CI_ARROW_SHA: ${CI_ARROW_SHA}
      CI_ARROW_BRANCH: ${CI_ARROW_BRANCH}
      # arbitrary env variables
    volumes: *ubuntu-volumes

Then we can run docker-compose run fuzzit and docker-compose run fuzzit-regression locally. After that we can setup specific crossbow tasks to run either one or both of them.

@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2019

@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2019

Also, local regression job doesn't seem to work from a Docker container:

+ ./fuzzit create job --type local-regression --host bionic-llvm7 --revision --branch apache-arrow/arrow-ipc-fuzzing ./relwithdebinfo/out/fuzzer.tar.gz
2019/09/23 16:38:36 FUZZIT_API_KEY is not set. continue with public auth...
2019/09/23 16:38:36 Creating job...
2019/09/23 16:38:36 Pulling container bionic-llvm7
2019/09/23 16:38:36 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Also make it faster (we don't need Gandiva here).
@yevgenypats
Copy link
Contributor

@pitrou can you retry now, you hit a bug that I already fixed but look like the fix did not propagate to your account, should work now.

Regarding regression - Yes because regression spawns a docker so it will have a reproducible environment. If you want to run it from docker you need to mount the docker socket like here for example https://github.com/envoyproxy/envoy/pull/7509/files#diff-1dea4de506864476f95ae5a444472fe1R26

I created a fuzzing job and look like it works now https://app.fuzzit.dev/orgs/apache-arrow/targets/arrow-ipc-fuzzing/oRj7teBuJbxHAQhVPMNe

@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2019

@ursabot crossbow submit docker-cpp-fuzzit

@ursabot
Copy link

ursabot commented Sep 23, 2019

AMD64 Conda Crossbow Submit (#64665) builder has been succeeded.

Revision: 2628a74

Submitted crossbow builds: ursa-labs/crossbow @ ursabot-216

Task Status
docker-cpp-fuzzit CircleCI

@yevgenypats
Copy link
Contributor

@pitrou can you also update the CLI to v2.4.56 (I fixed a bug related to the bionic-llvm7 docker you use - this only affects regression)

@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2019

The script uses "latest", so it shouldn't need an update?

@yevgenypats
Copy link
Contributor

yevgenypats commented Sep 23, 2019 via email

@pitrou
Copy link
Member Author

pitrou commented Sep 24, 2019

@kszucs Do you think this is ok to merge?

@pitrou
Copy link
Member Author

pitrou commented Oct 2, 2019

@kszucs Ping.

@kszucs
Copy link
Member

kszucs commented Oct 2, 2019

Seems so, reviewing.

@kszucs
Copy link
Member

kszucs commented Oct 2, 2019

R build failure is unrelated. We'll be able to set the required environment variables in the crossbow template file using {{ arrow.branch }} and {{ arrow.head }} (which is the head commit's SHA) jinja variables.

Copy link
Member

@kszucs kszucs left a comment

Choose a reason for hiding this comment

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

LGTM

@kszucs
Copy link
Member

kszucs commented Oct 2, 2019

We'll need a follow-up PR to add the crossbow tasks.

@kszucs kszucs closed this in 48b56bd Oct 2, 2019
@pitrou pitrou deleted the ARROW-6581-fix-fuzzit-job branch October 2, 2019 21:30
kszucs pushed a commit that referenced this pull request Oct 5, 2019
Also make it faster (we don't need Gandiva here).

Closes #5407 from pitrou/ARROW-6581-fix-fuzzit-job and squashes the following commits:

2628a74 <Antoine Pitrou> ARROW-6581:  Fix fuzzit job submission

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.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.

None yet

4 participants