WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
Developing XWiki
1. 27 au 29 mars 2013
Developing XWiki
Vincent Massol
XWiki Committer
CTO XWiki SAS
Vincent Massol, May 2017
2. Vincent Massol
• Speaker Bio
• CTO XWiki SAS
• Your Projects
• XWiki (community-driven open source project)
• Past: Maven,Apache Cargo,Apache Cactus, Pattern Testing
• Other Credentials:
• LesCastCodeurs podcast about Java news
• Creator of OSSGTP open source group in Paris
• 3 books: JUnit in Action, Maven:A Developer’s Notebook, BBWM
7. Motivation
• Change the world!
• Needs impact
• Needs max number of users
• Open source
• Needs to show progress
• Release often
• Needs developers / contributors
• Community-driven
• Requires Time-boxing
• XWiki releases every month (3
weeks for RC1, 1w for final)
• Requires integration between all
parts
• Requires CI tool
• Requires quality-control
• Requires automated Tests
• Requires releases as automated as
possible
• Requires automated Build
• Requires good communication
9. Governance
• Complete separation from
XWiki SAS and XWiki.org
• Only individuals working on the
open source project
• Rules similar to the ASF
• Committership, voting (0, +1, -1),
lazy consensus
• xwiki.org governance and
company advertising:
sponsoring companies
Source: http://dev.xwiki.org/xwiki/bin/view/Community/Governance
11. XWiki Days
• Every Thursday
• Examples
• Bug Fixing Day (BFD)
• Test Improvement Day
• Deprecation Fixing Day
• Improvement Fixing Day
• Doc Improvement Day
• Pull Request Day
• Worked really well for BFD
Source: http://dev.xwiki.org/xwiki/bin/view/Community/XWikiDays
13. Communication
• Mailing lists (users, devs, notifs)
• 15 messages / day on users+devs
• IRC for discussions
• But all important messages must
go through the list
• Commit emails + JIRAs + daily
wiki activity on the notifications
list
• Code review
Source: http://dev.xwiki.org/xwiki/bin/view/Community/MailingLists & http://dev.xwiki.org/xwiki/bin/view/Community/Chat
14. Build
• Maven-based with several custom plugins
• Active Quality vs Passive Quality. Examples:
• Checkstyle with additional custom rules
• Verify that Script Services are not located in the internal package
• Verify that @since javadoc tags have the correct format
• Verify header licenses
• Backward compatibility checks with revapi
• Enforcer checks
• Verify we don't use Commons Logging or Log4j (since we use SLF4J)
• Verify that Test Percentage Coverage don't go down
Source: http://dev.xwiki.org/xwiki/bin/view/Community/Building
15. Continuous Integration
• Some jobs with -Pquality profile to perform
Quality checks
• Catching false positives before sending mail.
Examples:
• JVM crash
• GitHub connection issue
• X Display not ready for UI tests
• Display screenshot of failing test in job report
• Started using Jenkinsfile for xwiki-contrib
• Pipeline Job to generate full TPC
Source: http://ci.xwiki.org/
16. Tests (1/3)
• Unit tests: JUnit + Mockito
• Integration tests with automatic component testing and
injection. Custom JUnit @Rule
• Functional UI tests with JUnit + Selenium/WebDriver
• Page Object strategy
• WCAG tests
• HTML5 validity tests
• Manual tests (performance + QA @ XWiki SAS
• Total TPC = 73.2%
Source: http://dev.xwiki.org/xwiki/bin/view/Community/Testing
19. Backward Compatibility Strategy
• Check in the build with Revapi
• When wanted failure, add to
ignore list in pom.xml
• @Deprecated then move to
Legacy module using AspectJ
• Use @Unstable + @Since for
young APIs
• Custom checkstyle check in build to prevent @Unstable from staying more
than 1 cycle
• {{backwardCompatibility}} xwiki macro in release notes
Source: http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBackwardCompatibility
20. Release Process
• Ongoing Release Notes and
reference documentation
• Marked in JIRA with 2 custom
fields
• Rolling Release Managers
Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/
• Create Release Plan for the release
22. Release Plans (2/2)
• Release in JIRA
• Check that all issues are
documented
• Check Release Notes
• Import translations
• Build the Release
• Create mail
announcement
• Push to Maven Central
• Update Docker official
image
• etc
Source: http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ReleasePlan845
23. Future on dev processes
• XWiki Foundation to officially separate open source project
from XWiki SAS company
• CI functional tests executing on various environments inside
Docker containers
• Work on reducing flaky tests number
• Automate performance tests
• Unbreakable build with automatic merge on Release branch
when CI jobs passes (using Pipeline)