Skip to content

batches: add scheduler service

Warren Gifford requested to merge aharvey/rollout-scheduler into main

Created by: LawnGnome

This PR implements a scheduler service that uses all that fancy configuration and window handling code in #19796 to take changesets one by one and change one field on them. Totally worth it, right?

Of course, there's more than that. We also have the other bits we need in here to make this a real feature: the new scheduled state, including plumbing it through to the UI and making it filterable, a rather embarrassing bug fix in the filtering code I added a while back, and the usual amount of refactoring you'd probably expect along the way.

One issue that came up that I didn't expect was that it turned out to be much cleaner to implement the "should we schedule or queue a changeset" switch in internal/batches, not enterprise/internal/batches, which means that I've had to move most of #19796 into the open source part of the repo rather than keeping it in enterprise. I think this is OK, but if someone has a bright idea on an alternative approach, I'd like to hear it.

Finally, here's what the UI looks like right now:

image

I chose what I think is an appropriate icon, but, uh, @rrhyne should probably at least glance at this.

Next up, we have documentation and wiring up the estimation code, which right now I expect to be a lazily populated tooltip when hovering on the scheduled icon.

Merge request reports

Loading