Closed marians closed 9 months ago
FYI This happened in a private github.com repository
Hey, sorry you encountered an error. Did you see the extra setup steps for private repos under:
https://github.com/green-coding-berlin/eco-ci-energy-estimation#note-on-private-repos
Got it in the meantime and added get-measurement
steps. The error is gone now.
Would it make sense to make the action work so that get-measurement
is optional. In other words, a measurement would have to be taken always at the end, before generating the output. That would allow for a simpler workflow and would prevent this error.
@dan-mm is there a way we can just output everything when calling display-results
? I remember there was a reason we needed to call get-measurement
at least once. But I can't remember why.
Hm it should already work that way.
Get-measurement is there for the user to explicitly say, here is where I want to make a measurement, and display-results is decoupled from actually making any measurements but just displaying the results of all your previous measurements.
But there is a safety clause in display-measurement where if get-measurement was never called, it makes at least one measurement then and there to have something to display. This clearly has a bug in it so I'll investigate now
@marians - found and fixed the issue. It should now work again even if make-measurement is never called. Thank you for the bug report!
Lemme know if it works this way for you now, or if you have any other issues!
Thanks for that! Closing this issue then.
I just added the two steps shown in the example in https://github.com/marketplace/actions/eco-ci-energy-estimation to a workflow and executed it. As a result, I got this error in the "Show energy results" step
The workflow snippet: