Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code reviews are one of the main ways for Cockroach Labs to guarantee quality in the product. We use them to ensure that all code written meets our strict standards for production-ready code.

A code review is like a discussion. The reviewer can have questions, and can even sometimes request the author to write a deeper justification for changes. The goal of that discussion is to end up with the highest quality product, and create a track record of why and how a change occurred, so we can later look back and understand the choices.

No one is expected to write perfect code on the first try. That's why we have code reviews in the first place!

By humans for humans

With code reviews being by humans for humans, one or both of these humans could be having a bad day. Assume good faith, and give a bit of time for things to cool down if needed.

As if that weren't enough already, text-based communication is fraught with miscommunication.Don't hesitate to ask for clarification, to rephrase a request, etc.

Consider being a minimally nice maintainer, reflect upon mistakes that will inevitably be made, and take inspiration from the constructive and friendly reviews that are the daily staple of our repository.

For more details see For more information on what you might see as part of a code review, see What to expect when you’re expecting (someone to review your code at CRL).

As you advance in your work on CockroachDB, you’ll inevitably be asked to review someone else’s code. For more information on what’s expected of reviewers, see Working as a reviewer.

Reviewable

...

  • CR, "code review"

  • PR, "pull request"—you probably knew that one.

  • PTAL, "please take another look"

  • RFAL, "ready for another look"—as in, I made some changes, PTAL.

  • LGTM, "looks good to me"—i.e., ship it!

  • woman_scientistImage ModifieddogImage Modified

    , "science dog"—i.e., I have no idea what this code does.

  • TF[YT]R, "thanks for your/the review"

...