Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locally reproducible CI/CD #1436

Open
kakkoyun opened this issue Jan 23, 2024 · 7 comments
Open

Locally reproducible CI/CD #1436

kakkoyun opened this issue Jan 23, 2024 · 7 comments

Comments

@kakkoyun
Copy link
Member

kakkoyun commented Jan 23, 2024

We want vendor-independent and locally reproducible CI/CD pipelines so that our contributors can ensure quality before opening the pull requests.

@kakkoyun kakkoyun changed the title Improve CI/CD Locally reproducible CI/CD Jan 23, 2024
@dvjsharma
Copy link

dvjsharma commented Feb 3, 2024

Hi @kakkoyun, navigated here form the LFX portal. Since this is particularly about unit testing in specific environments, We can allow contributors to specify the Go version they want to use through environment variables and modify the CI/CD scripts to interpret these variables and set up the corresponding Go version for testing. We certainly will have to find a way to manage dependencies. Or how about using 3 different docker images for 3 test environments? What are your thoughts?

@marcosnils
Copy link
Contributor

hey there! I'm coming from this X thread: https://twitter.com/ArthurSilvaSens/status/1791069622508179854. Seems like https://dagger.io could help here. @juliusv mentioned that the prom team tried to use Dagger in the past without success but a lot have changed since then and this particular problematic is exactly the problem Dagger tries to solve. Happy to take a look and collaborate on a PoC if you're interested 👐

@bwplotka
Copy link
Member

What exactly is not reproducible at the moment? Let's talk about specifics. I heard testing for certain Go version as a one thing.

@kakkoyun
Copy link
Member Author

kakkoyun commented Jun 6, 2024

What exactly is not reproducible at the moment? Let's talk about specifics. I heard testing for certain Go version as a one thing.

I never claimed it's not reproducible. The idea is to be able to run anything we use in the CI locally https://github.com/prometheus/client_golang/tree/main/.github/workflows with the least amount of effort. Technically, we can have make actions for everything and it could be the single source of truth or we can go with something fancy like https://dagger.io

@marcosnils
Copy link
Contributor

@bwplotka @kakkoyun happy to help putting together a PoC with Dagger so you can decide if it's worth or not.
Taking a glimpse at one of your most executed GHA workflows here: https://github.com/prometheus/client_golang/blob/main/.github/workflows/go.yml#L60, looks like several targets from this Makefile here (https://github.com/prometheus/client_golang/blob/main/Makefile.common) could be daggerized to avoid users running into env specific issues.

LMK if there's interest and I can kick off a draft PR and we can discuss there maybe with more tangible examples on how this could work.

@kakkoyun
Copy link
Member Author

kakkoyun commented Jun 7, 2024

@marcosnils Thanks 🤩 Why not? I would be happy to review.

@marcosnils
Copy link
Contributor

marcosnils commented Jun 7, 2024

@kakkoyun funny thing is that first thimg I did after cloning the repo is calling make build and I'm getting the following error:

130|marcos:Projects/client_golang (main) (⎈ |dagger-ci)$ make build
>> building binaries
/home/marcos/Projects/gopath/bin/promu build --prefix /home/marcos/Projects/client_golang 
Unable to read config file: .promu.yml
!! open .promu.yml: no such file or directory
make: *** [Makefile.common:204: common-build] Error 1

couldn't find an easy way to unblock myself. Any ideas where I should be getting that .promu.yml file from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants