mozilla :: #bors

8 Aug 2017
01:30khodzha@notriddle should i save pr priority into batches table too or only in patches table and eval batch priority through associatiated patches?
01:30notriddleEither way is fine.
01:31notriddleActually, thinking about it, you probably do want to perform the copy.
01:31notriddleIt's what we already do for the target branch.
01:33khodzhaand is there any code selecting next batch to run? i suppose it doesnt exist, yet we want to run batches in priority order, how do i handle this?
01:33notriddleThere is code selecting the next batch to run.
01:35notriddleThe `sort_batches` function is responsible for making sure that the correct "next" batch is run.
01:35khodzhaah, i see
01:36notriddleI should probably add a comment that mentions the invariants that thing needs to uphold.
01:36khodzhaat least its starting clicking in my head :D
01:37notriddleFor example, the fact that it has to place a running batch to the front of the line (things get really messed up if it fails to uphold that invariant).
01:40khodzhaand what do you mean by "It's what we already do for the target branch"?
01:42notriddleThe `batches` and `patches` tables both have an `into_branch` column. The batch should always have the same value in that column as all of the patches do.
01:42notriddlePriority should be the same way. The batch should always have the same priority as all of its patches.
01:48khodzhawhat does this do? a way to raise exception if there is a batch with state != 0?
01:55notriddleYes, that's exactly what it does.
01:56notriddleIf the head-of-line batch is waiting, then so must all other ones be.
01:57notriddleIt should be impossible to violate that invariant, because any non-waiting batches sort ahead of the waiting ones, but I'm pessimistic.
9 Aug 2017
No messages
Last message: 14 days and 3 hours ago