Two formatters disagreed and the branch built itself all night
Описание и применение
Автоматический форматтер в GitHub Actions бесконечно коммитил изменения, из-за чего CI‑пул переполнился. Добавлены проверки вместо исправлений, группы конкуренции и оповещения, чтобы предотвратить повторные циклы.
Задача
An autoformatting job repeatedly committed conflicting changes, causing an infinite loop that saturated the CI runner pool and delayed other builds.
Результат
The safeguards prevented infinite loops, restored CI runner availability, and introduced monitoring to detect similar issues early.
Рабочий процесс
- 1. Pull request opened with conflicting formatter rules.
- 2. Autoformatting job ran, changed file, pushed back.
- 3. Push triggered the workflow again, changing file back.
- 4. Loop continued until 900 runs completed.
- 5. Team observed queue depth the next morning.
- 6. Implemented check‑only mode to fail on diffs.
- 7. Added concurrency group per branch with cancel in progress.
- 8. Skipped runs triggered by bot account.
- 9. Added alert on workflow run frequency per repository per hour.
Доказательства
The job ran, changed the file, pushed. The push triggered the workflow. The job ran, changed it back, pushed.
The immediate fix was to make the job check rather than fix, failing the build with the diff instead of committing anything.
A concurrency group per branch with cancel in progress, so a new push kills the run it supersedes.
- Дата записи: 2026-09-21T11:45:34.198Z