SlideShare une entreprise Scribd logo
1  sur  33
Apache Yetus: Precommit
Allen Wittenauer
Effective Machines
August 28, 2018
Apache Yetus is a collection of libraries and tools
that enable contribution and release processes
for software projects.
3© 2013 Liz West https://www.flickr.com/photos/calliope/9070783026
precommit (aka test-patch)
42,000+ JIRA Issues filed
against Apache Hadoop
2018-08-30
Initial (Primary) Goals
Project consistency
Actionable feedback for contributors w/out a committer
Tool that also ran locally
62018-08-30
7
8
2018-08-30
Rewrite (Primary) Goals
Project consistency
Actionable feedback for contributors w/out a committer
Tool that also ran locally
Branch support
Reduce load on ASF Jenkins
– Smarter analysis: don't run useless tests
Better UI; cleaner output
Modularity = easy to add new test types
92018-08-30
10
11
12
2018-08-30
Rewrite Goals, Revised
Project consistency
Actionable feedback for contributors w/out a committer
Tool that ran locally
Branch support
Reduce load on ASF Jenkins
– Smarter analysis: don't run useless tests
Better UI; cleaner output
Modularity = not only pluggable tests, but pluggable projects
132018-08-30
14
15
16
2018-08-30
Compiled Language Support
– C/C++
– Java
– Scala
Interpreted Language Support
– bash/ksh/sh: shellcheck
– perl: Perl::Critic
– Python: pylint
– Ruby: rubocop, ruby-lint
Tool Support (part 1)
Build Tools
– ant
– autoconf
– cmake
– gradle
– maven
– make
– “nobuild”
Bug Systems
– Bugzilla (RO)
– GitHub
– JIRA
172018-08-30
2018-08-30
Unit Test Formats
–ctest
–Junit
–TAP
Runtime Support
–Automation (e.g., Jenkins)
–Docker-ized build environments
–Multiple JVMs
–Patch branches
–Per-instance maven repos
–Resource limit protections
–Various reporting formats
Tool Support (part 2)
Specialized Tests
– Apache RAT
–@author
–Dockerfile lint
–Java checkstyle
–Javadoc
–Java findbugs
–maven site
–path length
–Scaladoc
–whitespace
–XML
In Development
– OWASP Dependency Checks
182018-08-30
What if the entire source
tree was treated as the patch?
test-patch --empty-patch
qbt (quality build tool)
2018-08-30
qbt Goals
Stop Missing Tests
Reduce ASF Jenkins Load
Consistency
– All sub-projects built the same way
– Nightly builds using same params, environment, output as patch testing
"Comprehensive Follow-up"
– API expectations missing from unit tests
– Inter-module findbugs issues
What is the actual state of the source tree?
222018-08-30
Output
24
2018-08-30
test-patch Output: Header
Overall Vote:
– Bad:
– Good:
252018-08-30
2018-08-30
test-patch output: Vote Table
262018-08-30
Pre-Check
Compile Cycle
(Branch)
Compile Cycle
(Patch)
Unit and
other Tests
2018-08-30
test-patch Output: Test Failure Table
272018-08-30
2018-08-30
test-patch Output: Footer
282018-08-30
Configuration
Information
More info
on Failures
Configuration
Information
Misc. Hints
2018-08-30
Git Hub Support
Multiple ways to get the PR:
– GH:<PR #>
– GHSHA:<PR SHA>
– https://github.com/your/repo/pull/##
– https://github.com/your/repo/pulls/##.patch
– https://github.com/your/repo/pulls/##.diff
– JIRA comment (if enabled)
Branch awareness = merge branch of the PR
Squashed commits work better
– Yetus does not honor the commit order vs. parent branch
i.e., git apply not git merge
– Per-line commenting goes a bit wonky (if enabled)
302018-08-30
Patch File Naming Conventions
JIRA Project
and Issue
Number
Branch Revision Patch Filename
HBASE-55 Master 0 HBASE-55.000.patch
HBASE-55 Master 3 HBASE-55.003.patch
HBASE-55 branch-1 0 HBASE-55-branch-1.000.patch
HBASE-55 branch-1.2 2 HBASE-55.branch-1.2.002.patch
HBASE-55 branch-1 2 HBASE-55.branch-1.2.patch ??
Log Files are the Key
Located in --patch-dir/Jenkins artifact dir/linked in footer
Three kinds
– Full logs of build tool runs
– Individual test logs
– Diffs of pre- and post- runs
Tell them apart:
– "Before": branch-*
– "After"/qbt: patch-*
– diffs of the two: diff-*
– Ant/Maven/etc module
– JDK version (MultiJDK mode only)
Generics lack -fixes
2018-08-30
Administrivia
Website: https://yetus.apache.org
Mailing list: dev@yetus.apache.org
Twitter: @ApacheYetus
Current Release: 0.7.0 (2018-01-29)
(0.8.0 undergoing vote right now)
Yetus is an archaic synonym of the Cymbium genus of gastropods
First ASF TLP with a ‘Y’
332018-08-30

