Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Cleaning after go-ipfs jobs #70

Open
victorb opened this issue Aug 2, 2018 · 2 comments
Open

Cleaning after go-ipfs jobs #70

victorb opened this issue Aug 2, 2018 · 2 comments

Comments

@victorb
Copy link
Contributor

victorb commented Aug 2, 2018

Right now, after having the workers running for a while, they run out of space since the go-ipfs job does not clean up after itself.

From IRC:

[2018-06-04 11:34:06] <daviddias> victorbjelkholm: Mac OS X workers are dying on Jenkins
[2018-06-04 11:34:26] <victorbjelkholm> oh, no goodie
[2018-06-04 11:38:26] <victorbjelkholm> Magik6k_: go-ipfs Jenkinsfile seems to be missing a call to `cleanWs` in the end of the pipeline, could you add it?
[2018-06-04 11:50:27] <Magik6k_> victorbjelkholm: the problem is that calling cleanws in pipeline will make the job about 2x slower. Is there a way to tell jenkins to remove workspace after they aren't used for some time?
[2018-06-04 11:51:10] <victorbjelkholm> hm, probably we should setup a job that once every day removes all inactive workspaces then
[2018-06-04 11:51:43] <Magik6k_> yeah, if that's possible it would be great
[2018-06-04 11:52:07] <victorbjelkholm> hm, why it takes so long time though? js-ipfs cleanWS takes < 1 second, and that's with all the node modules and jazz
[2018-06-04 11:53:32] <Magik6k_> it's gx that needs to re-get all stuff for the builds (build time goes up from 7 to 16min on fresh workspaces)

We need to find a way of caching the gx packages outside of the workspace on the workers. Pinning them on the master and running IPFS on the macOS workers would make the install speed trivial, and the workers not needing to keep the builds around for more than necessary.

  • Pin all gx packages on jenkins master (already running IPFS)
  • Install and run go-ipfs on macOS workers
  • Setup go-ipfs (and golang pipelines in general) to install gx packages from IPFS
  • Clean workspace after go-ipfs jobs

@magik6k sounds like a reasonable idea?

From @magik6k

getting gx deps tends to be slow even with local node, but whyrusleeping/gx-go#38 should help with that, so yeah, that can work

Moved from https://github.com/ipfs/jenkins-libs/issues/15

@victorb
Copy link
Contributor Author

victorb commented Aug 14, 2018

@magik6k can you confirm that the cleanup now happens when go projects are done building and testing? Also in case of failures.

@magik6k
Copy link

magik6k commented Aug 14, 2018

go-ipfs should be cleaning up - https://github.com/ipfs/go-ipfs/blob/master/ci/Jenkinsfile#L95, not sure about other go projects

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants