Remove config warning for legacy retry:when values

What does this MR do and why?

This removes the CI config warning added in 19.1 for the legacy retry:when values stuck_or_timeout_failure and job_execution_timeout.

Every CI config warning is saved as a row in ci_pipeline_messages, once per pipeline created. This warning matched a lot of real configs, so it made that table grow much faster. That is a database capacity concern.

The rows are also never read. Pipeline pages no longer show these saved warnings to users. The pipeline editor is where a warning like this is actionable, not every pipeline.

Nothing changes for users writing CI config:

  • stuck_or_timeout_failure and job_execution_timeout still work in retry:when. They still act as aliases for the specific failure reasons that replaced them in 19.0.
  • The deprecation still stands. Both values are still planned for removal in 20.0.

Why the deprecation notice is untouched

This MR leaves data/deprecations/19-1-deprecate-legacy-retry-when-failure-reasons.yml and the generated doc/update/deprecations.md alone. They still say GitLab shows a non-blocking warning in CI lint output and the pipeline editor.

  • The follow-up MR restores the warning, so the sentence is true again shortly.
  • A documentation change pulls in a technical writer review, and that is not worth a reviewer's time for a sentence that ends up unchanged.

The tradeoff is deliberate: between this MR merging and the follow-up merging, the deprecation notice says the warning is shown while it briefly is not.

Changes

  • lib/gitlab/ci/config/entry/retry.rb: removed the warning method and the compose! override that only existed to call it.
  • spec/lib/gitlab/ci/config/entry/retry_spec.rb: removed the #warnings tests. The legacy values are still covered by the existing test that checks every documented retry:when value is valid.

Follow-up

!250932 (merged) stops saving config warnings to the database at all, and restores this warning for CI Lint and the pipeline editor. It also covers the older rules:when config warning, which writes a row on every pipeline.

How to test

  1. Add a job to .gitlab-ci.yml that uses the legacy value:

    test-job:
      script: echo "hello"
      retry:
        max: 2
        when: stuck_or_timeout_failure
  2. Run a pipeline. The pipeline should still be created and the job should still run.

  3. Check ci_pipeline_messages for that pipeline. No warning row about retry:when should be written.

  4. Paste the same config into CI Lint. It should validate without the warning.

Tested locally: spec/lib/gitlab/ci/config/entry/retry_spec.rb passes with 96 examples and 0 failures. RuboCop is clean.

References

Edited by Oleg Yakovenko

Merge request reports

Loading
Loading