-
Notifications
You must be signed in to change notification settings - Fork 161
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
When set disable_http_ac_validation, enable_ac_key_instance_mangling will not work #791
Comments
Hi, I'm not sure I understand the problem yet, but these two configuration settings should be independent:
Could you provide a test case that shows the problem? |
Sure. I'll give an example, and I think it will be easily for you to reproduct. Here is my command to start a bazel-remote server locally:
Than I run bazel build with this remote cache and instance named 'test'
The second 'bazel build' is aim to validate cache hit. Of course all caches hit.In my machine, it is 264/270 as below:
Than I changed the instance to 'test2' with below command:
As expected, it should not hit any cache. However, it still hits all cache:
I think it is easy to find the root cause. In below code, only when kind==AC, the hash will be transformed. Lines 215 to 217 in a563ac2
The kind and hash are decided in below code: Line 208 in a563ac2
Then let's see the func parseRequestURL: Lines 114 to 118 in a563ac2
Only when validateAC==true, it will return AC, otherwise it will retuen RAW. And the variable validateAC is decided by settings --disable_http_ac_validation. So, when disable_http_ac_validation==true, the kind will permanently be RAW, and the hash will never be transformed. |
I think it's not hard to fix this problem. And I provide my pr, which has run in our bazel-remote cache with my forked repo, in #792 . |
Merged- thanks. |
Hi, there. I'm using bazel-remote as our cache, my command to run progress is:
And I find that the enable_ac_key_instance_mangling doesn't work: no matter how I change instance in .bazelrc, it always hit all caches.
I find in server/http.go Line 215:
So, when disable_http_ac_validation==true, the function TransformActionCacheKey will never work.
I forked this repo, and modified these code, it seems work well.
So, here is my question: Is this by design? If not, I am happy to offer my pr to fix it.
The text was updated successfully, but these errors were encountered: