Software Engineering at Google Chapter #23 - Continuous Integration (1 of 3)

  • Continuous Integration is "a software development practice where members of a team integrate their work frequently..."
  • This integration also applies to integrations such as...
    • External APIs that the software must interface with
    • The underlying OS, devices, or platforms
    • Data that is ingested for computation and manipulation
    • And so on. Not just code dependencies.
  • As such, a more modern definition might be "the continual assembling and testing of our entire complex and rapidly changing ecosystem"
  • CI is about which tests to run and when to run them during the workflow
  • CI is also about how to compose the SUT (System Under Test) where the code will be tested while balancing concerns about costs and correctness
  • Which tests should be run at pre-submit? Which ones are run post-submit?
  • It may be dangerous for code to test using production backends because simply testing bad (yet correct) code could lead to a production outage
  • Yet testing against production backends may be ok for a staging or pre-production environment
  • CI is about "testing the right things at the right time" in the workflow
  • CI allows you to guarantee correctness at various stages of the build and deploy. You don't need to hope the code works because you are able to test it at each stage, thus creating confidence in it's correctness
  • The cost to fix a bug grows exponentially the later it is found (think found at pre-submit check vs found in production)
  • Some breakpoints in a workflow where a bug might be found are...
    • Edit / compile / debug stage
    • Pre-submit
    • Post-submit
    • Release candidate
    • Release candidate promotions and testing (dev, staging, pre-production, etc)
    • Final release candidate promotion into production
    • Production
  • The later that the bug is discovered...
    • The person who originally wrote the code won't be the one who finds the bug
    • The original author will need to put more mental energy into recalling what their code change did
    • The bug may negatively affect others
  • In summary, you want to create fast feedback loops so bugs are discovered and corrected as early as possible
< BACK NEXT >
Tweet


   


   

Thank you for your time and attention.
Apply what you've learned here.
Enjoy it all.