Stop a branch check when its pull request opens while it runs closes #679 #684

Merged
simon merged 2 commits from issue/mitgliederverwaltung-679 into main 2026-11-13 18:41:14 +01:00
Owner

closes #679

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

CI: a branch check ends once a pull request is opened for its branch, so the pull request check no longer shares the runner with a second full check of the same commit.

What has been changed?

  • Stop the branch tests once a pull request opens for the branch
  • End a branch check when its pull request opens while it runs

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues

Additional Notes

  • check-branch now asks three times whether its branch has an open pull request: at the start (as before), in a new step skip-late after deps (before lint and the tests), and every 30 s while the tests run (elixir ci/skip-check.exs watch-pr … -- mix test). check-pr and check-main render exactly as before.
  • Behaviour a reviewer might not expect: Drone's exit 78 skips only steps that are still waiting; a running step finishes (drone-runner-docker 1.8.5 / runner-go 1.12.0). When the watcher stops the tests, lint and Dialyzer finish if they had started, and the branch build ends green without a complete test run; the pull request check is the required status. A test run that itself exits 78 fails the step, so it can never pass as skipped.
  • The watcher signals the whole process group of mix test (TERM, KILL after 10 s) and ends at the latest after 20 s even if a process outside the group keeps the output open.
  • ci/skip-check.exs also treats malformed API entries (no map, no integer number) as doubt and lets the check run; before, open-pr crashed on them.
  • Larger commit: the watcher (283 lines, about 100 of them tests).
  • Why: a pull request is usually opened a minute or two after the push (median 106 s over 55 pull requests); the first skip step had long passed by then, and both builds ran the full check side by side (builds 3048 + 3049: 680 + 681 s, test 632/590 s instead of 364 s alone). A single question after deps (~48 s after the start) would have caught 12 of those 55; asking during the tests catches 49.
  • test/ci/drone_render_test.exs needs jsonnet and is skipped in the CI image.
closes #679 ## Description of the implemented changes The changes were: - [ ] Bugfixing - [x] New Feature - [ ] Breaking Change - [ ] Refactoring CI: a branch check ends once a pull request is opened for its branch, so the pull request check no longer shares the runner with a second full check of the same commit. ## What has been changed? - Stop the branch tests once a pull request opens for the branch - End a branch check when its pull request opens while it runs ## Definition of Done ### Code Quality - [ ] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [ ] axe-core dev tools show no critical or major issues ## Additional Notes - `check-branch` now asks three times whether its branch has an open pull request: at the start (as before), in a new step `skip-late` after `deps` (before lint and the tests), and every 30 s while the tests run (`elixir ci/skip-check.exs watch-pr … -- mix test`). `check-pr` and `check-main` render exactly as before. - Behaviour a reviewer might not expect: Drone's exit 78 skips only steps that are still waiting; a running step finishes (drone-runner-docker 1.8.5 / runner-go 1.12.0). When the watcher stops the tests, lint and Dialyzer finish if they had started, and the branch build ends green without a complete test run; the pull request check is the required status. A test run that itself exits 78 fails the step, so it can never pass as skipped. - The watcher signals the whole process group of `mix test` (TERM, KILL after 10 s) and ends at the latest after 20 s even if a process outside the group keeps the output open. - `ci/skip-check.exs` also treats malformed API entries (no map, no integer number) as doubt and lets the check run; before, `open-pr` crashed on them. - Larger commit: the watcher (283 lines, about 100 of them tests). - Why: a pull request is usually opened a minute or two after the push (median 106 s over 55 pull requests); the first skip step had long passed by then, and both builds ran the full check side by side (builds 3048 + 3049: 680 + 681 s, test 632/590 s instead of 364 s alone). A single question after `deps` (~48 s after the start) would have caught 12 of those 55; asking during the tests catches 49. - `test/ci/drone_render_test.exs` needs `jsonnet` and is skipped in the CI image.
ci: end a branch check when its pull request opens while it runs
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
47e516c405
simon merged commit d4c5c9e44b into main 2026-11-13 18:41:14 +01:00
simon deleted branch issue/mitgliederverwaltung-679 2026-11-13 18:41:14 +01:00
Sign in to join this conversation.
No description provided.