Skip to content

Commit 6e1d4db

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/retry-internal-errors
2 parents 25a7578 + 9a5e6e5 commit 6e1d4db

File tree

30 files changed

+629
-310
lines changed

30 files changed

+629
-310
lines changed

.changeset/brown-laws-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Fix: Handle circular references in flattenAttributes function

.changeset/cuddly-pugs-begin.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 issue with prisma extension breaking deploy builds

.changeset/good-ligers-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/build": patch
3+
---
4+
5+
Added a Vercel sync env vars extension. Given a Vercel projectId and access token it will sync Vercel env vars when deploying Trigger.dev tasks.

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
SESSION_SECRET: "secret"
3939
MAGIC_LINK_SECRET: "secret"
4040
ENCRYPTION_KEY: "secret"
41-
41+
42+
- name: 🧪 Run Package Unit Tests
43+
run: pnpm run test --filter "@trigger.dev/*"
4244

4345
- name: 🧪 Run Internal Unit Tests
4446
run: pnpm run test --filter "@internal/*"

apps/webapp/app/components/ErrorDisplay.tsx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import { HomeIcon } from "@heroicons/react/20/solid";
12
import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
2-
import { LinkButton } from "./primitives/Buttons";
3-
import { Header1, Header3 } from "./primitives/Headers";
3+
import { motion } from "framer-motion";
44
import { friendlyErrorDisplay } from "~/utils/httpErrors";
5+
import { LinkButton } from "./primitives/Buttons";
6+
import { Header1 } from "./primitives/Headers";
7+
import { Paragraph } from "./primitives/Paragraph";
58

69
type ErrorDisplayOptions = {
710
button?: {
@@ -39,12 +42,32 @@ type DisplayOptionsProps = {
3942

4043
export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
4144
return (
42-
<div className="p-4">
43-
<Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1>
44-
{message && <Header3>{message}</Header3>}
45-
<LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8">
46-
{button ? button.title : "Home"}
47-
</LinkButton>
45+
<div className="relative flex min-h-screen flex-col items-center justify-center bg-[#16181C]">
46+
<div className="z-10 mt-[30vh] flex flex-col items-center gap-8">
47+
<Header1>{title}</Header1>
48+
{message && <Paragraph>{message}</Paragraph>}
49+
<LinkButton
50+
to={button ? button.to : "/"}
51+
shortcut={{ modifiers: ["meta"], key: "g" }}
52+
variant="primary/medium"
53+
LeadingIcon={HomeIcon}
54+
>
55+
{button ? button.title : "Go to homepage"}
56+
</LinkButton>
57+
</div>
58+
<div className="pointer-events-none absolute bottom-4 right-4 z-10 h-[70px] w-[200px] bg-[rgb(24,26,30)]" />
59+
<motion.div
60+
className="pointer-events-none absolute inset-0 overflow-hidden"
61+
initial={{ opacity: 0 }}
62+
animate={{ opacity: 1 }}
63+
transition={{ delay: 0.5, duration: 2, ease: "easeOut" }}
64+
>
65+
<iframe
66+
src="https://my.spline.design/untitled-a6f70b5ebc46bdb2dcc0f21d5397e8ac/"
67+
className="pointer-events-none absolute inset-0 h-full w-full object-cover"
68+
style={{ border: "none" }}
69+
/>
70+
</motion.div>
4871
</div>
4972
);
5073
}

apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ export function ErrorBoundary() {
127127
return org ? (
128128
<RouteErrorDisplay button={{ title: org.title, to: organizationPath(org) }} />
129129
) : (
130-
<RouteErrorDisplay button={{ title: "Home", to: "/" }} />
130+
<RouteErrorDisplay button={{ title: "Go to homepage", to: "/" }} />
131131
);
132132
}

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.schedules.new/route.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { CronPattern, UpsertSchedule } from "~/v3/schedules";
4444
import { UpsertTaskScheduleService } from "~/v3/services/upsertTaskSchedule.server";
4545
import { AIGeneratedCronField } from "../resources.orgs.$organizationSlug.projects.$projectParam.schedules.new.natural-language";
4646
import { TimezoneList } from "~/components/scheduled/timezones";
47+
import { logger } from "~/services/logger.server";
4748

4849
const cronFormat = `* * * * *
4950
┬ ┬ ┬ ┬ ┬
@@ -94,9 +95,9 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
9495
submission.value?.friendlyId === result.id ? "Schedule updated" : "Schedule created"
9596
);
9697
} catch (error: any) {
97-
const errorMessage = `Failed: ${
98-
error instanceof Error ? error.message : JSON.stringify(error)
99-
}`;
98+
logger.error("Failed to create schedule", error);
99+
100+
const errorMessage = `Something went wrong. Please try again.`;
100101
return redirectWithErrorMessage(
101102
v3SchedulesPath({ slug: organizationSlug }, { slug: projectParam }),
102103
request,

apps/webapp/app/services/apiRateLimit.server.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ import { authorizationRateLimitMiddleware } from "./authorizationRateLimitMiddle
44
import { Duration } from "./rateLimiter.server";
55

66
export const apiRateLimiter = authorizationRateLimitMiddleware({
7+
redis: {
8+
port: env.REDIS_PORT,
9+
host: env.REDIS_HOST,
10+
username: env.REDIS_USERNAME,
11+
password: env.REDIS_PASSWORD,
12+
enableAutoPipelining: true,
13+
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
14+
},
715
keyPrefix: "api",
816
defaultLimiter: {
917
type: "tokenBucket",

0 commit comments

Comments
 (0)