question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caching on macOS dependent on runner version number in workspace path

See original GitHub issue

Not 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

3reactions
JosephDuffycommented, Jul 14, 2020

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 😃

1reaction
al-chebcommented, Jul 7, 2020

Hello, @mands We have updated a provisioner to use the new /Users/runner/work path. Could you please check from your side?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found