Free training on Gradle, Maven, and Develocity at DPE University Get started today
Gradle Enterprise 2021.4
Gradle Enterprise 2021.4 features a preview of the upcoming Predictive Test Selection functionality, in the form of a simulator that shows the potential build acceleration for your projects. Predictive Test Selection intelligently reduces build times by skipping tests that are very unlikely to provide useful feedback for a change.
This release also features Build Scans for the Bazel build tool – a build tool based on Google’s internal build system – further expanding the build tools supported by Gradle Enterprise.
Read on for more details of these and other new features.
Use version 1.12.4 of the Gradle Enterprise Maven extension, version 3.8.1 of the Gradle Enterprise Gradle plugin, version 2.2.3 of the Gradle Enterprise Test Distribution Gradle plugin, version 1.6.14 of the Gradle Enterprise Test Distribution Agent, and version 11.1 of the Gradle Enterprise Build Cache Node for optimal usage of Gradle Enterprise.
Highlights
Predictive Test Selection Simulator
Predictive Test Selection intelligently reduces build times by skipping tests that are very unlikely to provide useful feedback for a change. Inspired by similar internal systems at Facebook and Google, this system automatically learns a test selection strategy from code changes and test execution history to predict relevant tests to run. It is particularly useful for large projects with test suites that take a considerable amount of time.
With this release of Gradle Enterprise, you can enable the “Predictive Test Selection Simulator” which allows you to see how Gradle Enterprise Predictive Test Selection would impact your project were it to be used. Future versions of Gradle Enterprise will allow you to actually use Predictive Test Selection to realize the benefits visualized by the simulator.
The simulator allows you to estimate the effectiveness of Gradle Enterprise Predictive Test Selection for a target set of builds by comparing predictions to actual test results. Through the simulator you can inspect prediction results by test task and trace possible incorrect predictions to their test logs, in order to gain a full understanding of the efficacy of the system.
Gradle Enterprise Build Scans for Bazel builds
Gradle Enterprise now provides Build Scans for Bazel builds, further expanding the build tools supported by Gradle Enterprise.
Gradle Enterprise leverages Bazel’s native build event service and remote cache functionality, which allows Bazel builds to publish Build Scans to Gradle Enterprise without any significant build modifications.
After adding the following to your project’s .bazelrc file:
Bazel Build Scans provide shareable access to the console logging, build performance profile, action cache hit rate, requested target results and failure diagnostics, effective build configuration options, build environment and detailed individual test results. Additionally, the Tests Dashboard can be used to identify the slowest, most failing, and flakiest individual tests across many builds based on different search criteria.
For more information on configuring Bazel builds to publish Build Scans to Gradle Enterprise, please see the Bazel Configuration Guide.
Visualize inputs normalization configuration differences for Gradle and Maven builds
Gradle 6.8 and Gradle Enterprise Maven extension 1.8 added directory sensitivity normalization for file inputs, while Gradle 7.2 and Gradle Enterprise Maven extension 1.11 added line ending sensitivity. Gradle Enterprise 2021.4 visualizes these new normalization settings when comparing task or goal inputs, and when they differ between builds.
Additionally, the text displayed by the (?) icon next to the normalization settings provides more detailed information about the actual effect of the normalization settings.
Automatic target cache size management
Build cache nodes can now be configured to use as much space as is available on the disk to store cache artifacts. This is often useful when the build cache node uses a dedicated storage volume, which is common when the build cache node is deployed in containerized environments. This setting avoids the need to synchronize the storage volume size with a target cache size.
By default, a free space buffer of 1 GiB will be maintained with the cache size being automatically reduced should another process or application use more of the available disk space.
To enable automatic target cache size management, change the Target cache size from Fixed to Maximum available.
Upgrade notes
Temporarily degraded performance due to data reindexing
Upon upgrading, a data reindexing process will be initiated in the background with Gradle Enterprise being usable for its duration. CPU usage will be increased and performance may be slightly degraded. For large installations storing many build scans, the reindexing process may take several hours. During this time, some builds may be omitted from cross-build data visualizations. Recent builds are prioritized, making their data available sooner.
Kubernetes database data and backup volume split
For Kubernetes installations, database backups will now be created in their own persistent volume and will no longer share the database data volume. Before applying this upgrade we strongly recommend copying any existing backups outside the cluster, as they will otherwise be lost.
By default, a new 250 GB persistent volume will be provisioned to store the database backups. This is configurable and may need to be increased inline with your database size and how many backups you wish to retain. You can execute the following command to see what your current backup storage requirements are:
Changes
- [FIX] - Gradle Build Scan failure for embedded Gradle build links to console output of embedded task
- [FIX] - Build Scan task/goal inputs comparison indicates non-existent difference when builds use different platform file separator
- [FIX] - Build Scans for Gradle 7.4 IDE sync builds cannot be viewed
- [FIX] - Predictive Test Selection significantly increases database storage requirements for some builds
- [NEW] - Predictive Test Selection Simulator supports Maven builds
- [FIX] - Changing page of list Build Scan data while element is focussed causes error
- [FIX] - Export API requires base64 encoded access key as bearer token
- [FIX] - Disk space is not reclaimed while deleting many builds
- [FIX] - Viewing build scans of large builds concurrently may cause out-of-memory error
- [FIX] - Built-in build cache node does not warn when configuration is insecure
- [FIX] - User-managed database setup scripts fail when used on Azure
- [FIX] - Maven goal and Gradle task inputs comparison fails when goal uses root module dir as input
- [FIX] - Upgrade Log4j to 2.17.1 (see https://security.gradle.com/advisory/2021-11)
- [FIX] - Selecting a task in the timeline graph does not scroll to details view
- [FIX] - Viewing a build scan summary for a very large can be sporadically very slow
- [NEW] - Measure the potential benefits of the upcoming Predictive Test Selection
- [NEW] - Build scans for Bazel builds
- [NEW] - Visualize all inputs normalization features in build scans comparison
- [NEW] - Automatically use the maximum possible target cache size
- [FIX] - Update Log4j to version 2.17.0 (see https://security.gradle.com/advisory/2021-11)
- [FIX] - Slowest tests are not visible on the Tests dashboard when there are no failing tests
- [FIX] - Tests dashboard does not visualize test classes with more than 32K test methods
- [FIX] - Administration error messages are not always cleared when discarding a configuration change
- [FIX] - Build scan navigation menu items are not responsive when already selected
- [FIX] - Build scan navigation breadcrumbs are not efficient for navigating
- [FIX] - Build cache configuration warning message for early-included builds is confusing