Contenu connexe

Tendances

The what why and how of web analytics testing
The what why and how of web analytics testingThe what why and how of web analytics testing
The what why and how of web analytics testing
VodqaBLR
 
Speed upyourtest with_appium
Speed upyourtest with_appiumSpeed upyourtest with_appium
Speed upyourtest with_appium
VodqaBLR
 

Tendances (20)

Cassandra Summit 2014: Astyanax — To Be or Not To Be
Cassandra Summit 2014: Astyanax — To Be or Not To BeCassandra Summit 2014: Astyanax — To Be or Not To Be
Cassandra Summit 2014: Astyanax — To Be or Not To Be
 
Continuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyreContinuous Integration for Spark Apps by Sean McIntyre
Continuous Integration for Spark Apps by Sean McIntyre
 
No more waiting for API - Android Stub Server
No more waiting for API - Android Stub ServerNo more waiting for API - Android Stub Server
No more waiting for API - Android Stub Server
 
Office365 user admin_w_powershell
Office365 user admin_w_powershellOffice365 user admin_w_powershell
Office365 user admin_w_powershell
 
Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...Optimize your delivery and quality with the right release methodology and too...
Optimize your delivery and quality with the right release methodology and too...
 
Faraday Blackhat 2011 Arsenal
Faraday Blackhat 2011 ArsenalFaraday Blackhat 2011 Arsenal
Faraday Blackhat 2011 Arsenal
 
Simple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloySimple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium Alloy
 
Apache Flink Hands-On
Apache Flink Hands-OnApache Flink Hands-On
Apache Flink Hands-On
 
5分で作る開発環境
5分で作る開発環境5分で作る開発環境
5分で作る開発環境
 
Deploying Straight to Production
Deploying Straight to ProductionDeploying Straight to Production
Deploying Straight to Production
 
The what why and how of web analytics testing
The what why and how of web analytics testingThe what why and how of web analytics testing
The what why and how of web analytics testing
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
 
Speed upyourtest with_appium
Speed upyourtest with_appiumSpeed upyourtest with_appium
Speed upyourtest with_appium
 
Selenium Conference 2015 - Mobile Selenium Grid Setup
Selenium Conference 2015 - Mobile Selenium Grid SetupSelenium Conference 2015 - Mobile Selenium Grid Setup
Selenium Conference 2015 - Mobile Selenium Grid Setup
 
Device Testing with AWS Device Farm
Device Testing with AWS Device FarmDevice Testing with AWS Device Farm
Device Testing with AWS Device Farm
 
Making Angular2 lean and Fast
Making Angular2 lean and FastMaking Angular2 lean and Fast
Making Angular2 lean and Fast
 
Run somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmRun somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarm
 
Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014
 
Set­up continuous integration for apache rya (incubating)
Set­up continuous integration  for apache rya (incubating)Set­up continuous integration  for apache rya (incubating)
Set­up continuous integration for apache rya (incubating)
 
Selenoid i Allure - jak używać tych narzędzi razem
Selenoid i Allure - jak używać tych narzędzi razemSelenoid i Allure - jak używać tych narzędzi razem
Selenoid i Allure - jak używać tych narzędzi razem
 

Similaire à 2018-08-23 Apache Yetus: Precommit

New ThousandEyes Product Features and Release Highlights: March 2023
New ThousandEyes Product Features and Release Highlights: March 2023New ThousandEyes Product Features and Release Highlights: March 2023
New ThousandEyes Product Features and Release Highlights: March 2023
ThousandEyes
 

Similaire à 2018-08-23 Apache Yetus: Precommit (20)

Backup Exec Partner Toolkit
Backup Exec Partner ToolkitBackup Exec Partner Toolkit
Backup Exec Partner Toolkit
 
