Gradle Enterprise 2022.4

Gradle Enterprise 2022.4 makes class-level faults and bottlenecks in JVM-based tests for Gradle and Apache Maven™ easier to identify and diagnose, increases the predictive accuracy of Predictive Test Selection without sacrificing time savings, and enables programmatic administration of Test Distribution agents.

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

Use version 1.16.1 of the Gradle Enterprise Maven extension, version 3.12.2 of the Gradle Enterprise Gradle plugin, version 1.6.14 of the Gradle Enterprise Test Distribution Agent, and version 14.0 of the Gradle Enterprise Build Cache Node for optimal usage of Gradle Enterprise.

Highlights

Discontinuation of Replicated-based installation options

In March 2022, Gradle Enterprise 2022.1 introduced a new installation approach based on Helm. The previous Replicated-based installation process was deprecated, with Gradle Enterprise 2022.3 – including its patch updates – being announced as the last version that would be installable via the Replicated-based process. It was also announced that installations based on the Replicated process would no longer be supported as of January 2023.

Gradle Enterprise 2022.4 is only installable using the new Helm-based approach. If you have not yet updated your installation to use the Helm-based process, you will need to do so before you can install 2022.4.

The adoption of Helm as the basis of installing Gradle Enterprise was motivated by feedback from users wanting to take advantage of the various tooling that has emerged around Helm as it has become a de facto standard. Organizations are increasingly familiar with these tools and prefer Helm-based workflows for installing and updating software.

Users wanting to deploy to a single host and not wanting to use Kubernetes directly can use k3s as a single-host Kubernetes runtime, which abstracts away Kubernetes details for simplified deployments.

A migration guide is available which is the best place to start learning more. If you have any questions or concerns about migrating, contact Gradle Enterprise technical support for assistance.

Increased observability of JVM class-level test events for Gradle and Maven

Commonly used JVM test frameworks based on JUnit and TestNG often employ class-level setup and teardown logic that executes outside of the scope of test methods. These parts of the test lifecycle are now independently observable in a Build Scan™ and in the Tests dashboard with Gradle Enterprise 2022.4.

The Build Scan now indicates whether a FLAKY outcome for a test class was due to its test methods or class-level setup/cleanup. It also presents the overall time spent executing the setup/cleanup lifecycle methods of a test class as well as its wall clock and serial time. Additional details about individual test class executions such as class-level exceptions, console output and executed test methods can be found on a dedicated details page.

The class-level duration and outcome data across sets of builds can be observed via the class-level view of the Tests dashboard. In addition to the serial duration of a test class, the extended performance chart now also displays the wall clock time and own duration trends of a selected test container. The dedicated “Class setup/cleanup” tab provides an additional outcome trend identifying builds with unstable executions of setup/cleanup methods and displays a summary of the most recent class-level failures.

Class-level test insights require at least Gradle 2.5 or Gradle Enterprise Maven extension 1.16 with a compatible testing framework (JUnit Platform, TestNG 6.9.13.3+, or JUnit 4.13+).

Increased predictive accuracy of Predictive Test Selection

Improvements to the machine learning model used by Predictive Test Selection in this release increases the likelihood of predicting non-flaky test failures, without sacrificing savings. Testing with the JUnit, Spring Security and Spring Boot projects showed 45% fewer missed test failures compared to the previous version of Gradle Enterprise. This was achieved by enriching the model’s understanding of different file types, as well as leveraging new information about test inputs changed outside of the project workspace.

If you are using Predictive Test Selection, please be sure to read the upgrade notes below before upgrading.

Predictive Test Selection with Gradle Enterprise 2022.4 requires Gradle Enterprise Gradle plugin 3.12+ or Gradle Enterprise Maven extension 1.16+.

Build Cache compatibility with Predictive Test Selection for Maven builds

Enabling Predictive Test Selection for a test goal no longer disables Build Cache compatibility for Maven builds, removing the need to execute tests under certain circumstances.

Test goal executions with Predictive Test Selection enabled and where all tests are selected are now cached and can be reused by subsequent builds that have enabled Predictive Test Selection and those that have not. Similarly, test goal executions with Predictive Test Selection enabled can now reuse outputs from prior executions for the same inputs and where Predictive Test Selection was disabled, such as a post-merge CI build.

Predictive Test Selection for Maven with Gradle Enterprise 2022.4 requires Gradle Enterprise Maven extension 1.16+.

Manage Test Distribution agent configuration via the Gradle Enterprise API

Test Distribution agent pools and keys can now be managed via the Gradle Enterprise API, making it easier to automate provisioning of agents in more complex environments.

The functionality of the existing pool status endpoint used for autoscaling agents is now also available via the Gradle Enterprise API, which is considered the preferred method for accessing the information. The previous endpoint is considered deprecated and will be removed from Gradle Enterprise in a future release.

Please refer to the API reference documentation for details.

Automatically enable Gradle Enterprise for all Gradle and Maven builds when using Jenkins or JetBrains TeamCity

Recent improvements to the Jenkins Gradle plugin and the TeamCity Build Scan plugin have made it easier to enable Gradle Enterprise for all CI builds without needing to edit any Gradle build scripts or Maven POM files.

This is particularly useful for organizations with an existing set of diverse projects, as it makes the deep insights of a Build Scan available without requiring project owners to make any changes and allows teams to start monitoring build performance and failure rates across all projects.

