Skip to content

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

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Run the new spec that was added in the MR:

    bundle exec rspec spec/models/ci/runner_spec.rb:1875
  2. Revert the change in the model file

  3. 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.

Merge request reports

Loading