From 0abc874ed55cbecf214cd7186a80c69e084eacc9 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 7 Jul 2023 21:57:24 -0400 Subject: [PATCH] chore(ci): fix turbo input path globs (#52414) This PR fixes turbo.json inputs to avoid cache hit when it should be cache miss. Example PR it was incorrectly cached: - [PR 52407](https://github.com/vercel/next.js/pull/52407) - [Commit 06b780](https://github.com/vercel/next.js/pull/52407/commits/06b780e15eb8f855e9ae8eabe037e4b9f93934cc) - [Logs with cache hit](https://github.com/vercel/next.js/actions/runs/5488474758/jobs/10001427837#step:27:29) The docs mention the glob is relative to the workspace (aka package) directory, not the monorepo root. > inputs globs must be specified as relative paths rooted at the workspace directory. https://turbo.build/repo/docs/reference/configuration#inputs --- turbo.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/turbo.json b/turbo.json index 76df81f9a81eb..c3e9a89db9670 100644 --- a/turbo.json +++ b/turbo.json @@ -41,35 +41,35 @@ "//#typescript": {}, "rust-check": { "inputs": [ - ".cargo/**", - "packages/next-swc/crates/**", - "**/Cargo.toml", - "**/Cargo.lock" + "../../.cargo/**", + "../../packages/next-swc/crates/**", + "../../**/Cargo.toml", + "../../**/Cargo.lock" ] }, "test-cargo-unit": { "inputs": [ - ".cargo/**", - "packages/next-swc/crates/**", - "**/Cargo.toml", - "**/Cargo.lock" + "../../.cargo/**", + "../../packages/next-swc/crates/**", + "../../**/Cargo.toml", + "../../**/Cargo.lock" ] }, "test-cargo-integration": { "inputs": [ - ".cargo/**", - "packages/next-swc/crates/**", - "packages/next/**", - "**/Cargo.toml", - "**/Cargo.lock" + "../../.cargo/**", + "../../packages/next-swc/crates/**", + "../../packages/next/**", + "../../**/Cargo.toml", + "../../**/Cargo.lock" ] }, "test-cargo-bench": { "inputs": [ - ".cargo/**", - "packages/next-swc/crates/**", - "**/Cargo.toml", - "**/Cargo.lock" + "../../.cargo/**", + "../../packages/next-swc/crates/**", + "../../**/Cargo.toml", + "../../**/Cargo.lock" ] }, "//#get-test-timings": {