NobbZ

NobbZ

Gitlab CI rebuilds umbrella, despite build in previous job

We are curretnly trying to reduce the amount of compute units used by our CI.

Thats why I split out mix deps.get && mix compile into a job that produces artifacts, which then can get used in the follow up jobs to save up some compute time.

This seems to work well in theory, and as we have 5 jobs based on the build output, we expect roughly 3 equivalents of mix compile to be saved.

Sadly, it appears that in the subsequent jobs, the project itself is still built each time.

So far, the effect of extracting the build into a previous step is therefore barely better than caching.

To comparision see this, where the 2 apps in the umbrella are built anew:

While the previous step does properly build it here as well:

The downloaded artifacts have all the BEAM modules and application manfests as I would expect them.

Has anyone an idea how to get this working, without doing the repeated compilation of the projects application again and again?

This repeated builds of the project members seems to be one of the most costly factors in the CI.

Most Liked

D4no0

D4no0

I’ve noticed this too happening in my CI pipelines. I have the feeling that this is related to the rebar3. In my logs I could see recompilation of libraries that were not part of mix.

In a few OSS projects, I saw that some folk was caching .mix (in your case /root/.mix/) folder too, have you tried doing that?

Last Post!

NobbZ

NobbZ

Thanks for the input, sadly this doesn’t change much, the recompilation in the later jobs still happens, while at the same time, the build step succesfully builds nothing if no actual code changes happened (but the steps after it still do!)

Where Next?

Popular in Questions Top

New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31494 112
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40042 209
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement