GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): log failure cause when checkpoint baseline capture fails… · patroza/t3code@bf20415

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/orchestration-v2
    • RunExecutionService.test.ts
    • RunExecutionService.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/orchestration-v2/RunExecutionService.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/RunExecutionService.test.ts
+27-1Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import * as Deferred from "effect/Deferred";
3939
import * as Duration from "effect/Duration";
4040
import * as Effect from "effect/Effect";
4141
import * as Layer from "effect/Layer";
42+
import * as Logger from "effect/Logger";
4243
import * as Option from "effect/Option";
4344
import * as Queue from "effect/Queue";
4445
import * as Ref from "effect/Ref";
@@ -1214,6 +1215,12 @@ it.effect("starts the provider when checkpoint baseline capture fails", () =>
12141215
id: CheckpointScopeId.make("checkpoint-scope:run-execution-baseline-failure"),
12151216
} as OrchestrationV2CheckpointScope;
12161217
const providerStarts = yield* Ref.make(0);
1218+
const warnings: Array<ReadonlyArray<unknown>> = [];
1219+
const logger = Logger.make(({ logLevel, message }) => {
1220+
if (logLevel === "Warn") {
1221+
warnings.push(Array.isArray(message) ? message : [message]);
1222+
}
1223+
});
12171224
const writes = yield* Ref.make<
12181225
ReadonlyArray<{
12191226
events: ReadonlyArray<OrchestrationV2DomainEvent>;
@@ -1301,10 +1308,29 @@ it.effect("starts the provider when checkpoint baseline capture fails", () =>
13011308
},
13021309
},
13031310
});
1304-
}).pipe(Effect.provide(layerTest));
1311+
}).pipe(
1312+
Effect.provide(
1313+
layerTest.pipe(Layer.provideMerge(Logger.layer([logger], { mergeWithExisting: false }))),
1314+
),
1315+
);
13051316

13061317
assert.equal(yield* Ref.get(providerStarts), 1);
13071318

1319+
const baselineWarning = warnings.find(
1320+
(entry) =>
1321+
entry[0] ===
1322+
"orchestration V2 checkpoint baseline capture failed; starting provider without a baseline",
1323+
);
1324+
assert.isDefined(baselineWarning);
1325+
const warningFields = baselineWarning?.[1] as { runId?: unknown; cause?: unknown } | undefined;
1326+
assert.equal(warningFields?.runId, runId);
1327+
assert.isTrue(Cause.isCause(warningFields?.cause));
1328+
if (Cause.isCause(warningFields?.cause)) {
1329+
const renderedCause = Cause.pretty(warningFields.cause);
1330+
assert.include(renderedCause, "CheckpointBaselineCaptureError");
1331+
assert.include(renderedCause, "VCS process timed out");
1332+
}
1333+
13081334
const events = (yield* Ref.get(writes)).flatMap((write) => [...write.events]);
13091335
const failedEvent = events.find(
13101336
(event) =>
Collapse file

‎apps/server/src/orchestration-v2/RunExecutionService.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/RunExecutionService.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ export const layer: Layer.Layer<
11051105
? Effect.interrupt
11061106
: Effect.logWarning(
11071107
"orchestration V2 checkpoint baseline capture failed; starting provider without a baseline",
1108-
{ runId: input.run.id },
1108+
{ runId: input.run.id, cause },
11091109
),
11101110
),
11111111
);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.