[8.3] [ci-stats] ship buildkiteJobId with metrics and support backfilling (#137123) (#137143)

* [ci-stats] ship buildkiteJobId with metrics and support backfilling (#137123)

(cherry picked from commit 0154f75445)

* [CI] Auto-commit changed files from 'yarn kbn run build -i @kbn/pm'

Co-authored-by: Spencer <spencer@elastic.co>
This commit is contained in:
Kibana Machine 2022-07-26 00:45:07 -04:00 committed by GitHub
parent e2aa2feeda
commit 11d3d5b8ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -132,11 +132,13 @@ export class CiStatsClient {
});
};
getPrReport = async (buildId: string) => {
getPrReport = async (buildId: string, backfillJobIds: string[] = []) => {
const resp = await this.request<CiStatsPrReport>({
path: `v2/pr_report`,
params: {
path: `v3/pr_report`,
method: 'post',
body: {
buildId,
backfillJobIds,
},
});

View file

@ -240,6 +240,7 @@ export class CiStatsReporter {
body: {
buildId,
defaultMeta: options?.defaultMeta,
buildkiteJobId: process.env.BUILDKITE_JOB_ID,
metrics,
},
bodyDesc: `metrics: ${metrics

View file

@ -1731,6 +1731,7 @@ class CiStatsReporter {
body: {
buildId,
defaultMeta: options === null || options === void 0 ? void 0 : options.defaultMeta,
buildkiteJobId: process.env.BUILDKITE_JOB_ID,
metrics
},
bodyDesc: `metrics: ${metrics.map(({