Slide 1

Slide 1 text

Troubleshooting Gradle and Apache Maven Stefan Wolf Alex Semin Oleg Nenashev with Develocity

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Hello, World! Stefan Wolf Build Scans Team / Jenkins plugins maintainer 4 Alex Semin Configuration Team / BT User Success Group Oleg Nenashev DevRel & Education Team / Dev Tools community builder

Slide 5

Slide 5 text

Async Q&A: Gradle Community Slack, Testcontainers and WireMock Slack speakerdeck.com/onenashev

Slide 6

Slide 6 text

Today, 2nd of December 6 ● The Presentation and Demos - Live ● Q&A after the presentation - Live ● Any meetings/discussions - in Munich ○ Share your Gradle Build Tool experiences with Alex ○ Ask Stefan about Build Scans and Develocity ○ Any questions about Gradle! ● Later: Online meeting with other offices?

Slide 7

Slide 7 text

Talk Outline ● Some Mythbusters ● Intro to Gradle Builds Troubleshooting ● Show & Tell for Gradle and Apache Maven 7 The information contained in this presentation and the roadmap (and the "Roadmap") is intended to outline our general product direction, which is subject to change at any time. The content provided in this Roadmap is provided for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code, or functionality and should not be relied upon in making purchasing or other decisions. The development, release and timing of any features or functionality described in this Roadmap remains at the sole discretion of Gradle, Inc. Product capabilities, timeframes and features are subject to change and should not be viewed as commitments.

Slide 8

Slide 8 text

The Elephant in the Room? Amadeus loves Apache Maven, … and we too!

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Disclaimer 10 Gradle != Gradle Build Tool in this presentation It’s not a “Gradle vs Maven” talk Gradle is about both Maven and Gradle Build tool

Slide 11

Slide 11 text

1 1 And we mean it Valentine Day’s post

Slide 12

Slide 12 text

+

Slide 13

Slide 13 text

13 See ge.apache.org helps Used in Beam, Groovy, Kafka, Lucent, Pulsar, Solr, etc. ● 37 onboarded projects ● 31 days per week - savings from the build cache ● 116 days per week - savings from all caching ● 30k builds per week ● 503d of total build time per week

Slide 14

Slide 14 text

What is Gradle, really?

Slide 15

Slide 15 text

15 Developer Productivity Engineering (DPE)

Slide 16

Slide 16 text

16

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

What do Gradle users say? (*) * based on user feedback, not Android specific

Slide 19

Slide 19 text

Developer Productivity Engineering (DPE) gradle.com/ developer-productivity-engineering

Slide 20

Slide 20 text

20 (f.k.a. Gradle Enterprise)

Slide 21

Slide 21 text

TL;DR: * we do not actually suggest moving

Slide 22

Slide 22 text

22 https://gradle.com/develocity/

Slide 23

Slide 23 text

DevelocityTM Build Scan® “X-Ray” for Gradle, Maven, Bazel, & sbt (CI & Local) Platform Flaky Test Management Build Scan & Comparison Performance & Failure Reporting Vulnerability & Compliance Reporting Out of the Box & Custom Reporting & Visualization Test Failure Analytics Benefits Test Distribution AI-Powered Predictive Test Selection Build Cache | Developer Productivity Platform Observability & Traceability Build & Test Acceleration Faster Troubleshooting

Slide 24

Slide 24 text

We gave 20,000 developers back two hours per day by cutting Maven build and test times by over 60%. Top 3 Global Investment Bank

Slide 25

Slide 25 text

For many FOSS projects: we sponsor Develocity licenses / SaaS hosting help with optimization and DPE Maven, Bazel and sbt users welcome! gradle/develocity-oss-projects gradle/develocity-oss-projects

Slide 26

Slide 26 text

Troubleshooting Gradle

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Source: https://www.brainyquote.com/quotes/naoto_kan_510414

Slide 29

Slide 29 text

So, we… 1. Discover the issue 2. Analyze the issue 3. Apply the fix 4. Verify the issue is gone 29

Slide 30

Slide 30 text

So, we… 1. Discover the issue 2. Analyze the issue 3. Apply the fix 4. Verify the issue is gone 30 Observability

Slide 31

Slide 31 text

31

Slide 32

Slide 32 text

32 Gradle Core Features ● Gradle includes many troubleshooting capabilities ● We work on improving reporting and stack traces ● NEW: Problems API and reporting

Slide 33

Slide 33 text

Problems HTML Summary Report in Gradle 8.11

Slide 34

Slide 34 text

For performance profiling 34

Slide 35

Slide 35 text

35

Slide 36

Slide 36 text

Develocity | Observability is the Foundation Observe Accelerate Troubleshoot 36

