-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
eeb14f3
to
50cd27a
Compare
@ipfs/javascript-team please let me know what you think of this. It'll make pipelines that succeeds without any failures to be a bit slower but since we can restart each stage if it fails, it gives us a huge benefit for js-ipfs and other flaky projects. |
This looks great, being able to restart individual steps without having to retrigger the whole build will be a massive win.
Running coverage also runs the tests though, so maybe we'd just run coverage as part of the Linux build? We might have OS-specific code branches though, so a neat improvement (for a later PR) would be to run coverage on each platform, save the generated file as a build artifact of that step then have a post-test step that collates all the platform coverage reports together and publishes stats based on that. |
Thanks for taking a look @achingbrain!
I initially put it together with the "Checks" stage so it runs first. My thought behind putting it in the back is specifically regarding js-ipfs where Maybe we could run |
I think that's what I was suggesting as the 'improvement'. Not sure if you'd be able to just concat the reports together, might need to parse the files instead and do something a clever. Needs a bit of experimenting, though I doubt we're the first people to have this problem so there might be something out there already we can use. If you ran |
Hm? browser-specific codepaths are exercised in separate steps as we run both
Yeah, probably. I think up-until now we have only code-coverage on Linux, so at least this change is not making the situation worse. But agree that we can make it better. |
I just mean that if you only instrument the code for running under node, the generated coverage report would not contain any browser-specific code paths since they aren't executed but might be during the Anyway, this is great, we should get it in and worry about improving the coverage stuff later. |
9c29b0d
to
b9df0fb
Compare
This commit changes the old scriptable pipeline into a declarative pipeline. Benefits are: - Everything split into stages that can be restarted if needed without restarting the entire pipeline - Future possibility to cache stashes between builds (not having to run `npm install` on every build if previously successful) - Faster reporting of `node | browser | webworker` CI status since we run platforms sequentially with this commit - Better support and stability from Jenkins (development efforts are focused on declerative pipelines) Drawbacks: - If the entire build itself is fully successful, it'll take longer than before as stashing/unstashing adds some build time. Missing changes: - Confirmation from JS-team on the order of tests - We might want to run `coverage` before platform tests etc etc - Flaky tests should end up last, so we retry as little of the pipeline as possible License: MIT Signed-off-by: Victor Bjelkholm <git@victor.earth>
b9df0fb
to
3fa8e10
Compare
@diasdavid everything is not run in parallel because of 1) ipfs-inactive/dev-team-enablement#113, I could try it again with the new declarative pipeline that this PR introduces, but chances are it has the same effect 2) if everything is run in parallel, means that when restarting the stage, it'll rerun all the tests for all the platforms when chances are it only failed in one |
Thanks you Victor this looks great!!
some notes on cov: regarding cov i think we could instrument with nyc only on the linux pipeline (including node and browser) and make the coverage job dependent on the linux pipeline. |
Hey @victorbjelkholm, thanks so much for pushing this forward. This addresses, in part, most of the issues I rasied in ipfs-inactive/dev-team-enablement#73. I understand that fully parallel isn't possible due to a bug in Jenkins. My only concern is that this'll actually take longer for a single run to complete, but I think the benefit of being able to restart just one section of the pipeline outweighs this right now. P.S. I'm very happy the browser tests are now not being done for both node versions! |
It does not. The pipeline automatically checks for the
Yeah, it runs through the tests while instrumenting and records which code gets run, then uploads the report.
Yup, that's a tradeoff that we would make in this case, against the ability of rerunning just certain steps. I think currently the bottle-neck is passing the stashed dependencies around the jobs. I tried adding a cache (basically zip the files and upload to jenkins master, and when running tests, download and unzip) but it added more time to the pipeline than just running If we spin up a new npm-on-ipfs registry within the Jenkins network, we effectively have a npm cache that would greatly speed up the pipeline. ipfs-inactive/dev-team-enablement#51 |
if the cov runs the tests wouldn't be better to setup something like i described in the previous comment?
|
@hugomrdias yeah, that makes sense. One thing that bothers me with this refactored pipeline is that even though dependencies for linux has been fully downloaded, it doesn't continue until all platforms have done the same. Gonna try to find a solution for this before merging this. |
my point is
I can help on aegir side to make this happen!! |
License: MIT Signed-off-by: Victor Bjelkholm <git@victor.earth>
@hugomrdias yeah, sounds like a good idea, collect coverage when we do the runs, then after we can just upload all the reports. Will add this is a feature request after finishing this pipeline. Regarding pipeline having to wait for all platforms before continuing, we have two options:
|
Gonna run this pipeline once on every JS project to make sure it works everywhere, then I'll merge it and it'll be used by default. If you have any objections, now is your chance! |
License: MIT Signed-off-by: Victor Bjelkholm <git@victor.earth>
Can we still restart jobs inside the tests pipeline? Or we need to re run everything if windows fails? Just an example nothing against windows ^^ |
Unfortunately we cannot restart individual parallel steps (and we haven’t
been able to before either), so if windows browser tests fails, all the
tests would have to be rerun. The alternative is to split up the oses in
different stages (but the browser, web worker, node tests would still be
parallel) but then they’ll run sequentially instead of parallel. There is a
issue in the Jenkins issue tracker about that, so as fast as that
functionality exists, we’ll deploy it :)
…On Mon, 24 Sep 2018 at 22:22, Hugo Dias ***@***.***> wrote:
Can we still restart jobs inside the tests pipeline? Or we need to re run
everything if windows fails? Just an example nothing against windows ^^
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAcD9OOsSaEm3VZdGJDt19pfz34bxnMlks5ueT7tgaJpZM4W1Qtv>
.
|
Thanks everyone for your feedback! |
This commit changes the old scriptable pipeline into a declarative
pipeline.
Benefits are:
restarting the entire pipeline
npm install
on every build if previously successful)node | browser | webworker
CI status since werun platforms sequentially with this commit
focused on declerative pipelines)
Drawbacks:
as stashing/unstashing adds some build time.
Missing changes:
coverage
before platform tests etc etcpipeline as possible
Example pipeline:

https://ci.ipfs.team/blue/organizations/jenkins/Multiformats%2Fjs-multiaddr/detail/master/74/pipeline
License: MIT
Signed-off-by: Victor Bjelkholm git@victor.earth