Skip to content

Commit

Permalink
Allow disabling the simple blob caches via CLI flag overrides.
Browse files Browse the repository at this point in the history
This fixes a regression from v0.13. When the local disk cache flags were
unified into `--disk_cache`, it became impossible to override a default
cache location such that the cache became disabled. This prevents
canarying of remote execution in the presence of a default bazelrc that
enables the disk cache.

Fixes #5308

Closes #5338.

PiperOrigin-RevId: 199613922
  • Loading branch information
jmillikin-stripe authored and Copybara-Service committed Jun 7, 2018
1 parent 708b957 commit 6b16352
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static boolean isRemoteCacheOptions(RemoteOptions options) {
}

public static boolean isDiskCache(RemoteOptions options) {
return options.diskCache != null;
return options.diskCache != null && !options.diskCache.isEmpty();
}

static boolean isRestUrlOptions(RemoteOptions options) {
Expand Down

2 comments on commit 6b16352

@or-shachar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmillikin-stripe - Can you please check out this - bazelbuild/bazel-toolchains#80
I failed to disable that flag even with --disk_cache=""

@jmillikin-stripe
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me in my local build of Bazel. Lets do the debugging in that issue.

Please sign in to comment.