Watch the 1st episode of DevProdEng Showdown where a panel of experts debate hot DevProd topics in a rapid-fire game-show-like format (28 Jan | 9-9:30AM PT).
Gradle Enterprise 2019.2
Gradle Enterprise 2019.2 introduces new build performance trend visualizations for Gradle and Maven builds, improved tooling for debugging build cache misses with Maven builds, Java compilation annotation processor profiling for Gradle builds, and advanced administration features to prevent installations from running out of disk space.
Read on for more details.
Use version 1.1 of the Gradle Enterprise Maven extension, and version 2.3 of the Gradle build scan plugin for optimal usage of Gradle Enterprise.
The new build trends dashboard visualizes the trends of key build performance and volume metrics for Gradle and Maven builds. This new visualization complements the existing performance dashboard’s per build visualization by aggregating metrics into day, week and month time intervals.
It can be used to confirm regressions or optimizations and their contributing factors. For example, analyzing the trend of “avoidance savings” (i.e. the amount of time saved by build avoidance measures such as incremental building and building caching) can indicate whether build times have regressed due to reduced effectiveness of avoidance measures.
Learn more in this blog post introducing build trends.
Gradle Enterprise 2018.2 introduced a performance dashboard for visualizing key performance metrics per Gradle build. This is now also available for Maven builds.
This view is particularly useful for identifying spikes and anomalies in behavior and can be used for analyzing trends visualized by the new build trends view mentioned above.
The performance metrics visualized for Maven builds are logically equivalent to those visualized for Gradle builds. Refer to the introduction of this feature for Gradle builds to learn more.
The new Maven goal inputs comparison function identifies causes of a build cache miss, making it faster and easier to optimize and maintain your build’s cacheability. It is the logical equivalent of the task inputs comparison function introduced in Gradle Enterprise 2018.5 for Gradle builds.
Goal executions from both builds are compared and visible if differences are found in the parts relevant to build caching. Added/removed or changed properties are visible, as well as individual input files within those properties. This is especially helpful for tracking down build cache misses caused by timestamps or other always-changing values being written to files during the build.
To view a comparison, select the builds to compare from the build scan list.
You can also select any build scan your are currently looking at for comparison by clicking the comparison button at the top of the build scan.
To fully benefit from the fine-grained granularity of the goal inputs comparison feature, extra data needs to be captured by the Gradle Enterprise Maven extension, which results in Gradle Enterprise using more disk space to store build scans. It is strongly recommended to read the upgrade notes related to goal inputs file capturing for guidance on how to fully benefit from this feature.
The Gradle Enterprise Maven extension now additionally supports caching the following plugins and goals:
- Maven Javadoc plugin
- Maven Checkstyle plugin
- Maven JAXB2 plugin
Please refer to the Gradle Enterprise Maven extension user manual for more details.
In order to safely avoid Maven goal execution by reusing cached results, the Gradle Enterprise Maven extension must know all of the inputs used by a goal and the outputs it produces. While the extension extracts this information automatically for all supported goal types based on the goal’s properties, it is possible to use additional undeclared inputs. For example, tests may access files via the file system directly and not via the runtime classpath. It is now possible to declare such additional inputs and outputs in the POM so that such goals can be safely cached.
The same mechanism may be used to make any goal cacheable, even ones not supported by the Maven extension out of the box. Take great care to define all of the goal’s inputs and outputs before doing so, to avoid false cache hits and downstream errors.
Furthermore, if a test or compile goal is configured with a property or flag that references a file unexpectedly, the goal will automatically be made non cacheable in order to avoid potentially incorrectly caching the result.
Consult the Gradle Enterprise Maven Extension User Manual to learn more about when and how to declare additional inputs and outputs for cacheable goals.
For Java compilation tasks of Gradle builds, the time spent by each annotation processor is now listed in the task inspector within the timeline visualization.
The total time spent by each annotation processor used in the build is also listed within the “Task Execution” tab of the “Performance” section.
Build scans are now collected for composite builds that build an included project to be used as a build plugin.
The time spent building such included plugins is itemized in the “Configuration” tab of the “Performance” section.
Build scans are now collected for each build of continuous builds.
After connecting a remote build cache node to Gradle Enterprise for artifact replication or centralized management, you can now rename it or completely delete its registration from the system.
Nodes can be renamed and deleted from the “Nodes” page within the cache admin section of Gradle Enterprise.
To delete a node, you must first disable it.
Ensuring that your installation never runs out of disk space is now easier. Gradle Enterprise now actively monitors the free disk space available and can initiate different measures at configurable thresholds to avoid filling disk space. Thresholds are specified in terms of percentage of disk space free.
Thresholds can be set for emailing warnings to the administrator email address, automatically deleting older build scans and rejecting new build scans. A typical configuration would be to send warning emails at 15% of space remaining, start deleting old build scans at 10% of space remaining and reject incoming build scans at 5% of space remaining.
Thresholds can be configured in the installation settings.
In order to receive warning emails, the installation must be configured with an SMTP server to use for sending. This can also be configured in the installation settings.
Consult the Gradle Enterprise Admin Manual for more information on managing disk space usage.
Database version upgrade
This release includes a major version update to the internal database used by Gradle Enterprise. Gradle Enterprise may take a few extra minutes to start in order to perform this update, after updating.
Impact of enabling capture of goal input files
The new ability to identify individual files that have changed with goal inputs comparison in Maven builds requires opting in to capture of goal input files with the Gradle Enterprise Maven extension. When this capture is enabled, the build scan information sent to the server includes the path to and a hash of each file used during the build. The extra information must be stored in Gradle Enterprise, increasing its disk usage.
It is recommended to enable capture of goal input files for all builds and to monitor server disk usage for a week after enabling to ensure that your Gradle Enterprise installation has adequate storage capacity for this extra data.
HTTPS errors with Java 11
This version of Gradle Enterprise enables TLS 1.3 for HTTPS connections. This may cause sporadic build cache and build scan connection failures for Gradle and Maven builds running on Java 11 due to bugs in the implementation of TLS 1.3 in the JDK. The error manifests as an exception with a message of “peer not authenticated exception” or similar.
This issue has been fixed in Java 11.0.3. Users using an earlier version of Java 11 can upgrade to this version or later to resolve the issue. Alternatively, the Gradle or Maven build runtimes can be configured to disable TLS 1.3 support by adding a jdk.tls.client.protocols=TLSv1.2 system property which will also resolve the issue.
- [FIX] Search title shows incorrect number of found dependencies on the repository dependencies view
- [FIX] Scans list view doesn't hide duplicate tags in performance dashboard
- [FIX] All containers run as a root user
- [FIX] Migrator apps in k8s run before Postgres has started
- [FIX] Large cache entries cannot be downloaded via the UI
- [FIX] All applications run as user 999, and permissions fixed
- [FIX] Upgrade fails if configured SMTP port does not include a port
- [FIX] Build time in scan header not visible because of wrong color
- [FIX] Gradle branch based versions are supported by scans server
- [FIX] Period at the end of a build cache miss reason is not added if already present
- [FIX] Input comparison file properties expansion not showing when searching
- [FIX] Duplicate tags on the scans list view are duplicated
- [FIX] Kubernetes support bundle
- [FIX] Configuration performance profile is incorrect when callbacks are registered by listeners
- [FIX] Total time is not calculated accurately for scripts and plugins that apply lifecycle listeners
- [FIX] Task inputs comparison cannot be viewed if build scan plugin 1.8 was used
- [FIX] Maven inputs comparison is slow for large builds
- [FIX] User menu dropdown is not displayed correctly
- [FIX] Maven goal inputs summaries are not centered in wide screens
- [FIX] Performance dashboard cannot be navigated with keyboard
- [FIX] Database upgrade may fail if application is not shut down properly
- [FIX] LDAPS server with untrusted certificate cannot be used
- [FIX] Text colour is inconsistent
- [FIX] Build ingest queue metrics are not recorded
- [FIX] Intake partitions are not created with database autovacuum disabled
- [FIX] Postgres upgrade fails when the install user is not `postgres`
- [FIX] Cancelling a database backup does not stop the process cleanly
- [FEATURE] Build performance trend visualizations
- [FEATURE] Performance dashboard for Maven builds
- [FEATURE] Maven goal inputs comparison
- [FEATURE] Caching of Javadoc, Checkstyle, and JAXB Maven goals
- [FEATURE] Declaration of additional inputs / outputs on supported Maven goals
- [FEATURE] Improved visualization of local cache misses on Maven build scans
- [FEATURE] Java compilation annotation processor profiling
- [FEATURE] Build scans for Gradle composite builds with included plugins
- [FEATURE] Build scans for Gradle continuous builds
- [FEATURE] Delete and rename build cache nodes
- [FEATURE] Improved disk space management
- [FEATURE] Support for TLS 1.3 HTTPS connections
- [FIX] Maven log disappears when extension is applied twice
- [FIX] Skipped cacheable goals are reported as "not cacheable" instead of "skipped"
- [FIX] Local cache issues log a warning instead of failing the build
- [FIX] Maven extension doesn’t respect include/exclude patterns when snapshotting input files
- [FIX] Removal of support for TLS 1.0 and 1.1 for HTTPS connections
- Gradle Enterprise Getting Started Guide for Gradle users
- Gradle Enterprise Getting Started Guide for Apache Maven users
- Gradle Enterprise Administration Manual
- Gradle Enterprise Version Compatibility
- Gradle Enterprise Maven Extension User Manual
- Gradle Build Scan Plugin User Manual
- Build Cache Node User Manual