Skip to content

Conversation

@davidbuzinski
Copy link
Contributor

This PR addresses 2 issues:

@davidbuzinski davidbuzinski requested a review from mcafaro April 10, 2024 15:10
@davidbuzinski davidbuzinski requested a review from mcafaro April 11, 2024 13:27
@davidbuzinski
Copy link
Contributor Author

davidbuzinski commented Apr 11, 2024

I made a few more changes:

  • In our Windows workaround I added the restore for tool cache into a try-finally block because if steps were failing we were leaving the tool cache as the wrong directory
  • If windows is not detected in the cache as completed due to missing .complete file or some other reason, we were getting problems with the symlinks against a partially completed install
  • add awaits for io.rmRF because I was seeing some weird control flow errors


return actualToolCacheDir;
} finally {
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
Copy link
Member

@mcafaro mcafaro Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this env variable changed above? I don't see it being used after it is change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess it's used by tc.cacheFile behind the scenes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used inside GitHub's tc.cacheFile code (and some of the other tool-cache functions) to locate the tool cache directory on the runner. We set it to the same location on D: to create/ link the install directory then we restore it to it's default C: location at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess it's used by tc.cacheFile behind the scenes?

Yeah exactly

Co-authored-by: Mark Cafaro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup-matlab@v2 with cache: true: Post setup fails randomly (not very often) Conflict between actions/cache and setup-matlab@v2

3 participants