$30 off During Our Annual Pro Sale. View Details »

RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub

RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub

On August 15, 2018 GitHub was deployed to production running Rails 5.2. This was a historic event; for years GitHub had been behind Rails and dependent on a custom fork of Rails 2.3. This talk will visit GitHub's past, including our tumultuous relationship with the Rails framework, and the grueling effort it took to get our application on the latest version. You’ll learn what mistakes to avoid and the reasons why such a difficult upgrade was worth it. We’ll explore what tracking master means for the future and establish that GitHub and Rails are in it together for the long haul.

Eileen M. Uchitelle

April 30, 2019
Tweet

More Decks by Eileen M. Uchitelle

Other Decks in Technology

Transcript

  1. The Past, Present,
    & Future of
    at

    View Slide

  2. Eileen M. Uchitelle
    ! " #
    @eileencodes
    eileencodes.com

    View Slide

  3. I’m a Staff
    Engineer at
    !

    View Slide

  4. I’m on the
    Core team!

    View Slide

  5. Upgrading
    at

    View Slide

  6. The Past, Present,
    & Future of
    at

    View Slide

  7. a ♥

    View Slide

  8. 2004

    View Slide

  9. Rails is
    born
    2004

    View Slide

  10. Frameworks
    are extracted,
    not built.
    -DHH


    View Slide

  11. Rails 1.0
    2005
    2004
    Rails is
    born

    View Slide

  12. 2005 2006 2007
    2004
    Rails is
    born
    Rails 1.2
    Rails 1.0

    View Slide

  13. I built
    a thing!

    View Slide

  14. I’m in!
    I built
    a thing!

    View Slide

  15. 2005 2006 2007
    2004
    Rails is
    born
    Rails 1.2
    GitHub
    is born
    Rails 1.0

    View Slide

  16. 2005 2006 2007
    2004
    Rails is
    born
    GitHub
    is born
    GitHub
    launches
    2008
    Rails 1.2
    Rails 1.0

    View Slide

  17. 2005 2006 2007
    2004
    Rails is
    born
    2008
    GitHub
    is born
    Rails 1.2
    GitHub
    launches
    Rails
    joins
    Rails 1.0

    View Slide

  18. 2006 2007 2008
    2005 2009
    GitHub
    is born
    Rails 1.2
    GitHub
    launches
    Rails
    joins
    Rails 2.3
    Rails 1.0

    View Slide

  19. GitHub
    is born GitHub
    launches
    Rails 1.2
    Rails
    joins
    Rails 2.3
    2007 2008 2009
    2006 2010
    Fork
    Rails

    View Slide

  20. View Slide

  21. GitHub
    is born GitHub
    launches
    Rails 1.2
    Rails
    joins
    Rails 2.3
    2007 2008 2009
    2006 2010
    Fork
    Rails

    View Slide

  22. fork
    repository

    View Slide

  23. fork
    repository

    View Slide

  24. GitHub
    is born GitHub
    launches
    Rails 1.2
    Rails
    joins
    Rails 2.3
    2007 2008 2009
    2006 2010
    Rails 3.0
    Fork
    Rails

    View Slide

  25. View Slide

  26. GitHub
    is born GitHub
    launches
    Rails 1.2
    Rails
    joins
    Rails 2.3
    2007 2008 2009 2010
    Rails 3.0
    Fork
    Rails
    2011
    Start 3.0
    upgrade

    View Slide

  27. GitHub
    launches
    Rails
    joins
    Rails 2.3
    2008 2009 2010
    Rails 3.0
    Fork
    Rails
    2011
    Start 3.0
    upgrade
    2012
    Rails 3.2

    View Slide

  28. GitHub
    launches
    Rails
    joins
    Rails 2.3
    2008 2009 2010
    Rails 3.0
    Fork
    Rails
    2011
    Start 3.0
    upgrade
    2012
    Rails 3.2
    Upgrade
    stalled

    View Slide

  29. Why upgrade when
    this version isn’t
    causing us pain?

    View Slide

  30. Why upgrade when
    this version isn’t
    causing us pain?
    Why upgrade
    when Rails 3
    is slower?

    View Slide

  31. Why upgrade when
    this version isn’t
    causing us pain?
    Why upgrade
    when Rails 3
    is slower?
    Why upgrade
    when our fork
    is better?

    View Slide

  32. View Slide


  33. SECURITY
    BACKPORTS

    View Slide


  34. SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER

    View Slide


  35. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER

    View Slide


  36. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER
    DEVELOPMENT
    IS PAINFUL

    View Slide

  37. 2010
    Rails 3.0
    2011
    Start 3.0
    upgrade
    2013
    Rails 3.2
    Upgrade
    stalled
    2012
    Complete
    3.0
    2014
    Rails 4.0

    View Slide

  38. 2013
    Rails 3.2
    Upgrade
    stalled
    2012 2014 2015
    Complete
    3.0
    2016
    4.0
    started
    Rails 4.0

    View Slide

  39. 2013
    Rails 3.2
    Upgrade
    stalled
    2012 2014 2015
    Complete
    3.0
    2016
    4.0
    started
    Rails 5.0
    Rails 4.0

    View Slide

  40. 2013 2014 2015
    Complete
    3.0
    2016 2017
    Eileen
    joins
    Rails 5.0
    4.0

    started
    Rails 4.0

    View Slide

  41. View Slide

  42. View Slide

  43. Gemfile.lock (Rails 3.2)
    $ rails server
    $ rails test tests/models/issue_test.rb
    Multiple Rails Versions
    Gemfile_rails4.lock (Rails 4.0)
    $ RAILS4=1 rails server
    $ RAILS4=1 rails test tests/models/issue_test.rb

    View Slide

  44. Gemfile_rails4.lock (Rails 4.0)
    $ RAILS4=1 rails server
    $ RAILS4=1 rails test tests/models/issue_test.rb
    Multiple Rails Versions
    Gemfile_rails41.lock (Rails 4.1)
    $ RAILS41=1 rails server
    $ RAILS41=1 rails test tests/models/issue_test.rb

    View Slide

  45. Conditional Code
    if GitHub.rails_3_2?
    # code for Rails 3.2
    elsif GitHub.rails_4_0?
    # code for Rails 4.0
    else
    # code for all future versions
    end

    View Slide

  46. 2015 2016 2019
    Rails 5.0
    4.0

    started
    2017
    Eileen
    joins
    2018
    4.2
    in prod

    View Slide

  47. View Slide

  48. 2015 2016 2019
    Rails 5.0
    4.0

    started
    2017
    Eileen
    joins
    2018
    5.2
    in prod
    4.2
    in prod

    View Slide

  49. View Slide

  50. View Slide

  51. engineers at $
    for hours = $
    /hr

    View Slide

  52. The cost of not
    upgrading
    is immeasurable

    View Slide


  53. SECURITY
    BACKPORTS

    View Slide


  54. SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER

    View Slide


  55. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER

    View Slide


  56. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER
    DEVELOPMENT
    IS PAINFUL

    View Slide


  57. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER
    DEVELOPMENT
    IS PAINFUL
    REWRITE
    IN MICROSERVICES

    View Slide

  58. …the stories of upgrading
    being a huge undertaking
    always makes me scratch
    my head - what are we doing
    wrong if its easy for us.
    - HN troll


    View Slide

  59. When upgrading you
    should…

    View Slide

  60. When upgrading you should
    build a team.

    View Slide

  61. When upgrading you should
    take time to make
    a plan.

    View Slide

  62. When upgrading you should
    fix deprecation
    warnings early.

    View Slide

  63. When upgrading you should
    plan for the future.

    View Slide

  64. View Slide

  65. You may regret
    forking Rails.

    View Slide

  66. You may regret
    falling behind security
    supported versions.

    View Slide

  67. You may regret
    using old,
    unsupported gems.

    View Slide

  68. You may regret
    using private Rails

    APIs.

    View Slide

  69. View Slide

  70. View Slide

  71. View Slide

  72. This was my first
    major upgrade.

    View Slide

  73. It’s important to
    remember…

    View Slide

  74. It’s important to remember
    to pay debt down
    incrementally.

    View Slide

  75. View Slide

  76. It’s important to remember
    you’re not alone.

    View Slide

  77. View Slide

  78. It’s important to remember
    the payoff is
    worth it.

    View Slide

  79. View Slide

  80. The benefits of
    upgrading

    View Slide


  81. IMPROVED APIS

    View Slide


  82. IMPROVED APIS
    SECURITY FEATURES

    View Slide


  83. IMPROVED APIS
    BETTER PERFORMANCE
    SECURITY FEATURES

    View Slide


  84. IMPROVED APIS
    BETTER PERFORMANCE
    NEW LIBRARIES
    SECURITY FEATURES

    View Slide


  85. IMPROVED APIS
    BETTER PERFORMANCE
    NEW LIBRARIES
    SECURITY FEATURES
    A CHANCE TO CONTRIBUTE

    View Slide

  86. The Future…

    View Slide

  87. View Slide

  88. 75+ Pull Requests
    from GitHub

    View Slide

  89. Rails 6.0: Multiple
    database support

    View Slide

  90. Continuous
    Upgrades

    View Slide

  91. For the first time in
    GitHub’s history…

    View Slide

  92. We’re pioneering
    the future of Rails.

    View Slide

  93. We have a
    responsibility to
    support Rails

    View Slide

  94. View Slide


  95. DEPENDENCIES
    ARE BRITTLE
    SECURITY
    BACKPORTS
    HIRING
    IS
    HARDER
    DEVELOPMENT
    IS PAINFUL

    View Slide


  96. IMPROVED APIS
    BETTER PERFORMANCE
    NEW FEATURES
    SECURITY
    A CHANCE TO CONTRIBUTE

    View Slide

  97. View Slide

  98. View Slide

  99. a ♥

    View Slide

  100. Thank you!
    ! " #
    @eileencodes
    eileencodes.com

    View Slide