Skip to content

Commit 73d29b6

Browse files
authored
Merge branch 'main' into fix/transient-object-storage
2 parents 455398a + a342332 commit 73d29b6

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.changeset/fuzzy-wolves-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Fix for the MCP tool that gets run logs to help debugging

apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
DeploymentErrorData,
33
ExternalBuildData,
4-
logger,
54
prepareDeploymentError,
65
} from "@trigger.dev/core/v3";
76
import { type RuntimeEnvironment, type WorkerDeployment } from "@trigger.dev/database";
@@ -16,6 +15,7 @@ import { S2 } from "@s2-dev/streamstore";
1615
import { env } from "~/env.server";
1716
import { createRedisClient } from "~/redis.server";
1817
import { tryCatch } from "@trigger.dev/core";
18+
import { logger } from "~/services/logger.server";
1919

2020
const S2_TOKEN_KEY_PREFIX = "s2-token:project:";
2121

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ export default function Page() {
137137
} catch (error) {
138138
if (abortController.signal.aborted) return;
139139

140-
const isNotFoundError = error instanceof S2Error && error.code === "stream_not_found";
140+
const isNotFoundError =
141+
error instanceof S2Error &&
142+
error.code &&
143+
["permission_denied", "stream_not_found"].includes(error.code);
141144
if (isNotFoundError) return;
142145

143146
console.error("Failed to stream logs:", error);

packages/cli-v3/src/mcp/formatters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function formatSpan(
238238
const duration = formatDuration(span.data.duration);
239239
const startTime = formatDateTime(span.data.startTime);
240240

241-
lines.push(`${indent}${prefix} ${span.message} ${statusIndicator}`);
241+
lines.push(`${indent}${prefix} ${span.data.message} ${statusIndicator}`);
242242
lines.push(`${indent} Duration: ${duration}`);
243243
lines.push(`${indent} Started: ${startTime}`);
244244

packages/core/src/v3/schemas/api.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,9 +1267,9 @@ export type ApiBranchListResponseBody = z.infer<typeof ApiBranchListResponseBody
12671267
export const RetrieveRunTraceSpanSchema = z.object({
12681268
id: z.string(),
12691269
parentId: z.string().optional(),
1270-
message: z.string(),
1270+
runId: z.string(),
12711271
data: z.object({
1272-
runId: z.string(),
1272+
message: z.string(),
12731273
taskSlug: z.string().optional(),
12741274
taskPath: z.string().optional(),
12751275
events: z.array(z.any()).optional(),
@@ -1279,7 +1279,6 @@ export const RetrieveRunTraceSpanSchema = z.object({
12791279
isPartial: z.boolean(),
12801280
isCancelled: z.boolean(),
12811281
level: z.string(),
1282-
environmentType: z.string(),
12831282
workerVersion: z.string().optional(),
12841283
queueName: z.string().optional(),
12851284
machinePreset: z.string().optional(),

0 commit comments

Comments
 (0)