Skip to content

Commit 18048e7

Browse files
committed
Apply some 🐰 suggestions
1 parent fc0f2b3 commit 18048e7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

apps/webapp/app/routes/orgs.$organizationSlug.projects.$projectParam.runs.$runParam.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
1919
project: {
2020
slug: projectParam,
2121
organization: {
22+
slug: organizationSlug,
2223
members: {
2324
some: {
2425
userId,

apps/webapp/app/v3/eventRepository.server.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ export class EventRepository {
10041004
const span = await this.#createSpanFromEvent(
10051005
storeTable,
10061006
preparedEvent,
1007+
environmentId,
10071008
startCreatedAt,
10081009
endCreatedAt
10091010
);
@@ -1089,6 +1090,7 @@ export class EventRepository {
10891090
async #createSpanFromEvent(
10901091
storeTable: TaskEventStoreTable,
10911092
event: PreparedEvent,
1093+
environmentId: string,
10921094
startCreatedAt: Date,
10931095
endCreatedAt?: Date
10941096
) {
@@ -1099,6 +1101,7 @@ export class EventRepository {
10991101
await this.#walkSpanAncestors(
11001102
storeTable,
11011103
event,
1104+
environmentId,
11021105
startCreatedAt,
11031106
endCreatedAt,
11041107
(ancestorEvent, level) => {
@@ -1193,6 +1196,7 @@ export class EventRepository {
11931196
async #walkSpanAncestors(
11941197
storeTable: TaskEventStoreTable,
11951198
event: PreparedEvent,
1199+
environmentId: string,
11961200
startCreatedAt: Date,
11971201
endCreatedAt: Date | undefined,
11981202
callback: (event: PreparedEvent, level: number) => { stop: boolean }
@@ -1206,6 +1210,7 @@ export class EventRepository {
12061210
let parentEvent = await this.#getSpanEvent({
12071211
storeTable,
12081212
spanId: parentId,
1213+
environmentId,
12091214
startCreatedAt,
12101215
endCreatedAt,
12111216
});
@@ -1227,6 +1232,7 @@ export class EventRepository {
12271232
parentEvent = await this.#getSpanEvent({
12281233
storeTable,
12291234
spanId: preparedParentEvent.parentId,
1235+
environmentId,
12301236
startCreatedAt,
12311237
endCreatedAt,
12321238
});
@@ -1246,15 +1252,15 @@ export class EventRepository {
12461252
}: {
12471253
storeTable: TaskEventStoreTable;
12481254
spanId: string;
1249-
environmentId?: string;
1255+
environmentId: string;
12501256
startCreatedAt: Date;
12511257
endCreatedAt?: Date;
12521258
options?: { includeDebugLogs?: boolean };
12531259
}) {
12541260
return await startActiveSpan("getSpanEvent", async (s) => {
12551261
const events = await this.taskEventStore.findMany(
12561262
storeTable,
1257-
{ spanId, ...(environmentId ? { environmentId } : {}) },
1263+
{ spanId, environmentId },
12581264
startCreatedAt,
12591265
endCreatedAt,
12601266
undefined,

0 commit comments

Comments
 (0)