green-coding-solutions / eco-ci-energy-estimation

Eco CI Energy estimation for Github Actions Runner VMs
MIT License
48 stars 10 forks source link

Results not showing in gitHub Actions #18

Closed ceddlyburge closed 1 year ago

ceddlyburge commented 1 year ago

Hi There, I just saw your great talk about this, and gave it a try, but I got an error (using v1.2.0, I was uncomfortable running direct from main)

The "start-measurement" task is failing for me: https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436

I've copied the output here for convenience

Run green-coding-berlin/eco-ci-energy-estimation@v1.2.0
  with:
    task: start-measurement
    branch: main
Run if [[ -d /tmp/eco-ci ]]; then
  if [[ -d /tmp/eco-ci ]]; then
    rm -rf /tmp/eco-ci
  fi
  mkdir /tmp/eco-ci
  git clone --depth 1 --single-branch --branch main https://github.com/green-coding-berlin/spec-power-model /tmp/eco-ci/spec-power-model
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Cloning into '/tmp/eco-ci/spec-power-model'...
Run go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest
  go install github.com/guptarohit/asciigraph/cmd/asciigraph@latest
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
go: downloading github.com/guptarohit/asciigraph v0.5.5
Run gcc /tmp/eco-ci/spec-power-model/demo-reporter/cpu-utilization.c -o /tmp/eco-ci/demo-reporter
Run python3.10 -m venv /tmp/eco-ci/venv
Run echo "myhash=$(md5sum /tmp/eco-ci/spec-power-model/requirements.txt | cut -d ' ' -f1)" >> $GITHUB_OUTPUT;
Run actions/cache@v3
Cache not found for input keys: Linux-build-cache-pip-packages-a88e01ec5caedecb784d3103e[2](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:2)51e[3](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:3)18, Linux-build-cache-pip-packages-a88e01ec5caedecb78[4](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:4)d3103e2[5](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:6)1e318
Run if [[  == 'true' ]]; then
/home/runner/work/_temp/933[6](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:7)61dd-dad2-4113-936a-2bb5844b[7](https://github.com/ceddlyburge/johnson-trotter/actions/runs/4789208883/jobs/8516792436#step:2:8)d3a.sh: line 1: conditional binary operator expected
Error: Process completed with exit code 2.

Any help welcome!

Thanks, Cedd

ArneTR commented 1 year ago

Hey Cedd,

@main is the way to go atm, as we do not publish a release for every commit we do, but test every commit with a Github Action (https://github.com/green-coding-berlin/eco-ci-energy-estimation/actions/workflows/test.yml).

The reason for the @main recommendation is that we are very unhappy with the implied logic how Github handles semantic versioning. See: https://github.com/green-coding-berlin/eco-ci-energy-estimation/pull/4#issuecomment-1501881534

If you select @v1.2 you would not get any updates, even if we would release v1.2.1 as Github Actions does not respect semantic versioning.

I would be very happy if you could add your experience and opinion in the Pull Request #4 , as we are a bit unsure what to recommend here. Your opinion feeling uncomfortable by using @main is great input. If you could elaborate a bit on this with the info in the Pull Request that would be very helpful.

@main shows to be working fine, so feel free to try that.

  1. What you are seein in particular is not a breaking error. v1.2.0 had an issue with the cache variable not being set on first run. This error output should be gone in further runs. We fixed that in the latest version. In any case it should not lead to any problems with your code or measurement, as the step is fail-safe with the "continue on error" attribute.
ceddlyburge commented 1 year ago

Thanks Arne. I've added a comment to that PR, and updated to use @main.

There are no errors now, but I also don't see any results: https://github.com/ceddlyburge/johnson-trotter/actions/runs/4791266653/jobs/8521534536

ArneTR commented 1 year ago

@dan-mm Could you look into this please

dan-mm commented 1 year ago

@ceddlyburge - I see the issue now - the name of the task to show the output is display-results, not display-measurements

That was my fault though - I had renamed it last week, and forgot to the examples in the README >.<

I've updated the README with the correct name now. Let me know if you have any more issues!

ceddlyburge commented 1 year ago

Thanks Dan, that works perfectly :)