Skip to content

Commit c48b27a

Browse files
authored
Merge branch 'main' into wait-for-http-callback
2 parents 3f50577 + 053389d commit c48b27a

File tree

75 files changed

+1484
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1484
-289
lines changed

.changeset/pre.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@
2525
"green-lions-relate",
2626
"hip-cups-wave",
2727
"honest-files-decide",
28+
"itchy-games-sort",
2829
"late-chairs-ring",
2930
"moody-squids-count",
3031
"nice-colts-boil",
3132
"polite-impalas-care",
3233
"polite-lies-fix",
34+
"real-rats-drop",
35+
"red-chairs-begin",
3336
"red-wasps-cover",
3437
"shiny-kiwis-beam",
3538
"smart-coins-hammer",
@@ -42,6 +45,7 @@
4245
"tricky-houses-invite",
4346
"two-tigers-dream",
4447
"weak-jobs-hide",
45-
"wet-deers-think"
48+
"wet-deers-think",
49+
"wet-steaks-reflect"
4650
]
4751
}

.changeset/real-rats-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Add onCancel lifecycle hook

.github/workflows/publish-worker-re2.yml renamed to .github/workflows/publish-worker-v4.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "⚒️ Publish Worker RE2"
1+
name: "⚒️ Publish Worker (v4)"
22

33
on:
44
workflow_call:
@@ -85,11 +85,11 @@ jobs:
8585
REPOSITORY: ${{ steps.get_repository.outputs.repo }}
8686
IMAGE_TAG: ${{ steps.get_tag.outputs.tag }}
8787

88-
- name: 🐙 Push 'v3' tag to GitHub Container Registry
89-
if: steps.get_tag.outputs.is_semver == 'true'
90-
run: |
91-
docker tag infra_image "$REGISTRY/$REPOSITORY:v3"
92-
docker push "$REGISTRY/$REPOSITORY:v3"
93-
env:
94-
REGISTRY: ghcr.io/triggerdotdev
95-
REPOSITORY: ${{ steps.get_repository.outputs.repo }}
88+
# - name: 🐙 Push 'v3' tag to GitHub Container Registry
89+
# if: steps.get_tag.outputs.is_semver == 'true'
90+
# run: |
91+
# docker tag infra_image "$REGISTRY/$REPOSITORY:v3"
92+
# docker push "$REGISTRY/$REPOSITORY:v3"
93+
# env:
94+
# REGISTRY: ghcr.io/triggerdotdev
95+
# REPOSITORY: ${{ steps.get_repository.outputs.repo }}

.github/workflows/publish-worker.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ jobs:
7777
REPOSITORY: ${{ steps.get_repository.outputs.repo }}
7878
IMAGE_TAG: ${{ steps.get_tag.outputs.tag }}
7979

80-
- name: 🐙 Push 'v3' tag to GitHub Container Registry
81-
if: steps.get_tag.outputs.is_semver == 'true'
82-
run: |
83-
docker tag infra_image "$REGISTRY/$REPOSITORY:v3"
84-
docker push "$REGISTRY/$REPOSITORY:v3"
85-
env:
86-
REGISTRY: ghcr.io/triggerdotdev
87-
REPOSITORY: ${{ steps.get_repository.outputs.repo }}
80+
# - name: 🐙 Push 'v3' tag to GitHub Container Registry
81+
# if: steps.get_tag.outputs.is_semver == 'true'
82+
# run: |
83+
# docker tag infra_image "$REGISTRY/$REPOSITORY:v3"
84+
# docker push "$REGISTRY/$REPOSITORY:v3"
85+
# env:
86+
# REGISTRY: ghcr.io/triggerdotdev
87+
# REPOSITORY: ${{ steps.get_repository.outputs.repo }}

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,22 @@ jobs:
5656
secrets: inherit
5757

5858
publish-webapp:
59-
needs: [typecheck]
59+
needs: [typecheck, units]
6060
uses: ./.github/workflows/publish-webapp.yml
6161
secrets: inherit
6262
with:
6363
image_tag: ${{ inputs.image_tag }}
6464

6565
publish-worker:
66-
needs: [typecheck]
66+
needs: [typecheck, units]
6767
uses: ./.github/workflows/publish-worker.yml
6868
secrets: inherit
6969
with:
7070
image_tag: ${{ inputs.image_tag }}
71+
72+
publish-worker-v4:
73+
needs: [typecheck, units]
74+
uses: ./.github/workflows/publish-worker-v4.yml
75+
secrets: inherit
76+
with:
77+
image_tag: ${{ inputs.image_tag }}

.github/workflows/unit-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,32 @@ jobs:
88
name: "🧪 Unit Tests"
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: 🔧 Disable IPv6
12+
run: |
13+
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
14+
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
15+
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
16+
17+
- name: 🔧 Configure docker address pool
18+
run: |
19+
CONFIG='{
20+
"default-address-pools" : [
21+
{
22+
"base" : "172.17.0.0/12",
23+
"size" : 20
24+
},
25+
{
26+
"base" : "192.168.0.0/16",
27+
"size" : 24
28+
}
29+
]
30+
}'
31+
mkdir -p /etc/docker
32+
echo "$CONFIG" | sudo tee /etc/docker/daemon.json
33+
34+
- name: 🔧 Restart docker daemon
35+
run: sudo systemctl restart docker
36+
1137
- name: ⬇️ Checkout repo
1238
uses: actions/checkout@v4
1339
with:

apps/webapp/app/components/runs/v3/RunIcon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export function RunIcon({ name, className, spanName }: TaskIconProps) {
9797
case "task-hook-onResume":
9898
case "task-hook-onComplete":
9999
case "task-hook-cleanup":
100+
case "task-hook-onCancel":
100101
return <FunctionIcon className={cn(className, "text-text-dimmed")} />;
101102
case "task-hook-onFailure":
102103
case "task-hook-catchError":

apps/webapp/app/env.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ const EnvironmentSchema = z.object({
460460
RUN_ENGINE_REUSE_SNAPSHOT_COUNT: z.coerce.number().int().default(0),
461461
RUN_ENGINE_MAXIMUM_ENV_COUNT: z.coerce.number().int().optional(),
462462
RUN_ENGINE_WORKER_SHUTDOWN_TIMEOUT_MS: z.coerce.number().int().default(60_000),
463+
RUN_ENGINE_RETRY_WARM_START_THRESHOLD_MS: z.coerce.number().int().default(30_000),
463464

464465
RUN_ENGINE_WORKER_REDIS_HOST: z
465466
.string()
@@ -717,7 +718,7 @@ const EnvironmentSchema = z.object({
717718

718719
SLACK_BOT_TOKEN: z.string().optional(),
719720
SLACK_SIGNUP_REASON_CHANNEL_ID: z.string().optional(),
720-
721+
721722
// kapa.ai
722723
KAPA_AI_WEBSITE_ID: z.string().optional(),
723724
});

apps/webapp/app/runEngine/validators/triggerTaskValidator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class DefaultTriggerTaskValidator implements TriggerTaskValidator {
4646

4747
const result = await getEntitlement(environment.organizationId);
4848

49-
if (!result || result.hasAccess === false) {
49+
if (result && result.hasAccess === false) {
5050
return {
5151
ok: false,
5252
error: new OutOfEntitlementError(),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ function createRunEngine() {
9595
...(env.RUN_ENGINE_RUN_QUEUE_REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
9696
},
9797
},
98+
retryWarmStartThresholdMs: env.RUN_ENGINE_RETRY_WARM_START_THRESHOLD_MS,
9899
});
99100

100101
return engine;

0 commit comments

Comments
 (0)