The plugins adapt to a wide range of Gradle and Maven versions and usage patterns, and support any explicit Gradle Enterprise configuration in projects such as additional project-specific build tags and metadata.

Similar plugins are intended for additional CI providers in the future.

Faster build cache node startup

Gradle Enterprise build cache nodes now start much faster, particularly for caches with many items. This applies to the built-in build cache node available as part of Gradle Enterprise 2022.4 and version 14 of the separately deployable build cache node.

More convenient enabling of retry-on-failure for Gradle builds

The ability to have tests in Gradle builds be retried on failure in order to identify test flakiness is now provided by the Gradle Enterprise Gradle plugin, removing the need to use the separately distributed Test Retry Gradle plugin. The provided functionality and API are the same, making adopting the Gradle Enterprise plugin’s retry functionality easy.

While either can be used with Gradle Enterprise, it is recommended that Gradle Enterprise users adopt the Gradle Enterprise plugin’s retry functionality for ensured future compatibility and easier adoption of future Gradle Enterprise specific features. Please see the migration guide.

The included test-retry functionality is available starting with Gradle Enterprise plugin 3.12.

Upgrade notes

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

Pre-upgrade database configuration required for superuser-less user-managed databases

Gradle Enterprise installations can use an embedded database provided as part of the installation, or a user-managed database for superior performance and operability. When using a user-managed database, Gradle Enterprise can be configured with superuser access to the database so that it can initialize and configure the database appropriately. Alternatively, this initialization and configuration can be executed manually, avoiding the need to provide Gradle Enterprise with superuser access to the database.

For installations using the superuser-less approach, new configuration requirements in Gradle Enterprise 2022.4 necessitate manually executing an updated configuration script as part of the upgrade.

If your installation uses the superuser-less approach, please contact Gradle Enterprise support to obtain the new configuration scripts before upgrading. If you are unsure whether your installation uses this approach and requires this extra upgrade step, please contact Gradle Enterprise support.

Predictive Test Selection temporary unavailability after upgrading and build plugin version requirement changes

The improvements to the prediction model in this release require re-analyzing build history, which is initiated automatically after upgrading. Attempting to use Predictive Test Selection while this is occurring will result in all tests being selected for execution. The duration of this process depends on the amount of build history stored by your installation and the availability of CPU resources. It is estimated to take ~24 hours for an installation with a build history of 6 months of 60,000 builds per week and 8 processor cores. Due to this, it is recommended that installations using Predictive Test Selection perform the version upgrade at the end of week to allow this process to complete over the weekend.

Predictive Test Selection with Gradle Enterprise 2022.4 requires Gradle Enterprise Gradle plugin v3.12+ or Gradle Enterprise Maven extension v1.16+. Attempting to use Predictive Test Selection with older versions will result in all tests being selected for execution. The Predictive Test Selection Simulator is unaffected by this requirement.

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.

Inclusion of Gradle Test Retry plugin functionality in Gradle Enterprise Gradle plugin

Users of the Test Retry Gradle plugin can now achieve the same functionality with the Gradle Enterprise Gradle plugin.

While either can be used with Gradle Enterprise, it is recommended that Gradle Enterprise users adopt the Gradle Enterprise plugin’s retry functionality for ensured future compatibility and easier adoption of future Gradle Enterprise specific features. Please see the migration guide.

Changes

Dec 20, 2022
  • [NEW] Gradle Enterprise notifies the user when the currently used license is expired
  • [FIX] S3 errors can cause processing of incoming build scans to halt
  • [FIX] Support bundles generated through administration interface are corrupt
  • [FIX] Support bundle generation through administration interface can hang
  • [FIX] Support bundle generation can fail in some setups
  • [FIX] Overridden environmental variables can cause server to not start
  • [FIX] Imported configuration is not always applied
  • [FIX] Disabling identity provider in administration interface causes error
  • [FIX] Some Tests dashboard views may cause out-of-memory error
  • [FIX] Browser hangs on some build scans when clicking a task predecessor or successor
  • [FIX] Java vendor names in Build Scan infrastructure and timeline sections are reported differently
  • [FIX] Build Scan timeline section header can be hidden by other controls
  • [FIX] Badges are rendered out of place in Safari
Dec 08, 2022
  • [NEW] Increased observability of JVM class-level test events for Gradle and Maven
  • [NEW] Increased predictive accuracy of Predictive Test Selection
  • [NEW] Build Cache compatibility with Predictive Test Selection for Maven builds
  • [NEW] Manage Test Distribution agent configuration via the Gradle Enterprise API
  • [NEW] Gradle task `skipReasonMessage` is shown in task details inspector in timeline
  • [NEW] Gradle Enterprise API `/builds` endpoint supports reverse time search
  • [NEW] Log volume capacity is configurable during installation
  • [FIX] Build cache nodes with many files and slow disk are slow to start
  • [FIX] Bazel functionality cannot be used when using plain HTTP and not HTTPS
  • [FIX] Task/goal inputs comparison displays a confusing message when no task/goal are compared
  • [FIX] Local user account login succeeds when using the email address as username
  • [FIX] Predictive Test Selection fails with an unclear reason if test task/goal input files could not be determined
  • [FIX] SAML serviceProvider.xml export is incorrect when using HTTPS
  • [FIX] Support bundle download may fail when bundle size is large