Broken pipeline? Fix or revert it.

If you're doing trunk-based development where multiple people are committing and pushing work to the same branch, what do you do if you've pushed a commit that fails the checks and breaks the pipeline?

This is a bad state and needs to be solved as soon as possible as it's causing a problem for everyone else.

If the pipeline is failing, someone else could push a change and have it fail for a different reason, but wouldn't know.

The responsibility is on the person who pushed the failing commit to resolve it and get the pipeline passing again as soon as possible.

You break it, you bought it.

Hopefully, the changes in the failing commit are small and it's something you can resolve quickly and push a fixed commit.

If you can't fix it within a few minutes, revert the failing commit and try again.

What if someone's pushed a failing commit and hasn't fixed it in a timely manner?

Revert it for them, fix the pipeline and unblock the rest of the team.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.