Gradle Enterprise 2022.2

Gradle Enterprise 2022.2 brings general availability of Predictive Test Selection for Gradle and Apache Maven™ builds, providing faster developer feedback by executing only the most relevant tests for a change. Maven users can also now benefit from Build Cache acceleration for non-clean builds.

Read on for more details of these and other new features.

Use version 1.14.4 of the Gradle Enterprise Maven extension, version 3.10.3 of the Gradle Enterprise Gradle plugin, version 2.3.5 of the Gradle Enterprise Test Distribution Gradle plugin, version 1.6.14 of the Gradle Enterprise Test Distribution Agent, and version 12.5 of the Gradle Enterprise Build Cache Node for optimal usage of Gradle Enterprise.

Highlights

Predictive Test Selection

Gradle Enterprise Predictive Test Selection increases developer productivity by automatically and intelligently selecting and executing the subset of tests that are most relevant to a code change, providing faster feedback. It is now available for Gradle and Apache Maven™ builds and is complementary to other Gradle Enterprise build acceleration features such as Build Caching and Test Distribution.

Predictive Test Selection usage

Gradle Enterprise develops a predictive model by observing code changes and test outcomes from your Build Scan™ data. It combines ongoing learning about your project structure and tests with training from millions of test executions across many projects in order to make accurate predictions.

The Build Scan™ of a Predictive Test Selection enabled build indicates which tests were selected and which weren’t, along with the reason why. It also indicates how much time was saved by skipping the not selected tests.

Predictive Test Selection prediction explanation

Usage across sets of builds can be observed via the Predictive Test Selection dashboard, which visualizes the impact for each test task or goal.

Predictive Test Selection dashboard

Gradle Enterprise also provides a Predictive Test Selection Simulator that facilitates making an informed decision about which projects and builds should enable Predictive Test Selection.

See the Predictive Test Selection User Manual to learn more and get started with Predictive Test Selection.

Predictive Test Selection is not enabled by default for Gradle Enterprise installations. If you would like to enable it for your installation, please contact your customer success representative.

Use read-only build caching for non-clean Maven builds

Previously, the Maven Build Cache was completely disabled when the “clean” lifecycle phase was not part of the Maven invocation. This meant that outputs of prior builds were not loaded from cache and therefore such builds did not benefit from build caching at all. With this release, build cache usage automatically switches to read-only mode when “clean” is omitted allowing the build to benefit from build cache acceleration.

For such “non-clean” builds, writing cache entries remains disabled. Non-clean Maven builds often yield inconsistent output, which makes them unsuitable for writing to the build cache. Both the remote and the local cache now have a “StoreEnabled” setting that is captured in the Build Scan™.

Using read-only build caching for non-clean Maven builds requires Gradle Enterprise Maven extension 1.14+.

Better observability of Gradle configuration cache performance

The configuration cache is a Gradle build tool feature that significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds. Using the configuration cache, Gradle can skip the configuration phase entirely when nothing that affects the build configuration, such as build scripts, has changed.

The “Configuration” tab of the “Performance” page of Gradle Build Scans now conveys how much time was taken to write to or read from the configuration cache, depending on whether the configuration cache is enabled for the build, and if the build is storing to or loading from the configuration cache.

Measuring the impact of the Gradle configuration cache requires Gradle version 7.5+ and Gradle Enterprise Gradle plugin 3.10+.

Airgap installation for Helm-based installations

With Gradle Enterprise 2022.1, a new installation method was introduced. It is now possible to use this method to install Gradle Enterprise to standalone hosts or Kubernetes clusters that cannot connect to the internet via an “airgap installation”. It requires downloading all of the installation materials as a single bundle on an internet-connected host, then transferring that bundle to the installation destination.

Airgap installation requires a specific license type. Please contact your customer success representative before attempting an airgap installation to obtain the right type of license.

PostgreSQL version support expanded

Previously, only PostgreSQL 12 was supported when employing a user-managed database. Now, PostgreSQL 13 or 14 may also be used.

Upgrade notes

If upgrading from a version of Gradle Enterprise prior to 2022.1, be sure to also consult the release notes for all interim versions.

Runtime network connectivity requirements for Helm-based installations

Starting with 2022.2, Gradle Enterprise instances installed with Helm validate their licenses with Gradle over the internet. Once running, Gradle Enterprise will periodically check for license updates. Before upgrading a Helm-based installation to Gradle Enterprise 2022.2, make sure that https://harbor.gradle.com is reachable from the Gradle Enterprise instance’s network.

See Gradle Enterprise Helm Standalone Installation Manual -> Network connectivity requirements or Gradle Enterprise Helm Kubernetes Installation Manual -> Network connectivity requirements for more information.

