Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Behind the OSS curtain: How we manage Spring

Phil Webb
September 16, 2015

Behind the OSS curtain: How we manage Spring

How is the open source you use is actually managed? What techniques and tools do successful open source projects use? How are open source projects able to lever the community that they build? This talk will take you behind the scenes of the Spring Framework to show you how we manage code, issues and releases. We'll talk about the tools that we use, how we keep code clean and consistent. and how we use Artifactory/Bintray to manage the bits.

Phil Webb

September 16, 2015
Tweet

More Decks by Phil Webb

Other Decks in Technology

Transcript

  1. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ SPRINGONE2GX WASHINGTON, DC Behind the OSS Curtain How we manage Spring By Baruch Sadogursky & Phil Webb @jbaruch @phillip_webb
  2. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
  3. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Overview • the spring team • the community • The release process & Tools
  4. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
  5. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo Spring Boot
  6. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
  7. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Team • Distributed • Self organizing • Around 2-4 developers per project • small
  8. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ We need help!
  9. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring has issues • 12969 issues to be precise (that’s good)
  10. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ “Make it as painless as possible to contribute or test changes”
  11. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The stack or and
  12. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The stack or
  13. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Raise an Issue your code sucks
  14. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Life of an issue • Format your text • reproduce Unit test or ‘*-issues’ project • Label & Target • fix
  15. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Testing fixes Bamboo + Artifactory Plugin repo.spring.io
  16. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Contribute Documentation you’re grammar sucks
  17. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Documentation HTML +pdf +epub
  18. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Asciidoctor source
  19. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Asciidoctor on github
  20. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Artifactory Properties apache httpd http://docs.spring.io docs.zip cron+perl
  21. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Artifactory Properties <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>attach-zip</id> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>…</file> <type>zip;zip.type=docs;zip.deployed=false</type> </artifact> </artifacts> </configuration> </execution> </executions> </plugin>
  22. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Browsing artifactory http://repo.spring.io/libs-milestone-local/org/springframework/boot/spring-boot-docs/1.3.0.M5/ spring-boot-docs-1.3.0.M5.zip!/reference/htmlsingle/index.html
  23. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Contribute Code let me fix that for you
  24. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Contributing Code • “Single click” Build mvn clean install • Contributing instructions • minimal formatting pain • Checkstyle verification
  25. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Automatic Formatting • Spring Framework is manually formatted • Spring Boot is auto-formatted • Both have project specific eclipse configuration
  26. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ code formatting with Maven <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <additionalConfig> <file> <name>.settings/org.eclipse.jdt.ui.prefs</name> <location>${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs</location> </file> <file> <name>.settings/org.eclipse.jdt.core.prefs</name> <location>${main.basedir}/eclipse/org.eclipse.jdt.core.prefs</location> </file> </additionalConfig> </configuration> </plugin> +github.com/philwebb/m2eclipse-maveneclipse
  27. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ code formatting with Gradle // Include project specific settings task eclipseSettings(type: Copy) { from rootProject.files( "src/eclipse/org.eclipse.jdt.ui.prefs", "src/eclipse/org.eclipse.wst.common.project.facet.core.xml") into project.file('.settings/') outputs.upToDateWhen { false } } tasks["eclipse"].dependsOn(eclipseSettings) github.com/spring-projects/spring-framework/blob/master/gradle/ide.gradle
  28. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo Auto Formatting in Eclipse
  29. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Checkstyle <!-- Annotations --> <module name="AnnotationUseStyle"> <property name="elementStyle" value="compact" /> </module> <module name="MissingOverride" /> <module name="PackageAnnotation" /> <module name="AnnotationLocation"> <property name="allowSamelineSingleParameterlessAnnotation" value="false" /> </module> <!-- Block Checks --> <module name="EmptyBlock"> <property name="option" value="text" /> </module> <module name="LeftCurly" /> <module name="RightCurly"> <property name="option" value="alone" /> </module> <module name="NeedBraces" />
  30. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ the power of git there will be changes
  31. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Dealing pull requests • external and internal • we almost never “just merge” code • Refactor code • Add Tests • fix commit messages
  32. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Commit messages • Commit logs are an amazing debugging tool • Eclipse : Team/Show Annotations • git blame • git log -- /some/file.java • we try to Keep Consistency our logs • We try to “Tell a Story”
  33. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Commit Messages • First line Capitalized, short (50 chars or less) • Second line BLANK • Message wrapped at 72 chars • imperative FORM “Fix bug” not “Fixed”/“Fixing” • reference to a issue number tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html chris.beams.io/posts/git-commit
  34. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Why? • Easy to read in the terminal • Easy to read in the IDE • Looks good on github.com • If you can’t describe a commit in 50 chars, perhaps it should be two commits!
  35. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ commit 12724bf33211d68899d710fda376bd5636731e4c Author: Dave Syer <[email protected]> Date: Thu Feb 12 10:09:19 2015 +0000 Fix ordering of keys in PropertySourcesPropertyValues Since @ConfigurationProperties binding uses a single instance of PropertySourcesPropertyValues per bean, there doesn't seem to be any issue with using a normal LinkedHashMap. Then the order passed in as PropertySources will be preserved. Fixes gh-2487 commit 0ef3de4d82acc32a3f44d872e852d94feb8cd5da Author: Andy Wilkinson <[email protected]> Date: Wed Feb 11 13:15:52 2015 +0000 Document how to disable auto registration of a Servlet or Filter bean Closes gh-2173 commit b18330972884e8cb6832b0bdbd6c9f545dc1f501 Author: Andy Wilkinson <[email protected]> Date: Tue Feb 10 20:14:38 2015 +0000 Stop a BeanPostProcessor from preventing config of packages to scan Previously, if a BeanPostProcessor bean was declared in a configuration class that depended on the persistence context, packages to scan would not be configured on the LocalContainerEntityManagerFactoryBean. This was due to the BeanPostProcessor bean triggering the early instantiation of the LCEMFB before EntityScanBeanPostProcessor, the BeanPostProcessor, that applies the @EntityScan configuration, had been given a chance to configure it. This commit updates EntityScanBeanPostProcessor to implement Ordered with an order of zero. This ensures that its ordering is predictable and that it will be driven before any unordered BeanPostProcessor. This means that, unless the user has specifically ordered their BeanPostProcessor to run before EntityScanBeanPostProcessor, LCEMFB’s packages to scan will be configured as expected. Fixes gh-2478 commit 1035e5b02967d68f4ae607e11a7bf7c67e95af72 Author: Stephane Nicoll <[email protected]> Date: Tue Feb 10 16:00:11 2015 +0100 Expose RepositoryRestMvcBootConfiguration If an application defines a custom RepositoryRestMvcConfiguration, all
  36. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Changing history git commit --amend git commit --amend --no-edit git commit --author='…' git rebase -i
  37. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ release the bits!
  38. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The release pipeline Staging release promote (or roll back) and on to
  39. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Release process
  40. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo Artifactory & Bintray
  41. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Release Process • 80% (bamboo+artifactory) • Create a release branch • build + run tests • git tag • stage binaries • upgrade to next version
  42. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Release Process • 20% (me) • sanity checks (test a few real apps) • Check documentation • Upload brew recipe • promote to bintray (click a button)
  43. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ update spring.io https://github.com/spring-io/sagan
  44. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Summary • Steal open source techniques • reduce the “getting started” pain • iterate using git branches • Install a local artifactory • have a stage and rollback strategy • invest in tooling
  45. Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software,

    Inc. and licensed under a
 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 45 Learn More. Stay Connected. @springcentral Spring.io/video