Skip to content

Draft: Repair MergeTrain cars at the top of the service before continuing

What does this MR do and why?

This is a draft of the simplest approach I can think of to allow for MergeTrains to repair and restart themselves.

Alternatively (ADD MR LINK) we could have a separate service do just the repairing, but we'd require a bunch more structural support for that. In this simple approach, we avoid:

  1. Adding a new Service for just the unsticking, instead of the two private methods in the MergeTrains::RefreshService. Conceptually, I'm also not convinced that adding a separate service is worthwhile, because "refreshing" can include stuck and regular merge train cars, and the amount of logic we use to do it is small enough that it seems simpler to me to keep them both in one unified class.
  2. Adding a new Worker class for processing the just the stuck Car.
  3. Worry about restarting the "regular" MergeTrains::RefreshWorker after the car has been unstuck. If we know there's a stuck train, there's no reason to not fix the one stuck MR and continue processing immediately.
    • I'm under the impression that a stuck Car necessarily has to be at the front of the train. There's no programmatic guarantee of this, it's just our business logic. So I am considering the possibility we'll need to do more checking or have stronger guarantees around this.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #389044

Edited by drew stachon

Merge request reports