Closed willi-mueller closed 11 months ago
Well thats an easy addon, sure we can do that.
But to better understand the issue: We are using the standard Github Image. Does Github provide a different image for Enterprise users and could you point us to it?
Or are you running a custom image?
Excellent! I don't know the details of the runner, I suppose it's a custom image. I can ask our ops team. What would you need to know? Probably a list of what is installed in our image to compare that with what eco-ci needs?
Thanks for the update.
With a fresh head and now reading it again I have to say if you actually use a custom image I see the installation as a bit more tricky.
Since we are just an action we want to "dirty" the actual machine as minimal as we can. So installing go on the box could conflict with current versions and / or leave an unintended binary.
However to actually comfort your request I have following idea: What would you think if we just make the graph optional, than you can still use the action without any modification and just will not see the graph. If you really want to see it, than I think it is best if you install go on your custom image ... so we are not forcing people to get go installed through the action.
What you think about that?
Excellent idea, I appreciate that you revisited your first proposal and, in the end, did not confused by my initial thoughts :D
Hi @jups23
I have added an optional flag called display-graph, which you can use to circumnavigate your issues
If you call the start-measurement task with that flag set to false, it will skip the go-installation. You must then also call the display-results task with that flag set to false as well, otherwise it will still try to display the graph. The README has also been updated to reflect this information.
Hope this solution works for you, if not, please let us know!
@jups23 Is the feature working for you? can this be closed?
Thank you for the follow-up! Yes, this flag is great!
I needed to install python 3.10, that's not available on our custom runner using
- uses: actions/setup-python@v4
with:
python-version: '3.10'
However, I got stuck with the following error now. Can you help us?
2023-05-08T12:42:11.1660948Z Cache hit failed! ❌
2023-05-08T12:42:11.1682575Z ##[group]Run # first activate our venv
2023-05-08T12:42:11.1682925Z [36;1m# first activate our venv[0m
2023-05-08T12:42:11.1683273Z [36;1msource /tmp/eco-ci/venv/bin/activate[0m
2023-05-08T12:42:11.1683702Z [36;1mpython3.10 -m pip install -r /tmp/eco-ci/spec-power-model/requirements.txt[0m
2023-05-08T12:42:11.1684094Z [36;1m# now reset to old venv[0m
2023-05-08T12:42:11.1684695Z [36;1mdeactivate our venv[0m
2023-05-08T12:42:11.1685094Z [36;1m# reactivate the old one, if it was present[0m
2023-05-08T12:42:11.1685469Z [36;1mif [[ $ECO_CI_PREVIOUS_VENV != '' ]]; then[0m
2023-05-08T12:42:11.1686316Z [36;1m source $ECO_CI_PREVIOUS_VENV/bin/activate[0m
2023-05-08T12:42:11.1686650Z [36;1mfi[0m
2023-05-08T12:42:11.1703768Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2023-05-08T12:42:11.1704113Z env:
2023-05-08T12:42:11.1704570Z pythonLocation: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:11.1705017Z PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.11/x64/lib/pkgconfig
2023-05-08T12:42:11.1705430Z Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:11.1705830Z Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:11.1706230Z Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:11.1706637Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.11/x64/lib
2023-05-08T12:42:11.1706982Z ##[endgroup]
2023-05-08T12:42:11.7445826Z Collecting contourpy==1.0.7
2023-05-08T12:42:11.8690587Z Downloading contourpy-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (300 kB)
2023-05-08T12:42:11.8969688Z ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 300.3/300.3 kB 11.9 MB/s eta 0:00:00
[... installing many dependencies ...]
2023-05-08T12:42:42.8656939Z [36;1mecho "ECO_CI_WORKFLOW_ID=$workflow_id" >> $GITHUB_ENV[0m
2023-05-08T12:42:42.8657263Z [36;1m[0m
2023-05-08T12:42:42.8657686Z [36;1m/runner/_work/_actions/green-coding-berlin/eco-ci-energy-estimation/v1/scripts/init_variables.sh[0m
2023-05-08T12:42:42.8658209Z [36;1mecho "ECO_CI_API_BASE=https://api.green-coding.berlin" >> $GITHUB_ENV[0m
2023-05-08T12:42:42.8658810Z [36;1mecho "ECO_CI_INIT=DONE" >> $GITHUB_ENV;[0m
2023-05-08T12:42:42.8683981Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2023-05-08T12:42:42.8684801Z env:
2023-05-08T12:42:42.8685292Z pythonLocation: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:42.8686194Z PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.11/x64/lib/pkgconfig
2023-05-08T12:42:42.8686656Z Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:42.8687054Z Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:42.8687457Z Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.11/x64
2023-05-08T12:42:42.8687861Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.11/x64/lib
2023-05-08T12:42:42.8688211Z ##[endgroup]
2023-05-08T12:42:43.0489531Z ##[error]Unable to process file command 'env' successfully.
2023-05-08T12:42:43.0501636Z ##[error]Invalid format '4959'
2023-05-08T12:42:43.0782497Z Post job cleanup.
2023-05-08T12:42:43.0802161Z A job completed hook has been configured by the self-hosted runner administrator
I suppose that this error has nothing to do with go
, so let me know if you'd like me to open a new issue and we close this one.
This error I have never seen before. If you are not using the provided Github default image it might be that some features that should be available in Github Actions are not working as expected.
What happens for instance if in your jobs you write to GITHUB_STEP_SUMMARY
or you access the env
context (https://docs.github.com/en/actions/learn-github-actions/contexts#env-context)
I have a suspicion that particular the latter might not be available ...
@willi-mueller : the eco-ci has undergone a rewrite since we've last discussed this, especially in how the setup/step-summary/env are accessed, so your issue might be fixed now. Are you still experiencing this issue?
Thank you! I left the team where I observed the problem, but I'll forward the good news with an invitation to try it out again at the next opportunity. Thank you!
I'd therefore close the issue.
I think this workflow is currently crashing if the runner does not have
go
installed. Could you thus change the workflow to installgo
if not present? This would support machines configured on github enterprise which do not havego
installed.I tried running this workflow on our github enterprise setup but got the following error. Below follows the raw log. I replaced the name of our organization and repo with
my-org
andmy-repo
respectively:If someone could pick that up it would be great. I'm working for a large multinational organization with dozens of development teams and some of us would love to introduce your tool to get awareness of and improve our energy consumption! Thank you!