SB Support System
SB Support SystemSB Support System
SB Support System
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricks
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricks
 
Increase the Velocity of Your Software Releases Using GitHub and DeployHub
Increase the Velocity of Your Software Releases Using GitHub and DeployHubIncrease the Velocity of Your Software Releases Using GitHub and DeployHub
Increase the Velocity of Your Software Releases Using GitHub and DeployHub
 
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
DevOps at TestausOSY 20june2017
DevOps at TestausOSY 20june2017DevOps at TestausOSY 20june2017
DevOps at TestausOSY 20june2017
 
Data and Business Team Collaboration
Data and Business Team CollaborationData and Business Team Collaboration
Data and Business Team Collaboration
 
Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
 
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
API Governance and GitOps in Hybrid Integration Platform (MuleSoft)
 
Analytics & Atlassian Confluence
Analytics & Atlassian ConfluenceAnalytics & Atlassian Confluence
Analytics & Atlassian Confluence
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
New ThousandEyes Product Features and Release Highlights: March 2023
New ThousandEyes Product Features and Release Highlights: March 2023New ThousandEyes Product Features and Release Highlights: March 2023
New ThousandEyes Product Features and Release Highlights: March 2023
 
Starting Pack BI Open Source
Starting Pack BI Open Source Starting Pack BI Open Source
Starting Pack BI Open Source
 
Sprint 71
Sprint 71Sprint 71
Sprint 71
 
Scale By The Bay | 2020 | Gimel
Scale By The Bay | 2020 | GimelScale By The Bay | 2020 | Gimel
Scale By The Bay | 2020 | Gimel
 
Making your first OpenStack contribution (EuroPython)
Making your first OpenStack contribution (EuroPython)Making your first OpenStack contribution (EuroPython)
Making your first OpenStack contribution (EuroPython)
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 

Plus de Allen Wittenauer

Plus de Allen Wittenauer (8)

2019-09-10: Testing Contributions at Scale
2019-09-10: Testing Contributions at Scale2019-09-10: Testing Contributions at Scale
2019-09-10: Testing Contributions at Scale
 
Apache Hadoop Shell Rewrite
Apache Hadoop Shell RewriteApache Hadoop Shell Rewrite
Apache Hadoop Shell Rewrite
 
Let's Talk Operations! (Hadoop Summit 2014)
Let's Talk Operations! (Hadoop Summit 2014)Let's Talk Operations! (Hadoop Summit 2014)
Let's Talk Operations! (Hadoop Summit 2014)
 
Apache Hadoop for System Administrators
Apache Hadoop for System AdministratorsApache Hadoop for System Administrators
Apache Hadoop for System Administrators
 
Hadoop Operations at LinkedIn
Hadoop Operations at LinkedInHadoop Operations at LinkedIn
Hadoop Operations at LinkedIn
 
Hadoop Performance at LinkedIn
Hadoop Performance at LinkedInHadoop Performance at LinkedIn
Hadoop Performance at LinkedIn
 
Deploying Grid Services Using Apache Hadoop
Deploying Grid Services Using Apache HadoopDeploying Grid Services Using Apache Hadoop
Deploying Grid Services Using Apache Hadoop
 
Hadoop 24/7
Hadoop 24/7Hadoop 24/7
Hadoop 24/7
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

