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

This commit is contained in:
Spencer 2022-07-25 22:24:57 -05:00 committed by GitHub
parent 710432aa0a
commit 0154f75445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 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

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