View
368
Download
3
Category
Preview:
DESCRIPTION
Citation preview
How AngularJS Made MCI Superheroic
Valeri KarpovKernel Tools Engineer, MongoDB
www.thecodebarbarian.comgithub.com/vkarpov15
@code_barbarian
*
What is this talk about?
•MongoDB Continuous Integration
•How AngularJS saved us from BackboneJS hell
•Special focus: Filters, the forgotten component
*
MongoDB Continuous Integration
Q: Who broke what?
MongoDB has ~1400 E2E tests
Multiply that by 20 different OS configurations
And again by Enterprise / non-Enterprise
And again by 10-30 commits / day
*
6-12 hours of test execution, too much of this:
MongoDB Continuous Integration
*
•“Is something broken?” is easy
•Somewhat harder:
•“Who broke it?”
•“Why is it broken?”
•“What happened with previous runs?”
•UI needs to make this easy, buildbot doesn’t
Why is AngularJS important for CI?
*
•Waterfall - all results from last 5 builds
•800 lines of Backbone, 1000 lines of server helpers
•250 lines of AngularJS, 200 lines of server helpers
Liberate Tuteme Ex BackboneJS
*
•Rules for converting data to UI-specific format
•One-way tie-in to two-way data-binding
•Prevent you from drowning in easy tasks
What are filters and what do they do?
*
•Build state stored in lowercase
•Build status badge should have first letter in caps
•Don’t extend String.prototype, use a filter!
Ok, what’s a very basic filter?
*
•Build state stored in lowercase
•Build status badge should have first letter in caps
•Don’t extend String.prototype, use a filter!
Ok, what’s a very basic filter?
*
•Commits reference JIRA tickets
•Filter to make links using ng-bind-html-unsafe
Fun with Filters - JIRA Linkify
*
•Filter to make links using ng-bind-html-unsafe
Fun with Filters - JIRA Linkify
*
•Server in Go - times and deltas in nanoseconds
•… except when they’re not
•Keep dates in UTC but standardize UI on EST
Fun with Filters - Easy Dates & TZ
*
•Log files - first step of debugging
•Developers still prefer using less or vim
•With AngularJS, we can make it better
Next Step: Rethink Log Files
*
•Multi-highlight (Filters!)
•Bottom-up infinite scroll
•Search with context a la SublimeText
Making Log Files Cool (And Useful!)
*
•Suggestions for log file viewer most welcome
•Filters tutorial coming soon to my blog at:• www.thecodebarbarian.com
• Twitter: @code_barbarian
Thanks for Listening!
Recommended