2018-08-23 Apache Yetus: Precommit

  • 1. Apache Yetus: Precommit Allen Wittenauer Effective Machines August 28, 2018
  • 2. Apache Yetus is a collection of libraries and tools that enable contribution and release processes for software projects.
  • 3. 3© 2013 Liz West https://www.flickr.com/photos/calliope/9070783026
  • 5. 42,000+ JIRA Issues filed against Apache Hadoop
  • 6. 2018-08-30 Initial (Primary) Goals Project consistency Actionable feedback for contributors w/out a committer Tool that also ran locally 62018-08-30
  • 7. 7
  • 8. 8
  • 9. 2018-08-30 Rewrite (Primary) Goals Project consistency Actionable feedback for contributors w/out a committer Tool that also ran locally Branch support Reduce load on ASF Jenkins – Smarter analysis: don't run useless tests Better UI; cleaner output Modularity = easy to add new test types 92018-08-30
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 2018-08-30 Rewrite Goals, Revised Project consistency Actionable feedback for contributors w/out a committer Tool that ran locally Branch support Reduce load on ASF Jenkins – Smarter analysis: don't run useless tests Better UI; cleaner output Modularity = not only pluggable tests, but pluggable projects 132018-08-30
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. 2018-08-30 Compiled Language Support – C/C++ – Java – Scala Interpreted Language Support – bash/ksh/sh: shellcheck – perl: Perl::Critic – Python: pylint – Ruby: rubocop, ruby-lint Tool Support (part 1) Build Tools – ant – autoconf – cmake – gradle – maven – make – “nobuild” Bug Systems – Bugzilla (RO) – GitHub – JIRA 172018-08-30
  • 18. 2018-08-30 Unit Test Formats –ctest –Junit –TAP Runtime Support –Automation (e.g., Jenkins) –Docker-ized build environments –Multiple JVMs –Patch branches –Per-instance maven repos –Resource limit protections –Various reporting formats Tool Support (part 2) Specialized Tests – Apache RAT –@author –Dockerfile lint –Java checkstyle –Javadoc –Java findbugs –maven site –path length –Scaladoc –whitespace –XML In Development – OWASP Dependency Checks 182018-08-30
  • 19. What if the entire source tree was treated as the patch?
  • 22. 2018-08-30 qbt Goals Stop Missing Tests Reduce ASF Jenkins Load Consistency – All sub-projects built the same way – Nightly builds using same params, environment, output as patch testing "Comprehensive Follow-up" – API expectations missing from unit tests – Inter-module findbugs issues What is the actual state of the source tree? 222018-08-30
  • 24. 24
  • 25. 2018-08-30 test-patch Output: Header Overall Vote: – Bad: – Good: 252018-08-30
  • 26. 2018-08-30 test-patch output: Vote Table 262018-08-30 Pre-Check Compile Cycle (Branch) Compile Cycle (Patch) Unit and other Tests
  • 27. 2018-08-30 test-patch Output: Test Failure Table 272018-08-30
  • 30. 2018-08-30 Git Hub Support Multiple ways to get the PR: – GH:<PR #> – GHSHA:<PR SHA> – https://github.com/your/repo/pull/## – https://github.com/your/repo/pulls/##.patch – https://github.com/your/repo/pulls/##.diff – JIRA comment (if enabled) Branch awareness = merge branch of the PR Squashed commits work better – Yetus does not honor the commit order vs. parent branch i.e., git apply not git merge – Per-line commenting goes a bit wonky (if enabled) 302018-08-30
  • 31. Patch File Naming Conventions JIRA Project and Issue Number Branch Revision Patch Filename HBASE-55 Master 0 HBASE-55.000.patch HBASE-55 Master 3 HBASE-55.003.patch HBASE-55 branch-1 0 HBASE-55-branch-1.000.patch HBASE-55 branch-1.2 2 HBASE-55.branch-1.2.002.patch HBASE-55 branch-1 2 HBASE-55.branch-1.2.patch ??
  • 32. Log Files are the Key Located in --patch-dir/Jenkins artifact dir/linked in footer Three kinds – Full logs of build tool runs – Individual test logs – Diffs of pre- and post- runs Tell them apart: – "Before": branch-* – "After"/qbt: patch-* – diffs of the two: diff-* – Ant/Maven/etc module – JDK version (MultiJDK mode only) Generics lack -fixes
  • 33. 2018-08-30 Administrivia Website: https://yetus.apache.org Mailing list: dev@yetus.apache.org Twitter: @ApacheYetus Current Release: 0.7.0 (2018-01-29) (0.8.0 undergoing vote right now) Yetus is an archaic synonym of the Cymbium genus of gastropods First ASF TLP with a ‘Y’ 332018-08-30

