Move from CircleCI to GitHub action

119 views
Skip to first unread message

Julien Pivotto

unread,
Jun 16, 2022, 4:45:24 AM6/16/22
to prometheus-developers
Hello,

Based on a request from CNCF, I'd like to move from CircleCI to Github
Action.

We are already using GitHub actions today, for linting and fuzzing.

Compared to what we are using in CircleCI, it looks like GitHub action
runners are comparable in size, with slightly more ram.

Pros' of the move:
- Remove a CI system
- Better integration with Github (access to logs, etc)
- It seems better for CNCF itself

Con's of the move:
- Threading (e.g. parallel builds) will be a bit more itchy at the
moment but will be doable.

I plan to do the work in the coming weeks, unless we don't have lazy
consensus.

Regards,

--
Julien Pivotto
@roidelapluie

Bartłomiej Płotka

unread,
Jun 16, 2022, 5:05:00 AM6/16/22
to prometheus-developers
Hi,

Thanks!

What does that mean to reusable Orbs we maintain? Can we reuse some of the jobs in the same manner across repos?

Kind Regards,
Bartek Płotka (@bwplotka)


--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/YqrtnRGCHWT5f1w1%40nixos.

Augustin Husson

unread,
Jun 16, 2022, 5:28:29 AM6/16/22
to Bartłomiej Płotka, prometheus-developers
I guess a nice way to reuse the orb is to create a GithubAction that provides more or less the same features.

Julien Pivotto

unread,
Jun 16, 2022, 5:30:10 AM6/16/22
to Augustin Husson, Bartłomiej Płotka, prometheus-developers
Yes, the plan is to rewrite the orb as a reusable github action. There
would be a repo similar to the orb we are using.
> > https://groups.google.com/d/msgid/prometheus-developers/CAMssQwZUHemRqsAjwCM%2B6-iL28TrgyrPYbMKM9MPHEMt5jNfrw%40mail.gmail.com
> > <https://groups.google.com/d/msgid/prometheus-developers/CAMssQwZUHemRqsAjwCM%2B6-iL28TrgyrPYbMKM9MPHEMt5jNfrw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CAOJizGdpoUuJ%3Dbws2oXcBtsLN%2BtjrB3JWDdrXJP98FMFQafZXA%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie

Bartłomiej Płotka

unread,
Jun 16, 2022, 7:13:19 AM6/16/22
to Augustin Husson, Bartłomiej Płotka, prometheus-developers
Amazing! LGTM

Kind Regards,
Bartek Płotka (@bwplotka)

Frederic Branczyk

unread,
Jun 16, 2022, 8:18:18 AM6/16/22
to Bartłomiej Płotka, Augustin Husson, prometheus-developers
If we're already doing this (and this is not the first or last time we've moved CI systems) I do think there is value in thinking about abstracting our CI so another move would be easy and not require us to rewrite everything. Don't get me wrong, I'm very happy with GitHub Actions but there's always "the next thing" (TM). If we're already doing this, I would suggest having a look at Dagger (https://dagger.io/) to actually write the pipelines and "just" run them on GitHub Actions.

Just my two cents, as always in the Prometheus project I think whoever does the work can have the freedom to decide, but this would be my suggestion.

Julius Volz

unread,
Jun 19, 2022, 8:39:56 AM6/19/22
to Frederic Branczyk, Bartłomiej Płotka, Augustin Husson, prometheus-developers
That's actually  an interesting idea. Disclaimer: I'm not neutral because I'm a mini-investor in Dagger (just for fun). But the idea that the CI pipeline would really run locally (or anywhere) exactly as it would run on the final cloud CI provider is a nice one. I'd also leave that up to Julien to use or discard though :)

When chatting with Johannes (Fish) about Dagger, he brought up the question on how to achieve the same kind of build parallelism in Dagger as in our current CI setup on CircleCI. No idea if and how to approach that with Dagger, since I think the idea is that you just run "dagger do" on the CI provider, and the rest of the build tree happens within that.

Ben Kochie

