File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed
routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " trigger.dev " : patch
3+ ---
4+
5+ Fix for the MCP tool that gets run logs to help debugging
Original file line number Diff line number Diff line change 11import {
22 DeploymentErrorData ,
33 ExternalBuildData ,
4- logger ,
54 prepareDeploymentError ,
65} from "@trigger.dev/core/v3" ;
76import { type RuntimeEnvironment , type WorkerDeployment } from "@trigger.dev/database" ;
@@ -16,6 +15,7 @@ import { S2 } from "@s2-dev/streamstore";
1615import { env } from "~/env.server" ;
1716import { createRedisClient } from "~/redis.server" ;
1817import { tryCatch } from "@trigger.dev/core" ;
18+ import { logger } from "~/services/logger.server" ;
1919
2020const S2_TOKEN_KEY_PREFIX = "s2-token:project:" ;
2121
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -1267,9 +1267,9 @@ export type ApiBranchListResponseBody = z.infer<typeof ApiBranchListResponseBody
12671267export 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 ( ) ,
You can’t perform that action at this time.
0 commit comments