How AngularJS Made MCI Superheroic Valeri Karpov Kernel Tools Engineer, MongoDB www.thecodebarbarian.com github.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 *
MongoDB Continuous Integration 6-12 hours of test execution, too much of this: *
Why is AngularJS important for CI? •“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 *
Liberate Tuteme Ex BackboneJS •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 *
What are filters and what do they do? •Rules for converting data to UI-specific format •One-way tie-in to two-way data-binding •Prevent you from drowning in easy tasks *
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? •Build state stored in lowercase •Build status badge should have first letter in caps •Don’t extend String.prototype, use a filter! *
Fun with Filters - JIRA Linkify •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 - Easy Dates & TZ •Server in Go - times and deltas in nanoseconds •… except when they’re not •Keep dates in UTC but standardize UI on EST *
Next Step: Rethink Log Files •Log files - first step of debugging •Developers still prefer using less or vim •With AngularJS, we can make it better *
Making Log Files Cool (And Useful!) •Multi-highlight (Filters!) •Bottom-up infinite scroll •Search with context a la SublimeText *
Thanks for Listening! •Suggestions for log file viewer most welcome •Filters tutorial coming soon to my blog at: • • * www.thecodebarbarian.com Twitter: @code_barbarian
AngularJS Meetup 11/19/13 - AngularJS for MongoDB Continuous Integration

AngularJS Meetup 11/19/13 - AngularJS for MongoDB Continuous Integration

  • 1.
    How AngularJS MadeMCI Superheroic Valeri Karpov Kernel Tools Engineer, MongoDB www.thecodebarbarian.com github.com/vkarpov15 @code_barbarian
  • 2.
    What is thistalk about? •MongoDB Continuous Integration •How AngularJS saved us from BackboneJS hell •Special focus: Filters, the forgotten component *
  • 3.
    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 *
  • 4.
    MongoDB Continuous Integration 6-12hours of test execution, too much of this: *
  • 5.
    Why is AngularJSimportant for CI? •“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 *
  • 6.
    Liberate Tuteme ExBackboneJS •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 *
  • 7.
    What are filtersand what do they do? •Rules for converting data to UI-specific format •One-way tie-in to two-way data-binding •Prevent you from drowning in easy tasks *
  • 8.
    Ok, what’s avery basic filter? •Build state stored in lowercase •Build status badge should have first letter in caps •Don’t extend String.prototype, use a filter! *
  • 9.
    Ok, what’s avery basic filter? •Build state stored in lowercase •Build status badge should have first letter in caps •Don’t extend String.prototype, use a filter! *
  • 10.
    Fun with Filters- JIRA Linkify •Commits reference JIRA tickets •Filter to make links using ng-bind-html-unsafe *
  • 11.
    Fun with Filters- JIRA Linkify •Filter to make links using ng-bind-html-unsafe *
  • 12.
    Fun with Filters- Easy Dates & TZ •Server in Go - times and deltas in nanoseconds •… except when they’re not •Keep dates in UTC but standardize UI on EST *
  • 13.
    Next Step: RethinkLog Files •Log files - first step of debugging •Developers still prefer using less or vim •With AngularJS, we can make it better *
  • 14.
    Making Log FilesCool (And Useful!) •Multi-highlight (Filters!) •Bottom-up infinite scroll •Search with context a la SublimeText *
  • 15.
    Thanks for Listening! •Suggestionsfor log file viewer most welcome •Filters tutorial coming soon to my blog at: • • * www.thecodebarbarian.com Twitter: @code_barbarian