-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ACTIONS_RUNTIME_URL, ACTIONS_RUNTIME_TOKEN and ACTIONS_CACHE_URL environment variables are missing. #329
Comments
This comment has been minimized.
This comment has been minimized.
The issue is still persistent afaik. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi, I'm trying to understand the problem. Are these values dynamically set? Can they be manually set and read by act? If so what to? |
@jshwi Those environmental variables are only available to GitHub Actions runners, whether it be runner hosted by GitHub or self-hosted one.
Probably.
No one knows, if it was that easy it would be fixed already. Perhaps guys from GitHub (@joshmgross from https://github.com/actions/cache or @TingluoHuang from https://github.com/actions/runner, top committers) could chime in here, maybe give us some clues on how we could solve that issue. |
Thank you, @catthehacker. I appreciate now having a better understanding of this. |
👋 @catthehacker is correct, these variables are for internal APIs. If you wanted to manually set these values, you'd also likely need to simulate an internal service to support what these APIs are used for (like caching and artifacts). |
@joshmgross Thank you very much for response! 😄 Unfortunately that is what I was afraid of. So my idea was that |
This comment has been minimized.
This comment has been minimized.
I've built a very quick and simple express server that will simulate the download and upload endpoints of an artifact server here https://github.com/anthonykawa/artifact-server. If you want to use it to help understand building this into act, feel free. It only works if you specify the name and path inputs when uploading and downloading. |
Thanks a lot @anthonykawa. Will take a look at it soon when I'll get time to develop artefact support. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This must have changed in recent docker / macOS. I was able to connect to the external wifi address on macOS10.14 and windows 11. Maybe the artifact server needs to be a docker container in the same network as the job container to resolve this. |
@viotti Can you please post your workflow here? That would make the issue more complete and as well probably more reproduceable. As this issue is closed and also the title is not true anymore, I think it would make sense to move it over into a new issue describing the current problem. |
@KnisterPeter sure. Here it goes.
@ChristopherHX I think the problem is the new M1/M2 chips, which are ARM. In this case the jobs will run within QEMU, since their images are x86. This might be causing networking issues. On macs with Intel chips the communication with the host probably works. This is just a guess though, I haven't tested to confirm. |
Same issue with M1, trying to use actions/download-artifact@v2. Getting ACTIONS_RUNTIME_TOKEN missing. Running the artifact server switches fails as well, communication timeout. Might have to spin up an Ubuntu box somewhere to workaround this. |
Just curios what happens if you use
On m1 macs with docker desktop together with enabling artifact server. |
davetapley Can you please share which |
@ChristopherHX just ran
Same issue:
|
@viotti I see, docker changed the network stack in docker desktop macOS m1. You get The problem is that the artifact server only listens to exactly one outbound ipv4 address, but docker is calling from another one. Line 279 in 7754ba7
|
@ChristopherHX indeed, that was an oversight on my part. I must admit I glossed over the error message and did not notice it had changed. Anyways, I did as you asked, and everything worked. 👏 🎉
|
Hello!, I'm trying to run a local test actions on my VM using nektos/act and I'm facing issues in reaching internet especially Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not resolve 'archive.ubuntu.com through my Proxy configured on my Ubuntu VM. The docker containers spin from act is unable to inject the Proxy Env's which I defined in
Tried with |
It worked for me by modifying Line 290 in be4a147
Did anything come of the plan to submit a PR for this? |
Since then someone else added a cli flag to control this and you always have to override ACTIONS_RUNTIME_URL manually, so just add that flag. So you can just use the latest release,
|
After some trial-and-error-and-head-scratching when the recommended
In my testing, I found that the latest releases of v3 for both actions seem to still work (v3.0.2 for
https://github.com/actions/download-artifact/releases/tag/v4.0.0 I haven't looked into which changes would need to be made, but I just wanted to share this in case it's helpful for someone else in a similar spot. |
@ChristopherHX nice, thanks for the pointer! I went ahead and subscribed to your issue 👍 I'll have to check into all those differences in v4 when I get a chance! |
I know this issue is closed but this is how I was able to run it using docker pull ghcr.io/jefuller/artifact-server:latest
docker run -d --name artifact-server -p 8080:8080 --add-host host.docker.internal:host-gateway -e AUTH_KEY=foo ghcr.io/jefuller/artifact-server:latest
I then create a directory to store the artifact files on my local based on where I run the act command. For simplicity I made one called mkdir out So when running act --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out Things to note:
For context I am running |
- Issue: nektos/act#329 - Discussion: nektos/act#2135
I was getting exact error and I was about to throw my computer out the window! downgrading the version from v4 to v3 did the magic! |
re:
https://gitea.com/gitea/act_runner/issues/119 explains the issue with v4:
and it also suggests two solutions:
Note: Gitea refers to |
Kudos for @VitusAcabado and @davetapley! Thank you so much 😊 I spent quite few hours with this issue before tried your approach. The approach they mentioned about running a Docker 🐳 container 📦 with artifact server worked for me in Windows (using PowerShell even without my WSL2 environment). I just renamed the host to Then I added following lines to my
So, I ran the container as follow:
Just out of curiosity, is this issue closed because the actual problem is in |
hi, why is this issue closed? I'm still getting the error about the variable
Is there a solution for this? |
This feature exists if you tell act where to put the files, but we both probably agree why the hell is this disabled by default. artifact v2-v3 fullsupport, v4 with known issues See Depending on the setup of docker communication issues exists for m-series macs. |
Github actions have undocumented environment variables named
ACTIONS_RUNTIME_URL
,ACTIONS_RUNTIME_TOKEN
andACTIONS_CACHE_URL
. The actions/cache action relies on this to create the url to interact with for storing caches.https://github.com/actions/toolkit/blob/1cc56db0ff126f4d65aeb83798852e02a2c180c3/packages/cache/src/internal/cacheHttpClient.ts#L33-L47
They all get populated over here
This is the cause of #285, #169 is linked.
The text was updated successfully, but these errors were encountered: