-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Trailing slash in outputs array prevents correct caching #10549
Comments
Fix by removing trailing slash when performing `cp -a` into cache. Add test to confirm fix. Resolves nrwl#10549
I made these changes on my https://github.com/FrozenPandaz/nx-examples/tree/10549 Can you retry with the latest version and/or provide a repo that exhibits the issue? |
Thanks for the work @FrozenPandaz, I've reproduced and tested my fix in your example. I cloned your example above and used latest nx (14.5.1). Note that @niklasravnsborg and I are running on Mac. What platform are you testing? Output reproducing error:
Manually patching with my fix #10708 corrects the error:
nx report:
|
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Please keep issue active. I have re-tried and reproduced with the latest nx. Awaiting review by Nx team. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
There is already a fix for this available. The PR just needs to be reviewed. Is there anyone in the team that can take a look at it? |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Please keep issue active. I have re-tried and reproduced with the latest nx. Awaiting review by Nx team. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Please keep issue active. See comments above. Awaiting review by Nx team. |
Fix by removing trailing slash when performing `cp -a` into cache. Add test to confirm fix. Resolves nrwl#10549
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I created a target with the following configuration:
When I run the target the first time (
nx build myapp
), it properly generateshello.txt
insome-folder-to-cache
. When I run it the second time, there is a cache-hit (Nx read the output from the cache instead of running the command for 1 out of 1 tasks.
), but after thatsome-folder-to-cache
is empty.Expected Behavior
I would expect the previously cached file to still be present.
Reproduction
I found that I can fix the error, when I omit the trailing slash in the outputs array:
instead of
Environment
The text was updated successfully, but these errors were encountered: