-
Notifications
You must be signed in to change notification settings - Fork 17
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
display-results tasks yields error: max_measurement_number: unbound variable
#43
Comments
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 Would it make sense to make the action work so that |
@dan-mm is there a way we can just output everything when calling |
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. |
Unfortunately I believe this bug has returned. Without calling get-measurement, I have the following errors/warnings in display-result:
You can see it in this CI run: https://github.com/tlaplus-community/tree-sitter-tlaplus/actions/runs/9863040971/job/27234920568?pr=120 |
A subsequent CI run with a get-measurement task run right before display-results succeeds [link]:
📈 Energy graph:
8.18 ┤ ╭─╮
7.54 ┤ │ ╰╮
6.90 ┤ ╭╯ │ ╭╮
6.26 ┤ │ │ ││
5.62 ┤ │ ╰╮ ││
4.97 ┤ ╭╮ │ │ ││ ╭─╮ ╭╮
4.33 ┤ ╭╮ │╰─╮ │ │ ╭╮ │╰─╮ │ ╰╮ ╭─╯╰╮
3.69 ┤ ╭╯│╭─╯ ╰──────────────────────────────────────────────────╯ ╰───╮╭─╯╰─────────╯ ╰───────╯ ╰─╯ ╰─────────
3.05 ┤ ╭─╮ │ ╰╯ ╰╯
2.41 ┼╮ │ ╰─╮│
1.77 ┤╰───╯ ╰╯
Watts over time 🌳 CO2 Data: |
Oh ,noes! Thanks for bringing this our attention again! There are two things that catch my eye:
In any case: I totally agree that the plugin should not fail on you, no matter how you use it. But I am currently trying to discern if a guard clause or a feature is the way to go here. |
Thanks! I tried the RC but then I just get this error in the measurement step:
Here is the CI run. I only really care about getting a single measurement to see the eco impact of the entire CI, and the display-results action seems to insert its own final measurement, so if I insert a measurement step right before display-results those two measurements are basically identical. |
Hey @ahelwer I had now time to look at this properly. First of all thanks for trying out the RC version. The error you are seeing stems from the fact that the CarbonDB integration is not configured correctly. You must set all three variables.
This was not the case in the prior version. Since the RC is not release yet this is not documented, but will be added then. Currently it was just stated partially in the release description.
I see it being nice to have though and have crated a PR. Can you give that a try? #87 To use it to have to change the statement in your Workflow File to: Just a heads up: When you are only using display results the data will never get sent to our dashboard where you can see the aggregated data (https://metrics.green-coding.io/ci-index.html) ... is that what you want? |
That's a good point, I think I will just do the extra measurement then. Thanks for all the help! This can probably be closed. |
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:
The text was updated successfully, but these errors were encountered: