Skip to content

Commit a5bc3ce

Browse files
committed
chore: address PR review feedback
- runAttemptSystem.ts: remove unreachable `if (packetError)` block. After `if (!packet) { return; }`, packet is truthy, which means packetError is null per tryCatch's contract. Pre-existing dead code. - platform.v3.server.ts: fix stale comment that referenced logger.warn — the helper only counts a metric (no per-call logging by design).
1 parent bdd5a5a commit a5bc3ce

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

apps/webapp/app/services/platform.v3.server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ function initializeClient() {
4444
}
4545

4646
const client = singleton("billingClient", initializeClient);
47-
// Failures from @trigger.dev/platform billing client calls. Logged at warn
48-
// (so they stay in stdout) and counted as a metric — Sentry was the wrong
49-
// tool for this signal because every task invocation hits these paths.
47+
// Failures from @trigger.dev/platform billing client calls are tracked via
48+
// this metric (with low-cardinality {function, kind} labels) rather than
49+
// logged. Every task invocation hits these paths, so per-call logs were too
50+
// noisy; dashboard the counter for visibility instead.
5051
const platformClientMeter = metrics.getMeter("trigger.dev/platform-client");
5152
const platformClientFailuresCounter = platformClientMeter.createCounter(
5253
"platform_client.failures_total",

internal-packages/run-engine/src/engine/systems/runAttemptSystem.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,24 +1980,12 @@ export class RunAttemptSystem {
19801980
}
19811981

19821982
if (completion.flushedMetadata) {
1983-
const [packetError, packet] = await tryCatch(parsePacket(completion.flushedMetadata));
1983+
const [, packet] = await tryCatch(parsePacket(completion.flushedMetadata));
19841984

19851985
if (!packet) {
19861986
return;
19871987
}
19881988

1989-
if (packetError) {
1990-
// Customer's flushedMetadata packet failed to parse — system handles
1991-
// it (we return), so log at warn rather than error.
1992-
this.$.logger.warn("RunEngine.completeRunAttempt(): failed to parse flushed metadata", {
1993-
runId,
1994-
flushedMetadata: completion.flushedMetadata,
1995-
error: packetError,
1996-
});
1997-
1998-
return;
1999-
}
2000-
20011989
const metadata = FlushedRunMetadata.safeParse(packet);
20021990

20031991
if (!metadata.success) {

0 commit comments

Comments
 (0)