If your installation is not internet-connected, you will need to convert your installation to an airgap installation. Please contact your customer success representative if you need to do this.

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.

Predictive Test Selection updates in 2022.2.5

Improvements to Predictive Test Selection in this release, that improve its effectiveness, require model retraining and data reindexing.

For installations that have enabled Predictive Test Selection or the Predictive Test Selection Simulator, this occurs automatically upon upgrade and may temporarily degrade performance. During this time, Predictive Test Selection will be unavailable with all tests being selected at build time, and simulation data will be unavailable. Most installations will complete this process within 24 hours.

Users that have not enabled Predictive Test Selection or the Predictive Test Selection Simulator are unaffected.

Changes

Jul 22, 2022
  • [FIX] - Tests expanded section performance is improved
Jul 11, 2022
  • [FIX] - External TLS termination does not work reliably when terminator does not set X-Forwarded headers
  • [FIX] - Task/goal input comparison does not match files with same logical identity using absolute path relativization
  • [FIX] - Task/goal input file comparison does not match relativized files when the build was executed on a Windows OS
  • [FIX] - Gradle builds with many requested tasks may not be visible in the Build Scan list and dashboards
  • [FIX] - Build data maintenance may corrupt build data under rare circumstances
Jun 27, 2022
  • [FIX] - Loading page shows error when using external TLS termination and Helm-based installation
  • [FIX] - Clicking build cache node "Preemptive replication" help icon toggles setting
  • [FIX] - Embedded database does not start if a backup was running when the system was terminated
  • [FIX] - Gradle Enterprise fails to start if built-in build cache node config file is on read-only volume
  • [FIX] - Predictive Test Selection may over-select when different user home directories are used in different environments
Jun 09, 2022
  • [NEW] - Installation license can be viewed in application by administrators
  • [FIX] - Test Selection Simulator does not abbreviate large numbers
  • [FIX] - Links from Predictive Test Selection dashboard to Build Scan results do not always indicate matching test
  • [FIX] - Build cache may exhaust disk space if available space is less than declared exclusive volume size
  • [FIX] - Gradle dependency view may not load when many dependency variants are used
  • [FIX] - Error during database backup may prevent subsequent backup from completing and cause excessive disk space usage
May 19, 2022
  • [FIX] - Background data processing may overwhelm server with few CPUs
  • [FIX] - Predictive Test Selection Simulator reports serial time for “mean duration” instead of wall clock time
  • [FIX] - Gradle dependencies comparison fails when using Ivy repositories
  • [FIX] - Gradle Enterprise may fail to start if network is unavailable on startup
  • [FIX] - Predictive Test Selection does not work with Gradle tasks that subclass the standard Test task type
  • [FIX] - Files corrupted during upload cause errors on Test Distribution agents
May 06, 2022
  • [FIX] - Deprecations usages expansion unexpectedly changes scroll position and truncation page
  • [FIX] - Support bundles do not contain application metrics
  • [FIX] - Gradle Enterprise may fail to start after crash during data maintenance
May 02, 2022
  • [FIX] - Inter-section Gradle Build Scan links may be incorrect when using composite builds
  • [FIX] - Predictive Test Selection dashboard queries over large data sets may fail to display due to timeout
  • [FIX] - Predictive Test Selection simulator shows no data if Predictive Test Selection is not enabled
  • [FIX] - Maven Build Scan timeline may fail to display if build fails very early
  • [FIX] - Installations with many Maven Build Scans may fail to upgrade to 2022.2
  • [FIX] - Bazel Build Scan may fail to display if workspace status generation fails
Apr 19, 2022
  • [NEW] - Reduce build time with Predictive Test Selection
  • [NEW] - Use read-only build caching for non-clean Maven build invocations
  • [NEW] - Better observability of Gradle configuration cache performance
  • [NEW] - Airgap support for Helm-based installations
  • [NEW] - Expanded PostgreSQL support
  • [FIX] - Navigating to the console log of a failed Maven goal execution is not straightforward
  • [FIX] - Bazel builds with long running actions may fail to create a build scan
  • [FIX] - Bazel may fail to download large files from the build cache
  • [FIX] - Comparing Gradle dependencies without variants may cause an error
  • [FIX] - Comparing Gradle task inputs where the Gradle User Home directory is registered as a file input causes an error
  • [FIX] - Using timestamps with nanos in dashboard queries produces incorrect data
  • [FIX] - Execution phase duration of Gradle composite builds requesting only included build tasks is incorrect
  • [FIX] - Scan list and dashboard URLs can become very long
  • [FIX] - LDAP referrals cannot be used for role membership