Writing tests is hard. Fixing them is harder. Join the webinar.
Gradle Enterprise 2023.1
Gradle Enterprise 2023.1 brings observability and insights into Gradle artifact transforms, offers a new Build Scan™ query language that provides new capabilities for specifying build criteria using complex logical operators, provides more insights into Predictive Test Selection simulation results and makes user access control management more robust.
Read on for more details of these and other new features.
Use version 1.17.4 of the Gradle Enterprise Maven extension, version 3.13.4 of the Gradle Enterprise Gradle plugin, version 2.0.3 of the Gradle Enterprise Test Distribution Agent, and version 15.0 of the Gradle Enterprise Build Cache Node for optimal usage of Gradle Enterprise.
Highlights
Observe artifact transforms in the Timeline view for Gradle builds
The Timeline view of a Gradle Build Scan™ now visualizes the time spent executing artifact transforms for project artifacts and provides identifying information about the transformations. This is particularly relevant for Android builds as artifact transforms are often a significant portion of the work performed.
Artifact transforms are a concept from dependency management. When Gradle resolves artifacts for a configuration and finds that they are not in the required format, Gradle can convert them to the requested format by running artifact transforms. Users do not directly request these transforms; if a task requires artifacts as input, Gradle runs the appropriate transforms before the task executes. For project artifacts declared as file inputs, Gradle schedules their transforms between relevant tasks or other units of work in the execution phase. Artifact transforms can depend on tasks or other transforms and can even run in parallel to tasks within the same project.
Artifact transform execution can fail as well. Depending on how the task consumes the transformed artifacts, this may or may not cause the build to fail. Regardless of the build outcome, any failures during the execution of artifact transforms are displayed on the Failure page and the Failures dashboard, providing developers with visibility into any issues that may arise during the build process.
Upcoming releases of Gradle Enterprise will expand on this new functionality to provide insights on build cache effectiveness of transforms as well as other finer-grained performance insights.
Specify Build Scan™ criteria using a powerful and concise query language
The new advanced search feature allows specifying search criteria via a query language on all dashboards. This makes searching for a Build Scan™ and defining data sets for analysis more concise and convenient, once you are familiar with the intuitive syntax. It can be used to perform searches that are not possible with the form-based basic search interface due to the ability to arbitrarily combine logical operators such as “not” and “or”.
Click the (?) icon next to the “Query” label in one of your dashboards after toggling “Advanced search” for a complete reference of all language syntax and available field names.
As this is the first version of the advanced search feature, certain syntactic aspects may change in upcoming releases based on your feedback.
Observe why Predictive Test Selection would have selected a test during simulation
The Predictive Test Selection simulation dashboard now provides a summary breakdown into the reasons why tests were unavoidable, i.e. they would have been selected if Predictive Test Selection were actually used.
This summary helps when examining simulation results and reasoning about variance in savings potential across builds and Predictive Test Selection efficacy in general.
Moreover, to help find test tasks/goals with incorrect predictions, the table of tasks/goals can now be filtered to show only those rows with incorrect predictions:
Compatibility with new build cache extension for Apache Maven™
The new Apache Maven Build Cache extension from the Apache Maven Project provides an alternative build caching approach and implementation for Maven 3.9 and later. This is different from the Gradle Enterprise Extension for Apache Maven that brings Gradle Enterprise features such as Build Scan™, Build Caching, Predictive Test Selection, and Test Distribution to Maven 3.3.1 and later.
Expect a detailed analysis of the differences and pros and cons of the different approaches from the Gradle Enterprise team in the near future.
To make it easier to experiment with this new extension from the Apache Maven Project, it can be used with Gradle Enterprise and Gradle Enterprise remote build cache nodes, leveraging the same access control and replication configuration. This can be achieved by using https://«server»/cache-maven as the remote server address, where «server» is the hostname of your Gradle Enterprise server or remote build cache node.
The XML file produced by this new extension is also viewable as part of the Build Scan™ in the Build cache section of the Performance view. This file provides a high-level overview of the build cache outcomes for the new extension.
Easier-to-manage access control roles
Roles in Gradle Enterprise have been revamped to make it easier to manage permissions across a large set of users.
Administrators can now create custom roles to represent different personas within the organization (such as “Developer”, “Productivity Engineer”, or “Administrator”), granting appropriate permissions to each role. When using an external Identity Provider via LDAP or SAML, each role can then be mapped to a role attribute value provided by the external system.
When upgrading from previous versions, new roles are automatically created that convey the same permissions as the previous single-permission roles defined by the system. This means that the access control configuration is unchanged after upgrading. However, it is recommended that you review your roles and their configuration after upgrading and take the opportunity to simplify the configuration by creating persona-based roles.
Automate user deprovisioning and modification with System for Cross-domain Identity Management (SCIM) support
The System for Cross-domain Identity Management (SCIM) standard enables external identity providers to proactively notify service providers, such as Gradle Enterprise, when changes are made to a user’s account or role memberships. Without SCIM automation in place, service providers only become aware of user changes the next time they sign in to the application via the identity provider.
All users leveraging external user management via LDAP or SAML should enquire whether their identity provider supports the SCIM standard and, if so, register Gradle Enterprise as a SCIM-enabled service provider to benefit from automated user deprovisioning and role-assignment modifications.
Please refer to the Gradle Enterprise Administration Manual for more information.
Faster build cache startup and reduced IO overhead for very large caches
Previously, build cache installations with millions of cache entries and anything less than a very fast SSD disk available could suffer from slow startup times and non-negligible IO overhead during startup and steady-state operation. Now, internal cache indexes and metadata are stored in an alternative format that reduces administrative IO, at the expense of using slightly more disk space.
After upgrading, such installations should notice significantly faster startup and reduced IO overhead. Installations with caches containing less than millions of cache entries or using very fast disks are unlikely to notice a significant difference.
This change applies to the built-in build cache node of Gradle Enterprise 2023.1 as well as version 15 of the separately deployable build cache node.
Automatically enable Gradle Enterprise for all Gradle and Maven builds when using Atlassian Bamboo
The recent introduction of the Gradle Enterprise Bamboo plugin makes it easier to enable Gradle Enterprise for all CI builds without needing to edit any Gradle build scripts or Maven POM files.
This functionality is beneficial for organizations with an existing set of diverse projects. It makes the profound insights of a Build Scan available without requiring project owners to make any changes. It allows teams to monitor build performance and failure rates across all projects.
The plugin adapts to various Gradle and Maven versions and usage patterns. It supports any explicit Gradle Enterprise configuration in projects, such as additional project-specific build tags and metadata.
The plugin is available via Atlassian Marketplace.
Similar plugins already exist for Jenkins and TeamCity. Plugins for additional CI providers are intended in the future.
Upgrade notes
Build Cache Node and Test Distribution Agent now require a Java 17 runtime
The required runtime version of Java has changed from 11 to 17 in this release for both the Build Cache Node and the Test Distribution Agent. If you are currently using their JAR distribution, please install a Java 17 compatible runtime environment on your server. In the interim, you can continue to use older versions to connect to Gradle Enterprise.
For the Test Distribution Agent Docker image, the bundled JDK is used to run the agent process itself and to fork JVMs to execute tests. Therefore, if you are relying on the JDK 11 version provided by the image to execute tests, please follow the instructions in the documentation to build a custom image that also contains JDK 11.
Deprecation of pre-2021.3 versions of Test Distribution Agent, Test Distribution Gradle Plugin, and Gradle Enterprise Maven Extension (for use with Test Distribution)
Using Test Distribution with versions older than Test Distribution Gradle plugin 2.2, Gradle Enterprise Maven extension 1.11, or Test Distribution agent 1.6 is now deprecated. These versions were introduced before Gradle Enterprise 2021.3 and use a communication protocol that requires manually specifying JVM arguments on JDK 17 and later. Therefore, support for them will be removed in 2023.2. Please check your builds and agents and update them as necessary.
The maximum number of build cache entries may reduce after upgrading
Internal changes to the build cache service now require more disk space for internal bookkeeping, leaving less room for build cache entries. The degree of the change depends on the number of entries stored in the cache. Caches with a million entries or more may experience a reduction in available disk space for cache entries by up to 2GiB, which is expected to have a negligible impact on build cache effectiveness.
Deprecation of anonymous access to build cache configuration
Allowing anonymous access to the “Configure build caches” permission (formerly known as “Build cache admin” in earlier versions of Gradle Enterprise) is deprecated. It will be removed in future versions of Gradle Enterprise.
Backups created by Gradle Enterprise 2019.2 or earlier can no longer be restored directly
Backups made using Gradle Enterprise 2019.2 or earlier cannot be restored directly to an installation of Gradle Enterprise 2023.1 (or later). Backups from any version after 2019.2 may still be restored directly to a Gradle Enterprise 2023.1 installation.
To restore a backup from Gradle Enterprise 2019.2 or earlier to a Gradle Enterprise 2023.1 installation, you will first need to restore to a pre 2023.1 version and then either upgrade that installation or create a backup of that installation and restore it to a 2023.1 installation.
Changes
- [FIX] SAML-based login may fail after upgrading an installation incepted with 2020.4 or earlier to 2022.4
- [FIX] Predictive Test Selection build-time requests may fail for large test suites
- [FIX] Application shutdown may be delayed when using S3 object storage
- [FIX] Standalone installation allows insecure TLS 1.0 and 1.1 connections
- [FEATURE] Database setup allows configuring database role
- [FIX] Database user credentials configured directly in helm are ignored if an existing secret exists
- [FIX] Database migration fails when rerun
- [FIX] Database setup script makes temporary grant to wrong role in some circumstances
- [FIX] Embedded database version updated to latest patch release
- [FIX] Build cache event cleanup can cause database transaction deadlocks
- [FIX] Increased resource usage in some multi-node environments when S3 storage is used
- [FIX] S3 storage expects content length header
- [FIX] Build scan timeline generation may fail for builds with very early running artifact transforms
- [FIX] Exception not shown in the test section in some circumstances
- [FIX] Cannot expand / collapse tests whose names do not fit in viewport
- [FIX] Gradle Build Scan fails to display if build fails due to user-code in dependency resolution
- [FIX] Maven Build Cache Extension requires preemptive auth for authenticated reads
- [FIX] Switching from externally-managed role membership to locally-managed does not reset memberships
- [FIX] Switching from externally-managed role membership to locally-managed creates roles with incorrect names
- [FIX] All roles must be unnecessarily mapped to externally defined roles
- [FIX] External access control roles may map to local role via role name instead of role mapping value
- [FIX] Deleting access control role via user interface may silently fail
- [FIX] Performing LDAP connection test hides configuration-change-save banner
- [FIX] Build Scan uploading and viewing may temporarily fail after upgrading to 2023.1
- [FIX] Build Scan viewing may sporadically fail when the system is accepting many build scans
- [FIX] Out of memory error when generating a support bundle
- [FIX] LDAP settings test button may incorrectly indicate success
- [FIX] “Roles” table does list name as display name
- [FIX] Assigning a default role to existing users fails after upgrading to 2023.1
- [FIX] Delete role confirmation dialog incorrectly indicates that the role is used by 0 users
- [FIX] Application does not start in ipv4 only environments
- [FIX] IdP role mapping section uses display name for role labels
- [FIX] Edit user page allows adding roles in selector control for users with externally managed roles
- [FIX] LDAP settings test errors when using anonymous connections
- [FIX] First launch after 2023.1 upgrade may incur very long startup time
- [FEATURE] Observe artifact transforms in the Timeline view for Gradle builds
- [FEATURE] Specify Build Scan™ criteria using a powerful and concise query language
- [FEATURE] PTS Simulation dashboard shows unavoidable reason breakdown
- [FEATURE] PTS Simulation dashboard allows filtering for task/goals with incorrect predictions
- [FEATURE] Apache Maven Build Cache extension build report can be downloaded via Build Scan™
- [FEATURE] Build cache is compatible with Apache Maven Build Cache extension
- [FEATURE] Persona-based access control roles can be defined
- [FEATURE] External IdP user modifications are propagated via SCIM 2.0
- [FEATURE] Gradle “attributes” API build model includes excluded tasks
- [FEATURE] Test Distribution admin interface shows which agent last used the registration key
- [FEATURE] Application background work can be relegated to a separate process
- [FEATURE] Experimental support for Azure Blob Storage
- [FIX] Visualization of non-method test failures in Build Scan™ and Tests dashboard is inconsistent
- [FIX] Gradle critical path analysis may select build-logic-building tasks
- [FIX] Build Cache Node may be slow to start for very large caches
- [FIX] Use of Istio for network management causes startup failure
- [FIX] Default system user password should be unique for each installation
- [FIX] Support bundle may omit data if system is heavily loaded
- [FIX] Support bundle capture process requires unsafe “pod exec” permission
- [FIX] Exported installation config should use a consistent entry ordering
- [FIX] Database migrations may fail when storing many days of Build Scan™ data