diff --git a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts index 71bdb8077..7c29aecbe 100644 --- a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts @@ -108,11 +108,10 @@ export class DeploymentPresenter { tasks: { select: { slug: true, - exportName: true, filePath: true, }, orderBy: { - exportName: "asc", + slug: "asc", }, }, sdkVersion: true, diff --git a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts index 91754c5c9..e7c58c5c2 100644 --- a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts @@ -191,7 +191,6 @@ export class SpanPresenter extends BasePresenter { lockedBy: { select: { filePath: true, - exportName: true, }, }, //relationships diff --git a/apps/webapp/app/presenters/v3/TaskPresenter.server.ts b/apps/webapp/app/presenters/v3/TaskPresenter.server.ts index 73ebbb9f7..671e92a44 100644 --- a/apps/webapp/app/presenters/v3/TaskPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/TaskPresenter.server.ts @@ -24,7 +24,6 @@ export class TaskPresenter { id: true, slug: true, filePath: true, - exportName: true, friendlyId: true, createdAt: true, worker: { diff --git a/apps/webapp/app/presenters/v3/TestPresenter.server.ts b/apps/webapp/app/presenters/v3/TestPresenter.server.ts index a49d6b426..23c181a8c 100644 --- a/apps/webapp/app/presenters/v3/TestPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/TestPresenter.server.ts @@ -24,7 +24,6 @@ export class TestPresenter extends BasePresenter { id: task.id, taskIdentifier: task.slug, filePath: task.filePath, - exportName: task.exportName, friendlyId: task.friendlyId, triggerSource: task.triggerSource, }; @@ -40,7 +39,6 @@ export class TestPresenter extends BasePresenter { version: string; slug: string; filePath: string; - exportName: string; friendlyId: string; triggerSource: TaskTriggerSource; }[] @@ -53,10 +51,10 @@ export class TestPresenter extends BasePresenter { WHERE "runtimeEnvironmentId" = ${envId} ), latest_workers AS (SELECT * FROM workers WHERE rn = 1) - SELECT bwt.id, version, slug, "filePath", "exportName", bwt."friendlyId", bwt."triggerSource" + SELECT bwt.id, version, slug, "filePath", bwt."friendlyId", bwt."triggerSource" FROM latest_workers JOIN ${sqlDatabaseSchema}."BackgroundWorkerTask" bwt ON bwt."workerId" = latest_workers.id - ORDER BY bwt."exportName" ASC;`; + ORDER BY slug ASC;`; } else { const currentDeployment = await findCurrentWorkerDeployment(envId); return currentDeployment?.worker?.tasks ?? []; diff --git a/apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts b/apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts index 7c768f407..f58a613a7 100644 --- a/apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts @@ -21,7 +21,6 @@ type Task = { id: string; taskIdentifier: string; filePath: string; - exportName?: string; friendlyId: string; }; diff --git a/apps/webapp/app/routes/api.v1.deployments.$deploymentId.ts b/apps/webapp/app/routes/api.v1.deployments.$deploymentId.ts index d9131aab4..643b1f8a1 100644 --- a/apps/webapp/app/routes/api.v1.deployments.$deploymentId.ts +++ b/apps/webapp/app/routes/api.v1.deployments.$deploymentId.ts @@ -61,7 +61,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) { id: task.friendlyId, slug: task.slug, filePath: task.filePath, - exportName: task.exportName, + exportName: task.exportName ?? "@deprecated", })), } : undefined, diff --git a/apps/webapp/app/routes/api.v1.projects.$projectRef.background-workers.$envSlug.$version.ts b/apps/webapp/app/routes/api.v1.projects.$projectRef.background-workers.$envSlug.$version.ts index 2f66c375b..299133cdf 100644 --- a/apps/webapp/app/routes/api.v1.projects.$projectRef.background-workers.$envSlug.$version.ts +++ b/apps/webapp/app/routes/api.v1.projects.$projectRef.background-workers.$envSlug.$version.ts @@ -66,7 +66,7 @@ export async function loader({ params, request }: LoaderFunctionArgs) { updatedAt: backgroundWorker.updatedAt, tasks: backgroundWorker.tasks.map((task) => ({ id: task.slug, - exportName: task.exportName, + exportName: task.exportName ?? "@deprecated", filePath: task.filePath, source: task.triggerSource, retryConfig: task.retryConfig, diff --git a/apps/webapp/app/routes/resources.runs.$runParam.ts b/apps/webapp/app/routes/resources.runs.$runParam.ts index 733557675..7866ee932 100644 --- a/apps/webapp/app/routes/resources.runs.$runParam.ts +++ b/apps/webapp/app/routes/resources.runs.$runParam.ts @@ -76,7 +76,6 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => { lockedBy: { select: { filePath: true, - exportName: true, }, }, }, @@ -150,7 +149,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => { task: { id: run.taskIdentifier, filePath: run.lockedBy?.filePath, - exportName: run.lockedBy?.exportName, + exportName: "@deprecated", }, run: { id: run.friendlyId, diff --git a/apps/webapp/app/v3/otlpExporter.server.ts b/apps/webapp/app/v3/otlpExporter.server.ts index cfee68e88..616bac919 100644 --- a/apps/webapp/app/v3/otlpExporter.server.ts +++ b/apps/webapp/app/v3/otlpExporter.server.ts @@ -382,7 +382,7 @@ function extractResourceProperties(attributes: KeyValue[]) { attemptNumber: extractNumberAttribute(attributes, SemanticInternalAttributes.ATTEMPT_NUMBER), taskSlug: extractStringAttribute(attributes, SemanticInternalAttributes.TASK_SLUG, "unknown"), taskPath: extractStringAttribute(attributes, SemanticInternalAttributes.TASK_PATH), - taskExportName: extractStringAttribute(attributes, SemanticInternalAttributes.TASK_EXPORT_NAME), + taskExportName: "@deprecated", workerId: extractStringAttribute(attributes, SemanticInternalAttributes.WORKER_ID), workerVersion: extractStringAttribute(attributes, SemanticInternalAttributes.WORKER_VERSION), queueId: extractStringAttribute(attributes, SemanticInternalAttributes.QUEUE_ID), diff --git a/packages/core/src/v3/schemas/api.ts b/packages/core/src/v3/schemas/api.ts index ad5a4d6b2..49d966787 100644 --- a/packages/core/src/v3/schemas/api.ts +++ b/packages/core/src/v3/schemas/api.ts @@ -379,7 +379,7 @@ export const GetDeploymentResponseBody = z.object({ id: z.string(), slug: z.string(), filePath: z.string(), - exportName: z.string(), + exportName: z.string().optional(), }) ), }) diff --git a/packages/core/src/v3/schemas/webhooks.ts b/packages/core/src/v3/schemas/webhooks.ts index a63eef8e8..e619ffe97 100644 --- a/packages/core/src/v3/schemas/webhooks.ts +++ b/packages/core/src/v3/schemas/webhooks.ts @@ -11,7 +11,7 @@ const AlertWebhookRunFailedObject = z.object({ /** File path where the task is defined */ filePath: z.string(), /** Name of the exported task function */ - exportName: z.string(), + exportName: z.string().optional(), /** Version of the task */ version: z.string(), /** Version of the SDK used */ @@ -142,7 +142,7 @@ export const AlertWebhookDeploymentSuccessObject = z.object({ /** File path where the task is defined */ filePath: z.string(), /** Name of the exported task function */ - exportName: z.string(), + exportName: z.string().optional(), /** Source of the trigger */ triggerSource: z.string(), })