Skip to content
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

Move RYE_HOME from workspace home to runner home #194

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Conversation

eifinger
Copy link
Owner

@eifinger eifinger commented Mar 3, 2024

Having it "suddenly appear" in the repo root confused some tools like rye fmt. We assume that the directory that gets created for the current workflow run is a stable path between workflow runs. If several repositories get checked out or some logic interacts on the workspace level this might lead to unintented behaviour. If this turns out to be a real issue we have to look into using TMPDIR and try to create stable paths there.

Several runs of the same repository on the same runner might run with different options. These must not interfere and thus the .rye folder must not be left over after the run. The only way to ensure that is to always run the post step of the action. Since there is (currently) no way to determine if the workflow succeeded or failed when the post step is started (it is possible to run or not run it) we will always save the cache. Since we are only caching .rye and .venv there should be no errors because of this.

Breaking: The cache will always be saved, even if the workflow failed.

Fixes: #193

@cnpryer cnpryer mentioned this pull request Mar 3, 2024
@eifinger eifinger force-pushed the move-rye-home branch 6 times, most recently from 6a0e2c5 to 789b102 Compare March 3, 2024 19:30
Having it "suddenly appear" in the repo root confused some tools like `rye fmt`. We assume that the directory that gets created for the current workflow run is a stable path between workflow runs. If several repositories get checked out or some logic interacts on the workspace level this might lead to unintented behaviour. If this turns out to be a real issue we have to look into using TMPDIR and try to create stable paths there.
@eifinger eifinger merged commit 9dddc34 into main Mar 3, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.rye folder location
1 participant