Slide 37

Slide 37 text

37

Slide 38

Slide 38 text

○ Build Scan and Troubleshooting ○ Local and Distributed build caching ○ Flaky test detection ○ Local build observability ○ // And more! 38 for Gradle and Apache Maven Troubleshooting

Slide 39

Slide 39 text

Flaky Tests 39

Slide 40

Slide 40 text

a. Try it again b. Re-run it c. Re-run it again d. Ignore it and approve PR e. All of the above The test is flaky. What do you do now? 40

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Flaky test handling ⬢ Detection ○ Test retries ○ Develocity ⬢ Flaky tests don’t fail the build ⬢ Fixing ○ New very flaky test on the spot ○ Regular flaky fix-it days 42

Slide 43

Slide 43 text

43 https://ge.apache.org/scans/tests?search.buildToolType=maven&search.relativeStartTime=P28D& search.timeZoneId=Europe%2FBerlin&tests.sortField=FLAKY

Slide 44

Slide 44 text

Underutilized CPU resources 44

Slide 45

Slide 45 text

45 https://gradle.grafana.net/d/gradle-cpu-usage/gradle-cpu-usage?o rgId=1&from=now-7d&to=now&timezone=browser

Slide 46

Slide 46 text

46 https://ge.gradle.org/s/3spxtqmeeioze/timeline

Slide 47

Slide 47 text

Build Caching 47

Slide 48

Slide 48 text

:compileJava :compileTestJava inputs actions outputs Gradle Tasks / Maven Goals 48

Slide 49

Slide 49 text

:compileJava :compileTestJava 💻 Gradle Tasks / Maven Goals 49

Slide 50

Slide 50 text

:compileJava :compileTestJava 💻 UP-TO-DATE FROM-CACHE Build Cache Build Cache / Maven Goals 50

Slide 51

Slide 51 text

51

Slide 52

Slide 52 text

Demo Time! 52

Slide 53

Slide 53 text

Live Demo: What can we show? ● Analyzing slow smoke tests ● Surfacing flaky tests in the Spring Boot or Armeria ● Analyzing Build and Configuration cache speed ● Discovering differences on CI generated jars causing integration tests to rerun - Micronaut, / Maven ● /// and More! 53 gradle/develocity-oss-projects

Slide 54

Slide 54 text

If you watch the slides offline … 54

Slide 55

Slide 55 text

Build Time Reduced by 50% & Test Time by 60% Case Studies | Netflix Total test time reduced 60% Even Faster Total test time reduced 60% Build Time Dropped 50%!

Slide 56

Slide 56 text

110+ Days in CI and Local Test Savings with Predictive Test Selection in 30 Day Period L o c a l CI Serial testing time that could have been avoided (purple) vs unavoidable (gray) in a single day 33.3 days of serial testing time that could have been avoided if PTS was enabled 1.1M tests (42% of all tests) that could be avoided if PTS was used Local Builds CI Builds

Slide 57

Slide 57 text

14% of builds that have had at least 1 test fail 9% of builds that have had at least 1 flaky test (same test fails then passes in the same build) Sorting by Flaky column will show the test classes with the most flaky tests Flaky and Failed Tests Identification and Prioritization

Slide 58

Slide 58 text

Test Times Before and After Develocity Test Distribution | 2 Projects Case Studies | Netflix After Test Distribution Before Test Distribution Impact ○ (2) Projects ○ 33 Tasks ○ Before: ○ 1 hour 2 min ○ After: ○ 4 min 59 secs ○ Savings: ○ 57 min 1 sec

Slide 59

Slide 59 text

The End? 59

Slide 60

Slide 60 text

What can you do? ● Ask your DevEx team about Develocity ○ Ongoing deploy/enablement ● Share your feedback with us! ● Learn Gradle Build Tool, Apache Maven and Develocity on DPE University 60

Slide 61

Slide 61 text

dpeuniversity.gradle.com DPE University Take a dive into Gradle! 61

Slide 62

Slide 62 text

6 Gradle courses for all levels of experience DPE University dpeuniversity.gradle.com 62

Slide 63

Slide 63 text

dpeuniversity.gradle.com DPE University Maven & Develocity 63

Slide 64

Slide 64 text

References ● Gradle Build Tool roadmap: https://roadmap.gradle.org/ ● Develocity for Gradle Build Tool: gradle.com/gradle-enterprise-solutions/gradle-build-tool/ ● Develocity fort Apache Maven: https://gradle.com/gradle-enterprise-solutions/maven-build-tool/ ● Public Develocity instances for FOSS projects: https://gradle.com/customers/oss-projects/ 64

Slide 65

Slide 65 text

Gradle Community Slack, #developer-productivity 65 Open Questions?