新增 release gate execution manifest API
This commit is contained in:
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
|
||||
|
||||
import {
|
||||
createProjectReleaseGateActionPlan,
|
||||
createProjectReleaseGateExecutionManifest,
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
@@ -85,6 +86,40 @@ assert.deepEqual(
|
||||
],
|
||||
);
|
||||
|
||||
const partialExecutionManifest = createProjectReleaseGateExecutionManifest({
|
||||
gateResults: {
|
||||
"diff-check": true,
|
||||
},
|
||||
observedOutputs: [
|
||||
"vendor sync up to date",
|
||||
"browser_release_artifact_url_workflow_smoke=ok",
|
||||
],
|
||||
});
|
||||
assert.equal(partialExecutionManifest.apiName, "project-release-gate-execution-manifest");
|
||||
assert.equal(partialExecutionManifest.manifestVersion, 1);
|
||||
assert.equal(partialExecutionManifest.phase, "waiting");
|
||||
assert.equal(partialExecutionManifest.ready, false);
|
||||
assert.equal(partialExecutionManifest.gateCount, 10);
|
||||
assert.equal(partialExecutionManifest.passedCount, 3);
|
||||
assert.equal(partialExecutionManifest.unknownCount, 7);
|
||||
assert.deepEqual(partialExecutionManifest.missingGateIds, partialMatrix.missingGateIds);
|
||||
assert.deepEqual(
|
||||
partialExecutionManifest.rows.filter(({ passed }) => passed).map(({ id, evidence }) => [id, evidence]),
|
||||
[
|
||||
["diff-check", "explicit-result"],
|
||||
["vendor-sync", "expected-output"],
|
||||
["release-artifact-url-browser", "expected-output"],
|
||||
],
|
||||
);
|
||||
assert.equal(
|
||||
partialExecutionManifest.rows.find(({ id }) => id === "vendor-sync")?.observedOutput,
|
||||
"vendor sync up to date",
|
||||
);
|
||||
assert.equal(
|
||||
partialExecutionManifest.rows.find(({ id }) => id === "standalone-cnc-semantics")?.observedOutput,
|
||||
null,
|
||||
);
|
||||
|
||||
const partialActionPlan = createProjectReleaseGateActionPlan({ gateResultMatrix: partialMatrix });
|
||||
assert.equal(partialActionPlan.apiName, "project-release-gate-action-plan");
|
||||
assert.equal(partialActionPlan.planVersion, 1);
|
||||
@@ -120,6 +155,9 @@ const report = createProjectReleaseReadinessReport({
|
||||
gateResults: Object.fromEntries(manifest.gateIds.map((id) => [id, true])),
|
||||
});
|
||||
assert.deepEqual(report.gateManifest, manifest);
|
||||
assert.equal(report.gateExecutionManifest.apiName, "project-release-gate-execution-manifest");
|
||||
assert.equal(report.gateExecutionManifest.ready, true);
|
||||
assert.equal(report.gateExecutionManifest.passedCount, manifest.gateCount);
|
||||
assert.equal(report.gateResultMatrix.ready, true);
|
||||
assert.equal(report.gateResultMatrix.passedCount, manifest.gateCount);
|
||||
assert.equal(report.gateActionPlan.ready, true);
|
||||
@@ -209,6 +247,7 @@ assert.deepEqual(
|
||||
["artifact", "project-release-readiness-report"],
|
||||
["gate-count", "10/10"],
|
||||
["gate-manifest", "ready"],
|
||||
["gate-execution-manifest", "ready"],
|
||||
["gate-result-matrix", "ready"],
|
||||
["gate-action-plan", "ready"],
|
||||
["missing", "none"],
|
||||
@@ -332,6 +371,10 @@ const failedArtifactUrlWorkflowSummary = createProjectReleaseReadinessArtifactUr
|
||||
assert.equal(staleArtifactValidationSummary.phase, "blocked");
|
||||
assert.match(staleArtifactValidationSummary.statusLine, /^Blocked: apiName, reportVersion/);
|
||||
assert.equal(staleArtifactValidationSummary.rows.find(({ id }) => id === "gate-action-plan")?.value, "missing");
|
||||
assert.equal(
|
||||
staleArtifactValidationSummary.rows.find(({ id }) => id === "gate-execution-manifest")?.value,
|
||||
"missing",
|
||||
);
|
||||
assert.equal(staleArtifactValidationActionPlan.phase, "blocked");
|
||||
assert.equal(staleArtifactValidationActionPlan.ready, false);
|
||||
assert.equal(staleArtifactValidationActionPlan.missingCount, staleArtifactValidation.missing.length);
|
||||
|
||||
@@ -35,6 +35,7 @@ import {
|
||||
createMachineSessionPersistenceRenderState,
|
||||
createMachineSessionPersistenceSummary,
|
||||
createProjectReleaseGateActionPlan,
|
||||
createProjectReleaseGateExecutionManifest,
|
||||
createProjectReleaseGateManifest,
|
||||
createProjectReleaseGateResultMatrix,
|
||||
createProjectReleaseReadinessArtifactJsonWorkflow,
|
||||
@@ -96,6 +97,7 @@ const requiredExports = [
|
||||
["createLinuxCncIniSdk", createLinuxCncIniSdk],
|
||||
["createLinuxCncInterpSdk", createLinuxCncInterpSdk],
|
||||
["createProjectReleaseGateActionPlan", createProjectReleaseGateActionPlan],
|
||||
["createProjectReleaseGateExecutionManifest", createProjectReleaseGateExecutionManifest],
|
||||
["createProjectReleaseGateManifest", createProjectReleaseGateManifest],
|
||||
["createProjectReleaseGateResultMatrix", createProjectReleaseGateResultMatrix],
|
||||
["createProjectReleaseReadinessArtifactJsonWorkflow", createProjectReleaseReadinessArtifactJsonWorkflow],
|
||||
@@ -302,6 +304,7 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
expectedGateCount: 10,
|
||||
expectedGateIds: createProjectReleaseGateManifest().gateIds,
|
||||
gateManifestReady: true,
|
||||
gateExecutionManifestReady: true,
|
||||
gateResultMatrixReady: true,
|
||||
gateActionPlanReady: true,
|
||||
blockedRuntimeFamilies: [
|
||||
@@ -325,6 +328,11 @@ assert.deepEqual(releaseReadinessArtifactValidation, {
|
||||
label: "Gate manifest",
|
||||
value: "ready",
|
||||
},
|
||||
{
|
||||
id: "gate-execution-manifest",
|
||||
label: "Gate execution manifest",
|
||||
value: "ready",
|
||||
},
|
||||
{
|
||||
id: "gate-result-matrix",
|
||||
label: "Gate result matrix",
|
||||
@@ -428,6 +436,7 @@ assert.deepEqual(
|
||||
"simConfigInventory.unexpectedFail",
|
||||
"blockedRuntimeFamilies",
|
||||
"gateManifest",
|
||||
"gateExecutionManifest",
|
||||
"gateResultMatrix",
|
||||
"gateActionPlan",
|
||||
"gates.length",
|
||||
|
||||
Reference in New Issue
Block a user