Skip to content

Commit a716b1b

Browse files
authored
chore(deps): bump turbo to 2.11.10 (#9903)
* chore(deps): bump turbo to 2.11.10 * docs(ci): describe the Turborepo 2.11 task-level planner flag
1 parent 46707d6 commit a716b1b

8 files changed

Lines changed: 44 additions & 15 deletions

File tree

‎.github/CI.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CI selection and acceptance ownership
22

3-
The `changes` job runs Turborepo 2.9.14's `affectedTasks` query before installing application dependencies or provisioning services. `turbo.json` records package dependency propagation; `apps/sim/turbo.json` partitions the app into shared runtime, server, workspace UI, and acceptance tasks. `.github/ci-suites.json` turns those tasks into job matrices. The uploaded `ci-plan` artifact names changed files, selected tasks, attribution reasons, and any fallback.
3+
The `changes` job runs Turborepo 2.11.10's `affectedTasks` query before installing application dependencies or provisioning services. `turbo.json` records package dependency propagation; `apps/sim/turbo.json` partitions the app into shared runtime, server, workspace UI, and acceptance tasks. `.github/ci-suites.json` turns those tasks into job matrices. The uploaded `ci-plan` artifact names changed files, selected tasks, attribution reasons, and any fallback.
44

55
A PR compares the checked-out GitHub merge commit with its first parent: the actual target revision tested by that merge. The PR event's base SHA can become stale when the target advances. Scoping requires a matching GitHub merge ref and SHA, exactly two merge parents, and a usable target parent; otherwise every check runs. This works with the existing depth-two checkout without fetching older ancestry. Main/staging pushes execute all checks; the parent `ci` workflow skips checks on `dev` pushes, while PRs targeting `dev` still run checks. A manual `checks` run executes all checks unless supplied a full base commit SHA to reproduce a scoped plan. Missing history, an empty diff, unknown files outside the workspace graph, root script/CI changes, or a planner error run every check. Missing selection outputs fail the aggregate gate. The gate also rejects an omitted dependency, any failed/cancelled job, and any skip that its explicit selection flag did not authorize.
66

@@ -24,7 +24,7 @@ Integration also depends on workspace UI because the desktop executor integratio
2424

2525
SEO depends on workspace UI and server code: landing pages reuse workspace pricing and preview components, provider models/pricing, and the block registry. These directory boundaries are not isolated application dependency graphs.
2626

27-
`affectedTasks` already uses task inputs. Do not enable `futureFlags.affectedUsingTaskInputs` just for this planner: that flag also changes pruning, which can pull CI-only cross-app task dependencies into production Docker contexts.
27+
`affectedTasks` matches task inputs only under a task-level future flag; without one it reports every task of an affected package. The root `turbo.json` enables `futureFlags.filterUsingTasks`, which CI's package-name `--filter` calls are unaffected by. Do not use `futureFlags.affectedUsingTaskInputs` instead: that flag also changes pruning, which pulls CI-only cross-app task dependencies into production Docker contexts. `affectedTasks.items` also lists the prerequisites of affected tasks, so the planner selects `docs#build` through its own task filter, which applies before prerequisites are added.
2828

2929
Affected type-checks follow the package graph too; repository audits and lint run whenever the checks workflow runs. Workspace-only unit jobs use a free GitHub runner and do not start the app test shards.
3030

‎.github/scripts/ci-plan.gql‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ query($base: String!, $head: String!) {
2222
}
2323
}
2424
}
25+
# `items` also lists the prerequisites of affected tasks, and docs#build is one for
26+
# ci:e2e-docs-platform. The task filter applies before prerequisites are added, so this
27+
# selection holds docs#build only when the docs site itself changed.
28+
docsSite: affectedTasks(base: $base, head: $head, tasks: ["docs#build"]) {
29+
items { fullName }
30+
}
2531
}

