Upgrade to Pro — share decks privately, control downloads, hide ads and more …

In depth guide to Postgres' new CI

Nazir Bilal Yavuz
May 10, 2023
150

In depth guide to Postgres' new CI

Nazir Bilal Yavuz

May 10, 2023
Tweet

Transcript

  1. About Me • Nazir Bilal Yavuz • Open Source Postgres

    Team @Microsoft • Working on Postgres ~2 years • Mainly build and CI stuff
  2. What is CI • Stands for Continuous Integration • Automating

    the integration of new code changes ◦ Build ◦ Test • Main benefits ◦ Find bugs quicker ◦ Fasten the development cycle
  3. Why we need CI on Postgres • Patch is sent

    but… ◦ Your changes are not working on… • Testing changes on various platforms • Developer productivity ◦ Find bugs fast ◦ Shorter review period
  4. New CI system • Uses Cirrus CI (https://cirrus-ci.org/) ◦ Continuous

    integration and deployment platform that enables developers to automate their software development workflows • Steps to run CI: ◦ Enable CI ◦ Push changes ◦ See results ◦ PG16
  5. 2 - Add Cirrus CI application to your GitHub account

    • https://github.com/marketplace/cirrus-ci
  6. 3 - Cirrus CI should access to forked PG repository

    • GitHub -> Settings -> Applications -> Cirrus CI
  7. CI tips • Cirrus terminal • Gathering logs • on_failure

    instruction ◦ instruction ▪ I will refer it as a key on yaml file
  8. Cirrus terminal • When Postgres is working on your local

    but you see failures on CI • No need to run CI again
  9. Gathering logs • *_artifact instruction • Analyze logs offline •

    By default log, diff, regress logs • Need to gather other files (e.g. docs)
  10. on_failure instruction • Only when we come across a failure

    • Avoid unnecessary logging • Faster CI runs for successful build
  11. In Summary • Enable new CI on GitHub • Push

    changes to trigger CI run ◦ CI reads .cirrus.yml file • See the results • If debugging is needed ◦ Use Cirrus terminal ◦ Gather & investigate logs ◦ Use on_failure if needed