Skip to content

Use release candidates instead of peer reviews for approval of large changesets #1159

@MattiSG

Description

@MattiSG

Problem statement

Very large changesets to the codebase are necessary when implementing major overhauls, even when they have no functional impact. For example, when refactoring vocabulary or architecture, or when changing formatting.

Since 2016 and until now, mandatory peer reviews have been the way in which quality is managed. While this system has demonstrated its power in eliminating the vast majority of regressions and broken production builds as well as in sharing code knowledge, it also has a cost and tends to slow down changes.

In the specific case of very large changesets, reviews might be so expensive (> 4 hours review for a PR) that they wait for very long before being done: they are always postponed by core staff having to handle more urgent matters, and never taken by volunteers for whom it is too costly.
As time passes, the changeset becomes irrelevant and needs major investment in rebases, worsening the problem as previous reviews have to be dismissed.
This leads to major overhauls and necessary maintenance never being deployed, with PRs waiting for months if not years and creating a deadlock of obsolete dependencies and architecture.

State of the art

Different approaches have been tried and failed:

  • increasing investment from sponsors on specific topics (more PRs are opened but not more are merged);
  • fast dirty reviews (author usually does not dare to act upon them);
  • RFCs / specification (the implementation still needs to be reviewed).

Proposal

I instead suggest a novel approach for OpenFisca: deploying release candidates (RC), that is versions of the package that are in the next major version, but not automatically installed, and asking for country packages to test these RCs.

  1. A pull request is opened for a changeset of at least L SLoC.
  2. At least P people (author and P - 1 reviewers or P reviewers) comment that:
    • The changeset is too large for manual review.
    • Ask for activation of the pre-release process.
    • Commit to trying the pre-release on a specific country package.
  3. The version number is marked as pre-release according to SemVer§9, with suffix -rc.X, where X is the iteration number.
  4. All automated tests pass.
  5. The pre-release is deployed manually.
  6. Reviewers approve or request changes to the changeset based on the result of their testing of the pre-release on the country package they committed to testing with.
  7. Once at least Q people out of the P have approved the PR and none have requested changes, it is considered valid.
  8. The version number is changed to remove the pre-release marking.
  9. The pull request is merged and automatically deployed.

Process

I open this issue to foster a discussion and generate consensus. I expect participants to either:

  • State support of the proposal and specify their expected values for L, P, and Q.
  • Suggest changes to the proposal.
  • Explain why this proposal is not sound and offer an alternative way to solve the stated problem.
  • Explain why the problem is irrelevant.

If consensus is reached, we will open a pull request to the Core CONTRIBUTING file with this new process which will hopefully enable unblocking many major PRs that are long overdue 🙂 Thank you for your participation!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions