monasca-docker icon indicating copy to clipboard operation
monasca-docker copied to clipboard

Fix Travis build issues

Open timothyb89 opened this issue 8 years ago • 3 comments

Our builds are logging way too much and taking too long. https://travis-ci.org/monasca/monasca-docker/builds/273282923 ran for 7 hours (!!!) before being terminated because the log output exceeded 4 MiB. I don't think it's acceptable to abuse Travis's free resources like this, even if accidental.

A few short-term fixes are needed:

  • [x] Fix timothyb89/dbuild#3
  • [x] Put a hard limit on the max number of modules to build, probably ~5 is reasonable
  • [x] Put log output somewhere else. Saving to a GCP bucket is probably a good choice, plus we can split each container's logs for easier reading.

Long term we should also rethink a few things:

  • Consider running Tempest tests using a Travis cron job instead of with every build: https://docs.travis-ci.com/user/cron-jobs/
    • we can have the script file an issue when the build fails
  • Add a max build time restriction for each container build
    • we want to keep this fairly low, say 30 minutes each and 60 minutes total
  • ~~Consider alternative testing strategies so we don't end up in situations with 19 modules being built at once for minor fixes. Not sure what solutions here would be, if any.~~ Fixed in #209

timothyb89 avatar Sep 08 '17 20:09 timothyb89

I just pushed https://github.com/timothyb89/dbuild/commit/4a9b6106963e803d5b483749bfb8779bb5108f81 as a workaround for timothyb89/dbuild#3. This has the immediate effect of removing container build logs from Travis, so we'll want to additionally turn on --build-log-dir=... when running dbuild and then upload logs somewhere at the end of CI jobs.

timothyb89 avatar Sep 08 '17 22:09 timothyb89

Module limit was added in https://github.com/monasca/monasca-docker/pull/209, and https://github.com/monasca/monasca-docker/pull/211 stores logs in a GCS bucket.

timothyb89 avatar Sep 15 '17 18:09 timothyb89

Just pushed timothyb89/dbuild#4

kornicameister avatar Sep 19 '17 11:09 kornicameister