-
-
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
fix: use correct path to toolcache #1494
Conversation
The toolcache on GitHub Actions need to be in /opt/hostedtoolcache. This is the case for all environment variables set by act, but it's not the case for the volume mounted into the container.
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
@KnisterPeter this pull request has failed checks 🛠 |
It fails because you can't have a mount over data and in my images I keep |
We have @nektos/act-maintainers Would it be okay for your to remove the hardcoded paths and replace with with a configurable option (while still defaulting to the hardcoded value). |
The failing test will be altered in #1503 to use a different docker image. This change should be sufficient for this change to pass all tests.
This option would need a |
Cool. I think this PR is obsolete then and I can close it. |
Not shure what make you believe that this PR is obsolete, my mentioned change only resolve the not passing tests not anything else A workaround would be use |
I thought your changes will resolve the more general toolcache issue. |
PR is stale and will be closed in 14 days unless there is new activity |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1494 +/- ##
==========================================
- Coverage 61.56% 61.53% -0.04%
==========================================
Files 53 53
Lines 9002 9002
==========================================
- Hits 5542 5539 -3
- Misses 3020 3022 +2
- Partials 440 441 +1 ☔ View full report in Codecov by Sentry. |
While the tests are now passing. We would still have to move the tools of the default docker images out of the mount point. Otherwise these docker images end up with an empty tool_cache and the preinstalled |
@ZauberNerd I think we can close that, can't we? |
PR is stale and will be closed in 14 days unless there is new activity |
Why do you need the mount point to be empty? Doesn't docker initialize new named volumes using the contents of the image? Or am I misunderstanding the issue? |
@lawndoc Thanks to remind me about this, yes I should update the default image and get this merged.
the toolcache volume is long term persisting data. This volume already exists for all used act atleast once via docker backend without the data on that location of the image. We have a default image with Even setup-node needs node in The solution would be to not store any required files inside that location. Using the small images of the image survey will also lead to an empty toolcache folder |
The large images also have files on these location, but not the critical node binary so that is fine. |
This PR should make the location free of files catthehacker/docker_images#121 I believe the toolcache mounting side effects are currently not that small without changing the image. actions/runner uses @lawndoc If you have a better idea let me know. I don't feel comfortable to have luck with getting the correct content in My experience with named volumes in docker was, that they are always empty unless the Dockerfile uses the |
@lawndoc You are completely right the toolcache is initialized with the content of the container dir if it didn't exist yet... However if it was initialized non empty (even a empty volume is initialized by docker via a copy from image) it throws node not found error, if the wrong node tool is present in the toolcache volume. I'm merging this now, default image is patched and confirmed it reduces the problems caused by divergent tool-cache. You as a potential gitea actions user, might need to wait longer for the next sync. |
I want to delete these messages... |
Wow good job docker:
looks like the images with data in /opt/hostedtoolcache are affected by concurrency bugs. Good to make this folder empty with only file permission applied to the volume |
Thank you for your work on this! It's greatly appreciated! |
The toolcache on GitHub Actions need to be in /opt/hostedtoolcache. This is the case for all environment variables set by act, but it's not the case for the volume mounted into the container. Co-authored-by: Björn Brauer <[email protected]> Co-authored-by: ChristopherHX <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The toolcache on GitHub Actions need to be in
/opt/hostedtoolcache. This is the case for all
environment variables set by act, but it's not the case for the volume mounted into the container.