Replies: 10 comments 4 replies
-
Can you try setting See Usage |
Beta Was this translation helpful? Give feedback.
-
Thanks! I can definitely try setting this, but the guidance on Vercel's docs says its only necessary to use |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Is this only for the first commit of a new branch, or is this happening on every subsequent commit as well? |
Beta Was this translation helpful? Give feedback.
-
Hey @kieranm! While strange, this is intended behavior. Here is why we decided to make this change. Originally, when Say you have a branch - When deploying To fix this, we don't compare against Now, the issue you're experiencing comes in when the branch has never been deployed before. In this case, we don't have anything to compare against. So instead of falling back to As @gsoltis pointed out, we do provide an escape hatch for this via the
This allows you to provide a comparison to use in the event that the previously deployed commit is not available (first push of branch etc.) We're happy to entertain better options here if you have some suggestions as this is something that we fully admit is a bit confusing. But our goal is for |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation! The behaviour makes sense If there are no previous deploys for a branch, is there a way of checking for changes by comparing with the last deploy of the branch you are merging into? Eg. if In any case, I would suggest that the copy in the screenshot on Vercel could change or be clarified, because it's currently a bit misleading if apps are going to be deployed for safety even if they haven't changed vs the base branch. The behaviour is sensible but just needs to be made clearer I think. |
Beta Was this translation helpful? Give feedback.
-
Yes that would be the best solution here, and we're working on something internally to solve this that should be available soon. Right now, this is a limitation on Vercel due to the way the repo is cloned (to keep clones speedy, we only get details about the current branch, no others) so Vercel doesn't know anything about the base to compare against. |
Beta Was this translation helpful? Give feedback.
-
@tknickman I'm trying to use a custom script to figure out SHA of main branch and provide that to |
Beta Was this translation helpful? Give feedback.
-
I've come up with a workaround in the meantime
Then run the following script as part of mkdir -p ~/.ssh
echo "$GITHUB_DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
git remote add origin [email protected]:your-org/your-repo
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519' git fetch origin main:refs/remotes/origin/main
npx turbo-ignore --fallback origin/main There's a slight overhead to doing that, but most of the time there's not many extra refs to fetch between the shallow clone and |
Beta Was this translation helpful? Give feedback.
-
We've improved Turborepo on Vercel such that you no longer need to use this |
Beta Was this translation helpful? Give feedback.
-
What version of Turborepo are you using?
turbo-ignore@1.10.16
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
We have a monorepo with multiple websites, and for each Vercel app we have set the ignored build step to
npx turbo-ignore
. We have the Git integration enabled for preview builds.When we open a PR, we expect that only changed apps will be built, to reduce unnecessary builds.
However, in Vercel I see the following output:
The
@daybridge/daybridge.design
app did not have any changed files, so it should have been ignored. But the message suggests that all web apps are being built because they haven't been deployed before on this branch.Expected Behavior
I'm not sure if I'm doing something wrong, or if there is some context I'm missing, but it's important that apps that have not been changed don't deploy unnecessarily, so I would expect turbo-ignore to be skipping these even if they haven't been deployed before for a specific branch.
To Reproduce
npx turbo-ignore
Reproduction Repo
No response
Beta Was this translation helpful? Give feedback.
All reactions