You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 01ed8f3
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sdk,core,webapp): let tasks declare the region(s) they may run in
Adds a task-level `region` option, a single region or a list, so a task
definition can restrict where its runs execute instead of relying on every
trigger call site passing `{ region }` or on the project default.
Placement at trigger time:
- a `region` passed when triggering must be in the task's list, otherwise
the trigger is rejected with a 400 naming the allowed regions
- with no trigger-time region, the project's default region is used when
the task allows it, otherwise the first region in the list
- tasks without `region` keep today's behaviour; DEV ignores it, matching
the existing per-trigger option
- the existing access checks (hidden groups, project allowlists, MICROVM
access, other projects' UNMANAGED groups) still apply to the picked region
Deploys now fail early with a message naming the task and region when a
listed region doesn't exist or isn't available to the project.
The SDK normalises `region` into a `regions` list in the task manifest,
which is persisted as a text-array column on BackgroundWorkerTask and rides
on the cached task-metadata entry, so the trigger hot path enforces it with
no additional query. Pre-existing cache entries decode as unconstrained.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Tasks can now declare the region(s) they may run in with `region: "eu-central-1"` or `region: ["eu-central-1", "us-east-1"]` in the task definition. A `region` passed when triggering must be one of them, otherwise the trigger is rejected. When no region is passed, the project's default region is used if the task allows it, otherwise the first region in the list. Deploys fail early if a task names a region that doesn't exist or isn't available to the project. The option is ignored in dev.
0 commit comments