‎apps/sim/turbo.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"inputs": [
77
"$TURBO_DEFAULT$",
88
"!app/workspace/**",
9-
"!app/(landing)/**",
9+
"!app/[(]landing[)]/**",
1010
"!app/api/**",
1111
"!content/**",
1212
"!public/library/**",
@@ -157,7 +157,7 @@
157157
"ci:e2e-seo": {
158158
"dependsOn": ["ci:server", "ci:ui"],
159159
"inputs": [
160-
"app/(landing)/**",
160+
"app/[(]landing[)]/**",
161161
"content/**",
162162
"public/library/**",
163163
"scripts/test-landing-seo-e2e.ts"

‎bun.lock‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
"remark-gfm": "4.0.1",
209209
"remark-parse": "11.0.0",
210210
"sharp": "0.35.5",
211-
"turbo": "2.9.14",
211+
"turbo": "2.11.10",
212212
"unified": "11.0.5",
213213
"unist-util-visit": "5.2.0",
214214
"vitest": "^5.1.0",

‎scripts/ci-changes.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,18 @@ describe('CI task attribution through real Turborepo', () => {
303303
e2e_build: true,
304304
})
305305
})
306+
it('keeps landing route-group edits on the rendering and SEO path', () => {
307+
const plan = classifyFiles(['apps/sim/app/(landing)/pricing/page.tsx'])
308+
expect(plan.fallback).toBeUndefined()
309+
expect(groups(plan)).toEqual(['seo'])
310+
expect(plan.flags).toMatchObject({
311+
integration: false,
312+
desktop_live: false,
313+
test_app: true,
314+
build: true,
315+
e2e_build: true,
316+
})
317+
})
306318
it.each(['delete', 'move'])('keeps SEO coverage when library media is removed: %s', (change) => {
307319
const { repo } = fixture()
308320
const media = 'apps/sim/public/library/example/cover.jpg'

‎scripts/ci-plan.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ interface QueryResult {
2020
data?: {
2121
packages: { items: { name: string; path: string }[] }
2222
affectedTasks: { items: ChangedTask[] }
23+
docsSite: { items: { fullName: string }[] }
2324
}
2425
}
2526
const root = process.cwd()
@@ -29,6 +30,7 @@ const suites: { http: Suite[]; production: Suite[] } = JSON.parse(
2930
const sourceBase = process.argv[2]
3031
let files: string[] = []
3132
let tasks: ChangedTask[] = []
33+
let docsSiteChanged = false
3234
let base = sourceBase
3335
let fallback: string | undefined
3436

@@ -80,6 +82,7 @@ try {
8082
if (
8183
result.errors?.length ||
8284
!Array.isArray(result.data?.affectedTasks?.items) ||
85+
!Array.isArray(result.data?.docsSite?.items) ||
8386
!Array.isArray(result.data?.packages?.items)
8487
)
8588
throw new Error('Turborepo did not return a complete task plan')
@@ -98,6 +101,7 @@ try {
98101
)
99102
)
100103
throw new Error('Malformed task attribution')
104+
docsSiteChanged = result.data.docsSite.items.some((task) => task.fullName === 'docs#build')
101105
} catch (error) {
102106
fallback = String(error)
103107
}
@@ -108,7 +112,7 @@ const http = suites.http.filter((suite) => affected(suite.task))
108112
const production = suites.production.filter((suite) => affected(suite.task))
109113
const desktopLive = affected('ci:desktop-live')
110114
const appTest = affected('test')
111-
const docsSite = fallback !== undefined || selected.has('docs#build')
115+
const docsSite = fallback !== undefined || docsSiteChanged
112116
const docsPlatform = affected('ci:e2e-docs-platform')
113117
const docsGroups = docsSite
114118
? ['http', 'corpus', 'chromium', 'webkit']

‎turbo.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
2-
"$schema": "https://v2-9-12.turborepo.dev/schema.json",
2+
"$schema": "https://v2-11-10.turborepo.dev/schema.json",
33
"envMode": "loose",
4+
// CI planning (`.github/scripts/ci-plan.gql`) needs `affectedTasks` to match changed files
5+
// against each task's `inputs`; without a task-level flag Turborepo reports every task of an
6+
// affected package. `filterUsingTasks` opts into that, and CI's `--filter` calls only name
7+
// packages, so it selects the same tasks. `affectedUsingTaskInputs` would also do it, but it
8+
// makes `turbo prune` keep packages reached only through `pkg#task` dependencies, which pulls
9+
// desktop, docs, and realtime into the app image.
10+
"futureFlags": { "filterUsingTasks": true },
411
// Local cache eviction is opt-in until Turborepo 3.0, so without these the
512
// filesystem cache grows forever. In CI each cache dir is a Blacksmith sticky
613
// disk that is mounted many times a day, so it never goes idle long enough for

0 commit comments

Comments
 (0)