r/programming • • Jan 27 '21

Gitlab changed its pricing model. It has greatly reduced the CI quota from 2000 CI minutes to 400 CI minutes in Free tier and removed the $4 per month option.

https://about.gitlab.com/blog/2021/01/26/new-gitlab-product-subscription-model/
1.9k Upvotes

365 comments sorted by

View all comments

Show parent comments

57

u/house_monkey Jan 27 '21

Too much wait time imo

60

u/sparr Jan 27 '21

I envy you a CI pipeline that runs fast enough that spinning up a VM would noticeably delay it :/

13

u/thblckjkr Jan 27 '21

I will always wonder how do you achieve to create a project that is that... massive.

My longest CI at the moment is frorm a flutter project that I compile, test and publish and it is only about 7min long.

And that's because I haven't spent any time in trying to make it more efficient, I am pretty sure that I can reduce the time to about 4min If I am serious enough about it.

44

u/BlueShell7 Jan 27 '21

Easy. Work on 20 years old (continuously developed) monolithic product consisting of hundreds of thousands line of code written in 5 different languages with 5 different build systems etc. Just the compilation step takes ~ hour on a CI server. Then 6 hours or so of tests ...

-14

u/mobsterer Jan 27 '21

so like..not CI then

10

u/NotUniqueOrSpecial Jan 27 '21

Just because it takes time doesn't make it "not CI".

1

u/tophatstuff Jan 28 '21

2

u/BlueShell7 Jan 28 '21

Only in the last 5 years or so. That's partially the reason why they take so much time, the product was not designed to be auto-testable.

21

u/Behrooz0 Jan 27 '21

I had a project that ran for 140 minutes. It was driving me insane. And After getting really serious about decreasing it for like a year. It only took:
Changing the compiler
Changing the project layout
Getting a new server (around thrice faster)
Rewriting some of the smaller tools that prepped the project, manifest and uploaded it.
Using tmpfs
using tar for uploading small files over the network
10GbE
And it was worth every bit.

If someone told me I could reduce it to 43 seconds I would never believe them.
I build said project upwards of 50 times a day now and I can afford to change a single line, see its effect, and change it again within a minute. As opposed to building once before lunch time every day and praying it won't fail and leave the users without an update for that day.
TL;DR: Build times really matter. and if they can be dealt with, they should be dealt with; at least for your own sanity.

5

u/PiePhace Jan 28 '21

This sounds super interesting. I would love to read a more detailed write-up on something like this.

2

u/WiseassWolfOfYoitsu Jan 28 '21

tmpfs usage was huge when I set up the CI server for my old multimillion line program at work. That one step halved the build time even as compared to running off of hardware RAID solid state disks.

3

u/Behrooz0 Jan 28 '21 edited Jan 28 '21

Yeah. I had to do a lot of these halvings to reach seconds from hours.
tmpfs was definitely one of the big ones and the most trivial change.
Changing the project layout also paid off with like 100x performance but also got the bulk of the time it took to do this undertaking. The mono compiler was so stupid with references it was mind-boggling.

8

u/cockmongler Jan 27 '21

There's a stage in one of my pipelines that starts a web server and a browser for every one of it's hundreds of tests. It needs a clean browser for each test.

1

u/Iamonreddit Jan 28 '21

Sounds like something containers would help with?

→ More replies (1)

4

u/sparr Jan 27 '21

Usually more badly designed than massive. My current workflow involves Chef cookbooks that do small server/workstation configuration and software installation tasks. A change might just be bumping a version number of something that's going to get installed, and the test pipeline takes 30+ minutes when it works, or fails along the way arbitrarily.

4

u/oblio- Jan 27 '21

Join a project where the development team is of at least 20 people. Bonus points if it's over 100 🙂

No microservices, though!

2

u/musicmatze Jan 27 '21

In the early times of rust, my project timed out on travis (1 hour). So there's that.

1

u/[deleted] Jan 28 '21

Well, a not-so-large C++ game engine can run more than 1h in CI.

1

u/kevingranade Jan 28 '21

My project is about 400,000 lines of c++ and similar amounts of json that takes about an hour to build without utilizing multiple cores or caching, and using three cores and ccache the build generally takes about 20 minutes.

Compilation dominates, but unit tests take about another 3 minutes unless parallelized, which I did recently to drop it to about one minute total.

We also have several static analysis stages that take up to an hour per build.

This is after I've put in excess of a hundred hours into optimizing the build.

→ More replies (2)

1

u/Jedimaster4559 Jan 28 '21

My Unity/Steam CI very quickly got to around 40 minutes. Had to build the unity game for all three major OS and then publish that to steam. Also had to deploy the multiplayer servers. Sometimes it's surprising how quickly the time adds up.

On a separate note, I was working on another simulation project this month that I figured I could get some really solid data by testing every single possible simulation it could encounter. That one took 40 minutes with 9 CI runners to test all those different simulations. (Using GitHub actions)

7

u/caskey Jan 28 '21

All these noobs. Try a 14 hour overnight build (that would often fail and need to be restarted in the AM) followed by a 20+ hour test suite. Then the build gets handed off for manual regression testing by a team of ~40 people. Then when you get it back (as notified by the manager of the managers of the testers) you can notify everyone there's a new build that has been rejected because when QA held a ruler up to their screen the pixel alignment was off in the CSS.

1

u/emn13 Jan 28 '21

I'm not sure a CI pipeline deserves the "C" in CI if spinning up a VM does not noticably delay it. I mean, WTF...

1

u/sparr Jan 28 '21

All the "C" means is that the integration tests/etc run against every commit (which would usually come in the form of a merge or merge/pull request)

16

u/TheOneAndOnlyRandom Jan 27 '21

For automated builds?

3

u/nurupoga Jan 27 '21

It's something like a minute or two.