thegreenwebfoundation / grid-intensity-exporter

A grid intensity exporter for use with prometheus. Designed to be used for understanding carbon footprint of compute.
Apache License 2.0
6 stars 1 forks source link

Add exporter and integration test for docker #2

Closed rossf7 closed 3 years ago

rossf7 commented 3 years ago

Towards #1

This adds the exporter code, a Dockerfile and a first integration test that uses the Docker container.

As you can see it took a few commits 😅 but the github action is done. It uses a local docker registry. The integration test is just a go test that connects to the container on port 8000.

Later I'd like to add deployment manifests for Nomad and Kubernetes and we can add more integration tests for them.

mrchrisadams commented 3 years ago

@ofpiyush I'm pretty happy with this, personally. Because there's not much to merge into, are you cool with raising any issue in an separate PR, or making any separate issue for stuff that leaps out at you?

mrchrisadams commented 3 years ago

@rossf7 we don't have any real guidelines about merges vs rebases in git repos at TGWF. What do you prefer to work with on go projects?

Once I know, I'll either merge in, or rebase accordingly, as I'm happy with this 👍

rossf7 commented 3 years ago

We don't have any real guidelines about merges vs rebases in git repos at TGWF. What do you prefer to work with on go projects?

Thanks @mrchrisadams I'm used to doing squash merges but the history was messy. So I cleaned it up and did a force push. I hope that's OK? I try to avoid force pushes but seemed like a good option in this case.

I don't mind if we merge or rebase. Also I think you can run github actions locally. I'll try that next time as it also means there is a shorter feedback loop when working on the tests.

ofpiyush commented 3 years ago

Yes I will find proper time to look at this over the weekend.

No reason to block both of you till then. I'll create issues if I see something odd.

Squash merge is my default too!

rossf7 commented 3 years ago

Great, thanks @ofpiyush!