31 lines
1.3 KiB
Markdown
31 lines
1.3 KiB
Markdown
---
|
|
title: Broken pipeline? Fix or revert it.
|
|
date: 2024-05-01
|
|
permalink: archive/2024/05/01/broken-pipeline-fix-or-revert-it
|
|
tags:
|
|
- software-development
|
|
- continuous-integration
|
|
- trunk-based-development
|
|
cta: ~
|
|
snippet: |
|
|
What do you do if someone's pushed a failing commit and broken the CI pipeline?
|
|
---
|
|
|
|
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.
|