-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[CALCITE-5785] fmppMain tasks use absolute paths for input hashes and don't work with remote build caching #3272
Conversation
I've updated the commit message to match guidelines - is there a way to re-trigger the check? |
2c5d170
to
f1a91ba
Compare
Hi @akshayabd . You can ask on the dev list to get a CI approval for your first contribution. |
I've approved the CI for this PR. To re-trigger the CI if there is no code changes, you can add a empty commit to your branch, see more in the contributing guide |
The intention of this PR is clear, and it looks great to me. However, I'm not familiar with gradle build caches, I'm curious that is there anything that could show the effect of this change? |
Currently you can reproduce this issue by doing the following:
You will notice that most tasks that are cacheable are not executed in the 2nd build, the outputs are fetched from the remote cache. However the fmppMain tasks, though they are marked as cacheable, will re-execute and the outputs are not fetched from the remote cache. This is because the input cache key uses the absolute paths of the codegen directory, which will be different for the 2 clones. The cache key should use the relative paths. You can read more about this below in the Gradle docs: https://docs.gradle.org/current/userguide/build_cache.html#header And here: I've also attached a couple of screenshots from build scans in the JIRA issue that show the input cache key differences: -- At the end of the day this PR impacts build performance only. The fmppMain tasks will not be executed if the outputs can be gotten from the cache - which will now correctly happen because of how the input cache key is computed. |
@ILuffZhe @libenchao I've sent a message on the dev list (dev@calcite.apache.org) to introduce myself |
@akshayabd, You changed 'fix' to 'update' but you missed the point. The point is to describe the problem, not the fix, in your jira summary and commit message. The problem, is that remote caching doesn't work, right? Can a committer please fix the commit message and jira summary? |
… don't work with remote build caching
f1a91ba
to
71e8bdc
Compare
@julianhyde Thanks - I've amended the commit message and PR title - please let me know if there are other changes that need to be made |
Kudos, SonarCloud Quality Gate passed! |
Looks like the change has been merged in: I'm going to close this PR. |
The :babel:fmppMain and :server:fmppMain tasks currently do not work with remote build caching.
One of the inputs is a directory and currently it's configured to look at the absolute path instead of the relative path. This causes different input hashes to be computed on different machines, hence the tasks do not work correctly with remote build caching.
This PR addresses the issue by making the hashes for input directories look at the relative path.