-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Outputs that lay outside of the workspace folder are not restored from cache when daemon is used #7131
Comments
There seems to be some really funky business going on. I am able to partially reproduce the same issue in wsl, but the cache tar file looks different. I will investigate this further on the original windows pc where this first occurred on Tuesday with the same turbo version, and update the issue accordingly. |
The issue seems to be a little different than I first thought. It is related to the properly cached files not being restored when deleted from disk when using the daemon. I think it might also be OS specific, will do some further testing tonight. |
I also encountered this issue today. As long as the target directory is outside the workspace, deleting it and executing build again will not restore it. I hope the author can fix this issue as soon as possible. It's urgent. Thank you |
@yizixu from my testing, as long as you run with There is no warning if this name is incorrect. |
@rafaeltab I am using pnpm exec turbo run build in jenkins. I am sure I am using workspace name. I will try it tomorrow - no-daemon. If it works, I will come back to thank you, my benefactor. |
I doubt that the no-daemon solution will work in that case, as the problem is related to the daemon thinking the files don't have to be restored as they are already on disk. This is less likely to occur in a CI environment, it is more likely to be a configuration issue, other caching issue, or a separate problem with turbo. Nevertheless give it a try tomorrow, and if it is not the solution let me know here. You can go to the Turbo Discord server or the GitHub Discussions for further assistance with your problem. |
Unfortunately, const filterParams = apps.reduce((pre, cur) => {
pre.push(`--filter=${cur}`)
return pre
}, [])
await execa('pnpm', ['exec', 'dotenv', '--', 'turbo', 'run', 'build', ...filterParams, '--concurrency=20', '--no-daemon'], {
stdio: 'inherit'
}) But my approach is rather special, because I need to assemble the dist folders of all packages into a special directory, so the |
@rafaeltab Now I think this problem can be ignored. I changed the |
Reasonably certain I've traced what was going wrong here, at least with the daemon piece. Fixed in #7327 |
### Description - Change type signature on daemon client to require `ValidatedGlob` instances be passed - Add some debug logging to `GlobTracker` about what globs we are tracking and what file paths invalidate a glob ### Testing Instructions Existing test suite Fixes #7131 Closes TURBO-2301 --------- Co-authored-by: Greg Soltis <Greg Soltis>
Verify canary release
Link to code that reproduces this issue
https://github.com/rafaeltab/turborepo-outside-workspace-repro
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows & WSL2
Which canary version will you have in your reproduction?
TBD
Describe the Bug
When caching files that lay outside the workspace directory they are not restored when using the daemon.
On the first run of
turbo run build
using this config a cache file is created, which contains the correct../../dist
folder. However after deleting the folder, and runningturbo run build
again, the folder is not restored from the cache.Turbo gives the message:
files already on disk
(exact message will be added soon)Expected Behavior
The
dist
folder should be restored.To Reproduce
npm install
npm run build
dist
folder in the root of the repodist
folder in thepackages/example-0
workspacenpm run build
again (should be FULL TURBO)The
dist
folder is not populated with the cached files.The
dist
folder inside thepackages/example-0
workspace is populated with the cached filesTURBO-2251
The text was updated successfully, but these errors were encountered: