pipeline-herder: do not retry jobs if there is a newer MR pipeline available

Consider the following situation:

  • herder is paused because of a long outage where retries before resolution would just spam people with failures
  • An MR pipeline runs and fails due to the outage
  • a new version of the MR is pushed and a new pipeline is started
  • outage is over and herder is reenabled
  • herder retries the now invalid old pipeline

While this approach doesn't cause problems in itself, it is a waste of resources and can also confuse developers.

AC:

If the job belongs to an MR pipeline, the herder checks if there isn't a newer MR pipeline available. If there is, it ignores the job.

Jira: CKI-6568

Edited by Tales da Aparecida