unread,
Jun 19, 2022, 8:47:25 AM6/19/22
to prometheus-developers
Seems fine to me.

Two requirements that come to mind:
* We need a "machine" level executor, for some builds that don't work well in Docker.
* We need a stackable containers/compose type for some integration tests, for example MySQL and Postgres exporters.

I have not looked into how those work with GitHub actions.

Julien Pivotto

unread,
Jul 8, 2022, 6:26:25 AM7/8/22
to Julius Volz, Frederic Branczyk, Bartłomiej Płotka, Augustin Husson, prometheus-developers
On 19 Jun 14:39, Julius Volz wrote:
> That's actually an interesting idea. Disclaimer: I'm not neutral because
> I'm a mini-investor in Dagger (just for fun). But the idea that the CI
> pipeline would really run locally (or anywhere) exactly as it would run on
> the final cloud CI provider is a nice one. I'd also leave that up to Julien
> to use or discard though :)
>
> When chatting with Johannes (Fish) about Dagger, he brought up the question
> on how to achieve the same kind of build parallelism in Dagger as in our
> current CI setup on CircleCI. No idea if and how to approach that with
> Dagger, since I think the idea is that you just run "dagger do" on the CI
> provider, and the rest of the build tree happens within that.

I have played with dagger and it seems reasonable to move into this
direction. This would create an abstract layer to reuse the same CI
system no matter where we execute the tests.

Based on my initial tests, our Makefile system and golang-builder would
be totally reusable as well, speeding up the process. We could in the
long term move some of its logic inside dagger itself.

For Julius' question: We would leverage CI parallelism and pass down to
dagger which thread to run.

I also note that dagger is young but the team is quite responsive and I
was able to get prompt feedback to my queries during my experiments.

Therefore I'd like to proceed with Dagger.
> >> https://groups.google.com/d/msgid/prometheus-developers/CAMssQwbP0S02dQqVZ3b6iuco4szGP%2B%3DR5gOUcr%2BEkHjHRsOwnQ%40mail.gmail.com
> >> <https://groups.google.com/d/msgid/prometheus-developers/CAMssQwbP0S02dQqVZ3b6iuco4szGP%2B%3DR5gOUcr%2BEkHjHRsOwnQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Prometheus Developers" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to prometheus-devel...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/prometheus-developers/CAOs1UmwkUUzp3Miu%2BZ5ByS-oD4S2KzzAPdf6kwFRxkkKRK8JNw%40mail.gmail.com
> > <https://groups.google.com/d/msgid/prometheus-developers/CAOs1UmwkUUzp3Miu%2BZ5ByS-oD4S2KzzAPdf6kwFRxkkKRK8JNw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CA%2BT6YoyeSRZi%2BR0H5RZHqxaU6WhyRVM7EfADAcvJPy4n_fTBsg%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie

Julius Volz

unread,
Jul 11, 2022, 6:40:51 AM7/11/22
to Julius Volz, Frederic Branczyk, Bartłomiej Płotka, Augustin Husson, prometheus-developers
Great to hear, sounds good to me!

Augustin Husson

unread,
Jul 15, 2022, 4:36:14 AM7/15/22
to Julius Volz, Frederic Branczyk, Bartłomiej Płotka, prometheus-developers
sounds good to me too.

Julien Pivotto

unread,
Aug 25, 2022, 8:23:40 AM8/25/22
to Julius Volz, Frederic Branczyk, Bartłomiej Płotka, Augustin Husson, prometheus-developers
An update here:

It seems that dagger is actually the wrong level of abstraction for us.
We have strong abstraction with our Makefiles, golang builder and Promu.

And we would still need to figure out passing the artefacts between jobs
in a vendor specific way.

It was fun playing with dagger, but it does not seem a fit for
Prometheus at this stage.

I will fallback to porting our CircleCI library to github actions.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CA%2BT6Yowobw9Xx1MDK_2VaN%2B8hsM0rOJ%2B4_XLgtjv0yP3v1pXAg%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages