Fix relation chain searching when a direct parent is not yet merged


In the event that a relation chain is integrated together, but one
change in the chain is not staged with the rest of the chain,
it is possible that any changes higher in the chain than the unmerged
one will skip more than just the missing change to find a parent.
This occurs under heavy load when cherry-picks for changes lower on the
relation chain on the target branch do not yet exist when walking
the relation chain for higher changes.

This fix introduces a check for each potential parent to see if it is
merged on the source branch and has a pick expected to the target
branch. If so, a 1 minute listener will be set up to pick the change
when the parent pick is also created. If the listener expires, the
parent will be re-checked for safety, and then skipped if it still does
not exist. This process repeats until a parent is found or the chain
is exhausted, at which time the change will be picked to the target
branch HEAD as a last resort. A message is also posted to the
created cherry-pick with references to all skipped parents.

Fixes: QTQAINFRA-6455
Change-Id: I454ae99ac46c6f5f0bb9dde6651361cd30e9e993
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
commit5c9fe11d513284a12f6ae3dcc65285e40cec88b1
parentee15f89fd90b070a7d4d98fa1ea8a9ff4309bc00
authorDaniel Smith <daniel.smith@qt.io>
committerDaniel Smith <daniel.smith@qt.io>
commit timeWed, 24 Jul 2024 09:23:38 +0000