@lodestar/spec-test-util 1.49.0-dev.d4c0ee61ef → 1.49.0-dev.ee3c432d85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloadNightlyTests.d.ts","sourceRoot":"","sources":["../src/downloadNightlyTests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"downloadNightlyTests.d.ts","sourceRoot":"","sources":["../src/downloadNightlyTests.ts"],"names":[],"mappings":"AA+EA,wBAAsB,oBAAoB,CACxC,IAAI,EAAE;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,EAC/F,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAgDf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetch } from "@lodestar/utils";
|
|
1
|
+
import { LodestarError, fetch, retry } from "@lodestar/utils";
|
|
2
2
|
import { downloadGenericSpecTests } from "./downloadTests.js";
|
|
3
3
|
async function ghApiFetch(endpoint, token) {
|
|
4
4
|
const res = await fetch(`https://api.github.com${endpoint}`, {
|
|
@@ -10,35 +10,57 @@ async function ghApiFetch(endpoint, token) {
|
|
|
10
10
|
}
|
|
11
11
|
return res.json();
|
|
12
12
|
}
|
|
13
|
-
async function
|
|
13
|
+
async function resolveNightlyRun(repo, token, log, date, branch) {
|
|
14
14
|
const params = new URLSearchParams({ status: "success", per_page: "1" });
|
|
15
15
|
if (branch)
|
|
16
16
|
params.append("branch", branch);
|
|
17
17
|
// If neither branch nor date narrow the query, restrict to scheduled runs so
|
|
18
18
|
// a PR's successful run on consensus-specs can't outrank the latest master
|
|
19
19
|
// nightly. When a date is given, allow manual re-runs on that day too.
|
|
20
|
-
else if (
|
|
20
|
+
else if (date === "latest")
|
|
21
21
|
params.append("event", "schedule");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
// Require today's UTC run so upstream delays or failures surface in our nightly.
|
|
23
|
+
const createdFilter = (date === "latest" ? new Date() : date).toISOString().slice(0, 10);
|
|
24
|
+
const minCreatedAt = Date.parse(createdFilter);
|
|
25
|
+
const maxCreatedAt = minCreatedAt + 24 * 60 * 60 * 1000;
|
|
26
|
+
params.append("created", createdFilter);
|
|
27
|
+
return retry(async () => {
|
|
28
|
+
const { workflow_runs } = await ghApiFetch(`/repos/${repo}/actions/workflows/tests.yml/runs?${params}`, token);
|
|
29
|
+
const run = workflow_runs[0];
|
|
30
|
+
if (!run) {
|
|
31
|
+
throw new LodestarError({ code: "NIGHTLY_RUN_NOT_FOUND", repo, branch: branch ?? null, createdFilter }, `No successful run found for ${repo}${branch ? ` (${branch})` : ""} with created=${createdFilter}`);
|
|
32
|
+
}
|
|
33
|
+
// GitHub's run listing can return weeks-old results, so validate even with a date filter.
|
|
34
|
+
const createdAt = Date.parse(run.created_at);
|
|
35
|
+
if (!(createdAt >= minCreatedAt && createdAt < maxCreatedAt)) {
|
|
36
|
+
throw new LodestarError({
|
|
37
|
+
code: "NIGHTLY_RUN_OUTSIDE_DATE_RANGE",
|
|
38
|
+
runId: run.id,
|
|
39
|
+
createdAt: run.created_at ?? null,
|
|
40
|
+
createdFilter,
|
|
41
|
+
}, `Refusing nightly run ${run.id} created at ${run.created_at}: expected created=${createdFilter}`);
|
|
42
|
+
}
|
|
43
|
+
return run;
|
|
44
|
+
}, {
|
|
45
|
+
retries: 2,
|
|
46
|
+
retryDelay: 1000,
|
|
47
|
+
shouldRetry: (error) => error instanceof LodestarError,
|
|
48
|
+
onRetry: (error, attempt) => log(`Nightly lookup attempt ${attempt}: ${error.message}`),
|
|
49
|
+
});
|
|
30
50
|
}
|
|
31
51
|
export async function downloadNightlyTests(opts, log, date) {
|
|
32
52
|
const token = process.env.GITHUB_TOKEN;
|
|
33
53
|
if (!token)
|
|
34
54
|
throw new Error("GITHUB_TOKEN is required for nightly downloads");
|
|
35
|
-
const resolvedDate = date === "latest" || !date ?
|
|
36
|
-
if (resolvedDate
|
|
55
|
+
const resolvedDate = date === "latest" || !date ? "latest" : new Date(date);
|
|
56
|
+
if (resolvedDate !== "latest" &&
|
|
57
|
+
(!Number.isFinite(resolvedDate.getTime()) || resolvedDate.toISOString().slice(0, 10) !== date)) {
|
|
37
58
|
throw new Error(`Invalid date: "${date}". Expected "latest" or YYYY-MM-DD`);
|
|
38
59
|
}
|
|
39
60
|
const repo = new URL(opts.specTestsRepoUrl).pathname.slice(1).replace(/\/$/, "");
|
|
40
|
-
const
|
|
41
|
-
|
|
61
|
+
const run = await resolveNightlyRun(repo, token, log, resolvedDate, opts.branch);
|
|
62
|
+
const runId = run.id;
|
|
63
|
+
log(`Resolved nightly${resolvedDate === "latest" ? "" : ` ${date}`} to run ${runId} (created_at=${run.created_at}, head_sha=${run.head_sha})`);
|
|
42
64
|
const { artifacts } = await ghApiFetch(`/repos/${repo}/actions/runs/${runId}/artifacts`, token);
|
|
43
65
|
const urlByTest = {};
|
|
44
66
|
const available = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloadNightlyTests.js","sourceRoot":"","sources":["../src/downloadNightlyTests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"downloadNightlyTests.js","sourceRoot":"","sources":["../src/downloadNightlyTests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,wBAAwB,EAAC,MAAM,oBAAoB,CAAC;AAM5D,K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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lodestar/spec-test-util",
|
|
3
|
-
"version": "1.49.0-dev.
|
|
3
|
+
"version": "1.49.0-dev.ee3c432d85",
|
|
4
4
|
"description": "Spec test suite generator from yaml test files",
|
|
5
5
|
"author": "ChainSafe Systems",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@chainsafe/snappy-wasm": "^0.5.2",
|
|
63
|
-
"@lodestar/utils": "^1.49.0-dev.
|
|
63
|
+
"@lodestar/utils": "^1.49.0-dev.ee3c432d85",
|
|
64
64
|
"rimraf": "^4.4.1",
|
|
65
65
|
"vitest": "catalog:"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@chainsafe/ssz": "^1.8.0",
|
|
69
|
-
"@lodestar/types": "^1.49.0-dev.
|
|
69
|
+
"@lodestar/types": "^1.49.0-dev.ee3c432d85",
|
|
70
70
|
"vitest": "catalog:"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8dbcf2422471d60bf8784f70a337b129bd27e90f"
|
|
73
73
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {fetch} from "@lodestar/utils";
|
|
1
|
+
import {LodestarError, fetch, retry} from "@lodestar/utils";
|
|
2
2
|
import {downloadGenericSpecTests} from "./downloadTests.js";
|
|
3
3
|
|
|
4
|
-
type
|
|
4
|
+
type WorkflowRun = {id: number; created_at: string; head_sha: string};
|
|
5
|
+
type WorkflowRunsResponse = {workflow_runs: WorkflowRun[]};
|
|
5
6
|
type ArtifactsListResponse = {artifacts: {archive_download_url: string; expired: boolean; name: string}[]};
|
|
6
7
|
|
|
7
8
|
async function ghApiFetch<T>(endpoint: string, token: string): Promise<T> {
|
|
@@ -19,25 +20,61 @@ async function ghApiFetch<T>(endpoint: string, token: string): Promise<T> {
|
|
|
19
20
|
return res.json() as Promise<T>;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
async function
|
|
23
|
+
async function resolveNightlyRun(
|
|
24
|
+
repo: string,
|
|
25
|
+
token: string,
|
|
26
|
+
log: (msg: string) => void,
|
|
27
|
+
date: Date | "latest",
|
|
28
|
+
branch?: string
|
|
29
|
+
): Promise<WorkflowRun> {
|
|
23
30
|
const params = new URLSearchParams({status: "success", per_page: "1"});
|
|
24
31
|
if (branch) params.append("branch", branch);
|
|
25
32
|
// If neither branch nor date narrow the query, restrict to scheduled runs so
|
|
26
33
|
// a PR's successful run on consensus-specs can't outrank the latest master
|
|
27
34
|
// nightly. When a date is given, allow manual re-runs on that day too.
|
|
28
|
-
else if (
|
|
29
|
-
|
|
35
|
+
else if (date === "latest") params.append("event", "schedule");
|
|
36
|
+
// Require today's UTC run so upstream delays or failures surface in our nightly.
|
|
37
|
+
const createdFilter = (date === "latest" ? new Date() : date).toISOString().slice(0, 10);
|
|
38
|
+
const minCreatedAt = Date.parse(createdFilter);
|
|
39
|
+
const maxCreatedAt = minCreatedAt + 24 * 60 * 60 * 1000;
|
|
40
|
+
params.append("created", createdFilter);
|
|
30
41
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
return retry(
|
|
43
|
+
async () => {
|
|
44
|
+
const {workflow_runs} = await ghApiFetch<WorkflowRunsResponse>(
|
|
45
|
+
`/repos/${repo}/actions/workflows/tests.yml/runs?${params}`,
|
|
46
|
+
token
|
|
47
|
+
);
|
|
48
|
+
const run = workflow_runs[0];
|
|
49
|
+
if (!run) {
|
|
50
|
+
throw new LodestarError(
|
|
51
|
+
{code: "NIGHTLY_RUN_NOT_FOUND", repo, branch: branch ?? null, createdFilter},
|
|
52
|
+
`No successful run found for ${repo}${branch ? ` (${branch})` : ""} with created=${createdFilter}`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
// GitHub's run listing can return weeks-old results, so validate even with a date filter.
|
|
57
|
+
const createdAt = Date.parse(run.created_at);
|
|
58
|
+
if (!(createdAt >= minCreatedAt && createdAt < maxCreatedAt)) {
|
|
59
|
+
throw new LodestarError(
|
|
60
|
+
{
|
|
61
|
+
code: "NIGHTLY_RUN_OUTSIDE_DATE_RANGE",
|
|
62
|
+
runId: run.id,
|
|
63
|
+
createdAt: run.created_at ?? null,
|
|
64
|
+
createdFilter,
|
|
65
|
+
},
|
|
66
|
+
`Refusing nightly run ${run.id} created at ${run.created_at}: expected created=${createdFilter}`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return run;
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
retries: 2,
|
|
73
|
+
retryDelay: 1000,
|
|
74
|
+
shouldRetry: (error) => error instanceof LodestarError,
|
|
75
|
+
onRetry: (error, attempt) => log(`Nightly lookup attempt ${attempt}: ${error.message}`),
|
|
76
|
+
}
|
|
77
|
+
);
|
|
41
78
|
}
|
|
42
79
|
|
|
43
80
|
export async function downloadNightlyTests(
|
|
@@ -48,14 +85,20 @@ export async function downloadNightlyTests(
|
|
|
48
85
|
const token = process.env.GITHUB_TOKEN;
|
|
49
86
|
if (!token) throw new Error("GITHUB_TOKEN is required for nightly downloads");
|
|
50
87
|
|
|
51
|
-
const resolvedDate = date === "latest" || !date ?
|
|
52
|
-
if (
|
|
88
|
+
const resolvedDate = date === "latest" || !date ? "latest" : new Date(date);
|
|
89
|
+
if (
|
|
90
|
+
resolvedDate !== "latest" &&
|
|
91
|
+
(!Number.isFinite(resolvedDate.getTime()) || resolvedDate.toISOString().slice(0, 10) !== date)
|
|
92
|
+
) {
|
|
53
93
|
throw new Error(`Invalid date: "${date}". Expected "latest" or YYYY-MM-DD`);
|
|
54
94
|
}
|
|
55
95
|
|
|
56
96
|
const repo = new URL(opts.specTestsRepoUrl).pathname.slice(1).replace(/\/$/, "");
|
|
57
|
-
const
|
|
58
|
-
|
|
97
|
+
const run = await resolveNightlyRun(repo, token, log, resolvedDate, opts.branch);
|
|
98
|
+
const runId = run.id;
|
|
99
|
+
log(
|
|
100
|
+
`Resolved nightly${resolvedDate === "latest" ? "" : ` ${date}`} to run ${runId} (created_at=${run.created_at}, head_sha=${run.head_sha})`
|
|
101
|
+
);
|
|
59
102
|
|
|
60
103
|
const {artifacts} = await ghApiFetch<ArtifactsListResponse>(`/repos/${repo}/actions/runs/${runId}/artifacts`, token);
|
|
61
104
|
|