[ci] Fix test group ordering for external jobs (#170574)

Pipelines running triggered builds against older commits can create ci
stats with out of date metrics. When used as a reference point against
the branch HEAD, the number of selected groups may not accurately
reflect the current state.
This commit is contained in:
Jon 2023-11-06 02:29:45 -06:00 committed by GitHub
parent fd7fcdf22d
commit f423ad3fc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -273,7 +273,12 @@ export async function pickTestGroupRunOrder() {
]
: []),
// if we are running on a external job, like kibana-code-coverage-main, try finding times that are specific to that job
...(!prNumber && pipelineSlug !== 'kibana-on-merge'
// kibana-elasticsearch-serverless-verify-and-promote is not necessarily run in commit order -
// using kibana-on-merge groups will provide a closer approximation, with a failure mode -
// of too many ftr groups instead of potential timeouts.
...(!prNumber &&
pipelineSlug !== 'kibana-on-merge' &&
pipelineSlug !== 'kibana-elasticsearch-serverless-verify-and-promote'
? [
{
branch: ownBranch,