Fix the ordering of transition callbacks
Fix the ordering of transition callbacks:
Because pipeline status could be changed for the builds in the next stages, if we process next stages first, the current build would be out of synchronized, and would need a reload for that matter.
Alternatively, like what I did in this commit, we could process the
next stages later (by using after_transition
rather than
around_transition
), and complete what're doing for the current
build first. This way we don't have to reload because nothing is
out synchronized.
Note that since giving false
in after_transition
would halt the
callbacks chain, according to:
We'll need to make sure we're not returning false because we don't intend to interrupt the chain.
This fixes #22010 (closed).
After this fix, both pipeline events and build events would only show up once.