gradle-enterprise-build-validation-scripts icon indicating copy to clipboard operation
gradle-enterprise-build-validation-scripts copied to clipboard

Build Validation Scripts do not retain GE-specific remote cache config

Open tylerbertrand opened this issue 2 years ago • 1 comments

The Build Validation Scripts do not appear to retain configuration specific to the GE remote cache connector or the GE plugin.

Here are the two specific instances of this issue I've come across:

  1. allowInsecureProtocol was set to true, but the local build for Experiment 5 failed with Using insecure protocols with remote build cache, without explicit opt-in, is unsupported. The workaround for this was to add allowInsecureProtocol=true to the validation scripts' remote cache init script.
  2. accessKey was configured through the GE plugin extension, but the local build for Experiment 5 was failing to authenticate with the remote cache. This was resolved by configuring the access key in keys.properties

Ideally all GE configuration applied to the project would be carried over to the script executions.

(Note that resolving the allowInsecureProtocol issue would require updating the GE API to include the value of allowInsecureProtocol.)

tylerbertrand avatar Sep 22 '23 21:09 tylerbertrand

In general, this can happen if authentication is required to access the remote build cache (i.e. anonymous remote build cache reads are not allowed).

As a workaround for this issue, you can comment out this section in lib/gradle-init-scripts/configure-remote-build-caching.gradle:

https://github.com/gradle/gradle-enterprise-build-validation-scripts/blob/76e34444a85234f8add65973e039dcb6310e50ba/components/scripts/gradle/gradle-init-scripts/configure-remote-build-caching.gradle#L17-L23

This assumes the build is already configured with correct remote build cache settings, which is generally the case at this point in the process.

erichaagdev avatar Mar 27 '24 18:03 erichaagdev