Test that runner short_sha is not too easily identical
NOTE: We should try to get this merged in %17.11, so that the bug is fixed for customers who are using Prometheus or Docker Machine executors with newly created runners. See https://gitlab.slack.com/archives/CBQ76ND6W/p1744353367413289
What does this MR do and why?
This MR adds a test that would have flagged an issue with short_sha
when routable tokens were introduced.
This is an interim fix until we can address #534685 (closed).
References
- Improve `short_sha` uniqueness for routable run... (#534685 - closed)
- Multiple group runners on one host causes prome... (#534114 - closed)
- [Feature flag] Rollout of `routable_runner_token` (#505790 - closed)
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
-
Run the new spec that was added in the MR:
bundle exec rspec spec/models/ci/runner_spec.rb:1875
-
Revert the change in the model file
-
Run the test again. This time it should fail, demonstrating that the routable tokens are causing duplicate
short_sha
values.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.