Caching on macOS dependent on runner version number in workspace path
See original GitHub issueNot fully sure if this belongs in this repo or the runner repo (https://github.com/actions/runner) - however when using the GH-hosted macOS runner, the workspace directory includes the runner version number in the path, e.g.
linux - "/home/runner/work/repo-name"
Windows - "d:\\a\\repo-name"
macOS - "/Users/runner/runners/2.169.1/work/repo-name"
This breaks all caches that include files with absolute paths in them as the runner is updated, for instance any Python executable installed and cached will have entrypoint stub scripts that point to the interpreter with an absolute shebang - however this will break as the runner version is updated, e.g.
#!/Users/runner/runners/2.169.0/work/repo-name/.venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
For now I’m extracting the runner version number from the path on macOS and adding as a cache parameter, but this is unexpected behaviour.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Runner path on macOS changes · Issue #713 - GitHub
The path the action being run in changes, which means that caching SwiftPM is not possible because it will fail with the following...
Read more >CircleCI's self-hosted runner FAQs
How do caching, workspaces, and artifacts work with CircleCI's self-hosted runners? Caches, workspaces, and artifacts are methods you can implement to help ...
Read more >Advanced configuration - GitLab Docs
For example, a value of 10 means no more than 10 jobs can run concurrently. ... cache_dir, Absolute path to a directory where...
Read more >WorkSpaces macOS client application - AWS Documentation
Release Date Changes
5.5.0 November 14, 2022 Updated the WSP client SDK.
5.3.0 September 15, 2022 Bug fixes and enhancements.
5.1.0 June 30, 2022 Updated PCoIP...
Read more >Debugging and diagnosing cache misses - Gradle User Manual
Run a build twice without enabling the Gradle build cache. ... If you find a task which is out of date, but no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has also been discussed at https://github.com/actions/virtual-environments/issues/713 where I mentioned this being an issue with SwiftPM.
I’m seeing the path is now
/Users/runner/work/{repo}/
so I think this solved the problem.I’m mainly commenting to link the 2 issues but also to say thank you 😃
Hello, @mands We have updated a provisioner to use the new
/Users/runner/work
path. Could you please check from your side?