mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 09:42:15 +03:00
fix(ci): allow test-masking to finish in release preflight (#9964)
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1828b6c14a
commit
ab8f3e83b7
@@ -221,6 +221,17 @@ export const FULL_CI_SKIP = new Set(["check:pr-evidence", "check:codeql-ratchet"
|
||||
// Gates that need a specific env to behave like CI (else they compare against the wrong base).
|
||||
export const FULL_CI_ENV = { "check:test-masking": { GITHUB_BASE_REF: "main" } };
|
||||
|
||||
const FULL_CI_DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
||||
const FULL_CI_TIMEOUT_OVERRIDES_MS = {
|
||||
// Measured at 19m38s on the loaded release-v3.8.50 devbox. The former generic
|
||||
// 10m ceiling killed a green scan before it could report its result.
|
||||
"check:test-masking": 30 * 60 * 1000,
|
||||
};
|
||||
|
||||
export function fullCiTimeoutFor(gateId) {
|
||||
return FULL_CI_TIMEOUT_OVERRIDES_MS[gateId] ?? FULL_CI_DEFAULT_TIMEOUT_MS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a ci.yml text and return the ordered, de-duplicated list of gate commands to run.
|
||||
* Each entry: { id, job, args:["run", <script>, ...("--" + args)], env }.
|
||||
@@ -272,7 +283,8 @@ export function extractCiGates(
|
||||
* never an infinite block that the release captain mistakes for a hang and kills the pre-flight.
|
||||
*/
|
||||
export function classifyRunError(err, timeoutMs) {
|
||||
if (err && err.killed && timeoutMs) {
|
||||
const timedOut = err?.killed === true || err?.code === "ETIMEDOUT";
|
||||
if (timedOut && timeoutMs) {
|
||||
return {
|
||||
code: 124,
|
||||
out: `gate exceeded its ${Math.round(timeoutMs / 1000)}s ceiling and was killed — treat as a hung/failed gate (e.g. an unreleased DB handle in the unit suite); does NOT pass`,
|
||||
@@ -696,7 +708,10 @@ async function main() {
|
||||
for (const g of gates) {
|
||||
// Skip a gate the curated pass already ran with the same id (avoid double-running lint).
|
||||
if (already.has(g.id)) continue;
|
||||
const { code, out } = run(npmCmd, g.args, { env: g.env, timeout: 10 * 60 * 1000 });
|
||||
const { code, out } = run(npmCmd, g.args, {
|
||||
env: g.env,
|
||||
timeout: fullCiTimeoutFor(g.id),
|
||||
});
|
||||
saveGateLog(`fullci-${g.id.replace(/[^a-z0-9]+/gi, "-")}`, out);
|
||||
record({
|
||||
id: g.id,
|
||||
|
||||
Reference in New Issue
Block a user