A piece of criticism to all code forges I know: why not run #CI on all commits?
-
A piece of criticism to all code forges I know: why not run #CI on all commits?
A bad commit is a liability. It will break bisect and make debugging miserable.
#ForgejoActions takes it to the extreme and cancels an already running action when I push another change.
I get it - it's too slow and expensive to test them all when pipelines take minutes to run. But you could just pause the old ones until the newest one is finished!
-
Oh, now I realized: most forges host underpriced runners, so they have a reason to have them run as little as possible.
Well, I set up my own runner on #forgejo for a single repo, so I have power to spare
-
@dcz It's also not a wise move w.r.t. to energy consumption, environmental impact, and the best way to accelerate #climatecrisis. Also read https://wimvanderbauwhede.codeberg.page/articles/frugal-computing/
So following Pareto principle, you want to find a sweet spot between energy consumption and code checks.
Even if I had the money, I would still reduce pipelines to a bare minimum to avoid wasting energy.
~f
-
If your pipeline takes 2 minutes and saves 2 hours in debugging and another 20 in working around the problem at the end user side - which is the case at least for me - then the sweet spot is quite clear.
> the best way to accelerate #climatecrisis
I call this a ridiculous statement. If running a computer for 5 extra minutes is comparatively so bad, we should reconsider software altogether.
There are many better ways to heat up Earth, related to transportation and manufacturng.
-
@Codeberg For comparison, boiling a cup of tea needs about 82.6 kJ of energy.
My CI computer has a 60W power supply (so it can't draw more power than that - we're overestimating). The CI would need to run for 82.6kJ/60W ≅ 1400s ≅ 23 min to match it.
Make it half to offset the energy costs of network communication: 11min.
That gives two 5min pipelines for the price of one hot drink.
Would you drink a cup on every other commit if it saved you time and stress in the future?
I probably would.
-
@Codeberg Okay, another comparison:
the 5 minutes pipeline costs 82.6kJ * (300s/1400)s = 82.6kJ * 0.21 = 18kJ (*2 for network=36kJ)A liter of gas contains 33.6MJ per liter, with car efficiency at 20% it's 6.7MJ, at 3l/100km it's 33.3km, so 200kJ/km.
Every 5m pipeline run costs about as much energy as 200/36=222m by a small car.
How far from the office do you live? How many commits do you push upstream per ride?
We have much better ways to curb energy use than not testing software.
-
-
@drewdevault @Codeberg I can only reply with:
a lot of pipelines are five minutes.
-