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

investigate speeding up CI builds #617

Closed
rdallman opened this issue Dec 21, 2017 · 13 comments
Closed

investigate speeding up CI builds #617

rdallman opened this issue Dec 21, 2017 · 13 comments
Assignees

Comments

@rdallman
Copy link
Contributor

  • we pull a lot of images
  • it's not immediately clear what's slow because we use shell scripts for the tests and CI only reports the whole script as a stage (i.e. break these up to debug)
  • master builds some images, maybe that is slow too?
  • see what else may take a while and speed it up!
@skinowski
Copy link
Member

Recent addition of fn-test-utils image increased this significantly. Looking into it.

@skinowski skinowski self-assigned this Dec 21, 2017
@skinowski
Copy link
Member

#619 related

@skinowski
Copy link
Member

Extensions and middleware compilations at the end of test.sh script is taking forever since 'go build' goes seem to perform incremental builds.

@skinowski
Copy link
Member

Identified the real culprit in this, looks like fn-test-utils container stays in a busy-loop spewing errors. See:

fnproject/fdk-go#8

This causes rest of the build to take forever.

@skinowski
Copy link
Member

Also a poor man's attempt to speed up a few things in test.sh and release.sh:

#620

@skinowski
Copy link
Member

Container leak workaround in runner_test.go:

#622

@denismakogon
Copy link
Member

make docker-build, we use vanilla go 1.9 alpine image and we do install there few more packages, so could someone tell if we can create our own version of go 1.9 alpine with all of that packages and just use that as the base image for build fnserver image? It takes a lot of time in CI.

@denismakogon
Copy link
Member

swagger image is damn huge for just one binary file, almost half a gig. Maybe we can just pull binary release from here https://github.com/go-swagger/go-swagger/releases and use that binary instead whole image?

@denismakogon
Copy link
Member

Middleware and extensions: CI builds at least 2 different binaries for those to see if API is not broken. So, just specifically for testing, can’t we go with 1 example that includes both middleware and extension?

@denismakogon
Copy link
Member

Datastore images: mysql, redis, postgres, minio are huge, we need to get smaller (alpine?) images for testing in CI.

@skinowski
Copy link
Member

Played around with #625 an attempt to reduce shell script stuff into Makefile itself. Brings the build down to 14 min.

@rdallman
Copy link
Contributor Author

rdallman commented Jan 2, 2018

down to 5 minutes now. awesome, thanks!

some more ideas:

#629 (comment)
#629 (comment)

@rdallman
Copy link
Contributor Author

rdallman commented Jan 2, 2018

4 minutes and change now.

the go install caching, if possible, should save about another minute off. would be sweet, but this is pretty bearable for now. we could leave this open I guess as ongoing but seems like we're in a pretty good spot

@rdallman rdallman closed this as completed Jan 2, 2018
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

No branches or pull requests

3 participants