Notes de l'éditeur

  1. Like a toolbox, one doesn't need to use all the tools available to complete a job. This talk will concentrate on only one of them.
  2. This talk is going to focus on precommit. test-patch was a single executable for a very long time so many people know only that part of precommit. I tend to use the terms interchangeably.
  3. This doesn't count the projects that have moved out from underneath the Apache Hadoop umbrella. But that's still a lot of tickets! The only way to handle that many is to automate the process.
  4. Nigel Daley, the first person who was sort of working on QA and release facilities, decided to build such a tool. 1) A tool makes contributors get the some of the same feedback regardless of the person doing the review. 2) It was important that contributors get feedback without the need of a committer to get involved. This greatly reduces both the amount of time needed to get a contribution committed. 3) Running a tool locally means that contributors can get mini-reviews without even uploading the patch!
  5. The first run of test-patch that I could find in JIRA!
  6. Years later, a group of folks associated with ODPi decided to host a bug bash to run through issues. By this time, test-patch was showing its age (it hadn't really been updated in a while.) If a ton of patches got submitted, it would bring the ASF Jenkins infrastructure to its knees...
  7. Enter a major rewrite. Additional goals: Ability to control which branch a patched was being tested on. If a patch is only modifying shell code, it doesn't make sense to run the entire java unit test. If a patch only modifies documentation, don't run unit tests. etc, etc. it also liimits testing to only be where code was modified (As a result, it trades execution time for accuracy during patch testing. More on this later) The old output was hard to read. The old script was one big monolithic script. Very hard to add stuff.
  8. An early run of the new version. Note that this patch took 19s to test vs. the hours it would have otherwise taken.
  9. Good ideas tend to propagate. Nigel's original code got spread out everywhere within the ASF.
  10. Others noticed the work that was happening in Hadoop and wanted to update their version too.
  11. Rather than end up in the exact same pattern, change the code to be smarter: if 95% of the code between projects is the same, why not just make the 5% configurable?
  12. Fast forward... Apache Yetus is born as a top level project feeding a lot of other projects.
  13. A rough outline of test-patch architecture. Almost everything outside of the core driver code is replaceable and expandable by providing more snippets.
  14. Josh Elser was pretty typical of the reactions of the re-write. Everyone was used to seeing everything run all the time and it was shocking that just modifying the build instructions didn't trigger a full build and test of the entire source tree!
  15. Lots of things are supported out of the box!
  16. Runtime support is special: There are special things triggered if you tell test-patch that it is running in an automated environment! Docker-ized build support includes cleaning the local docker image cache as well as killing broken containers that might still be running. Unit tests and other things can be configured to run with multiple JVMs to get better version coverage. 4) Maven doesn't lock the repo, so a very common situation on a lot of build hosts is having two maven runs updating the same maven repo. This is bad because the two runs might stomp all over each other. test-patch can be configured to set the maven repos so this doesn't happen. 5) Most of the work in the past year or so has been spent on adding resource limits to prevent broken build systems from crashing boxes. 6) Reports can be sent to various bug systems so that end users don't have to look at the CI logs to see what happened.
  17. --empty-patch == "no patch was provided, so just look at the source tree as is"
  18. aka daily/nightly builds with precommit as the driver. This provides consistency for both types of builds.
  19. precommit is smart enough to run each maven module (or whatever) separately. This means all unit tests than can run, will run, regardless of what module their in and regardless of whether a previous module failed. Hadoop is a large project. Breaking up the nightly jobs into chunks left a lot of the source basically not getting tested. (I estimate that hadoop-tools wasn't part of a nightly build for *several years*) Additionally, running everything in one job meant all of the startup and shutdown costs were quadrupled 4) in order to combat patch testing accuracy, the nighty build acts as a way to run through the days commits and make sure all is ok.
  20. All the output of a patch run as seen in JIRA!
  21. header is a quick summary
  22. pre-check is mostly "is the patch safe?" "is configuration sane?" etc types stuff. Patches can be failed here and will short-cut to the end of the testing. Next is a precompile->compile->postcompile cycle aka the Compile Cycle. It gets executed for both the source tree prior to the patch and after the patch has been applied. This allows test-patch to pinpoint with really great accuracy exactly what got broken by the patch. In some cases, this also means some stats show how much change. Then unit tests and various other one-offs run.
  23. Some plugins are able to isolate exactly what broke and provide specific guidance. Others are typically to verbose and don't that.
  24. That's ok because access to logs are also provided. Some times these are specifically what's different and sometimes not. It just depends upon the nature of the failure.
  25. When using github, test-patch will test against the branch that the PR was attempting to merge into. It's also important to know that test-patch applies the patch on top of that branch. It is not merge a la a deck of cards.
  26. When using files or JIRA, be careful of how things are named. The bottom one confuses test-patch because a branch-1.2 exists.
  27. When using Jenkins or other CI systems, the patch-dir should be set as the artifacts dir to save off. This allows for people to get to the logs and for test-patch to reference them in the job output.