X
Xata6mo ago
Ryan

Incorrect DB branch name on Vercel previews for Renovate branches

Hi folks, I've noticed in the last few days that for branches like renovate/lock-file-maintenance I'm getting build errors on Vercel like database branch [REPO:preview-USER-renovate] not found. Has something changed recently or am I doing something incorrectly? I'm guessing the branch name should be REPO:preview-USER-renovate-lock-file-maintenance and that something is going wrong in the construction of the DB branch name due to the /.
7 Replies
Ryan
RyanOP4mo ago
Started to use branchNameStrict in my Renovate Config, hopefully that resolves the issue Resolved the issue for Renovate PRs where the branch name doesn't contain numbers, but still not working for branches like preview-user-renovate-node-20-x. This branch name is created correctly in Xata, but I'm seeing eA [Error]: database branch [repo:preview-user-renovate] not found in Vercel builds Currently using "@xata.io/client": "^0.30.1",
cmck
cmck4mo ago
Hi Ryan, thanks for reaching out and apologies for the delay in getting back to you. Given that the branches are being created successfully in Xata this seems to be more of an issue with Vercel. Our CI does have a xata branch command that could help find the available branches in the GitHub actions run. https://xata.io/docs/getting-started/cli#branch
Ryan
RyanOP4mo ago
Hi @cmck - thanks for getting back to me. I'm unsure how the xata branch command helps, does it provide more info than I get from the Xata Dashboard? Here are more details from the logs
status: 404,
errors: [
{
message: 'database branch [project:preview-user-renovate] not found',
status: 404
}
],
requestId: 'c813b1eb-eee4-95a8-aeab-b1869e34dfb3',
status: 404,
errors: [
{
message: 'database branch [project:preview-user-renovate] not found',
status: 404
}
],
requestId: 'c813b1eb-eee4-95a8-aeab-b1869e34dfb3',
I'm using the Vercel Xata Integration to automatically setup the env
cmck
cmck4mo ago
I'll take a look at the request ID and see what I can find. 👍
Ryan
RyanOP4mo ago
Thank you
cmck
cmck4mo ago
I'll move this chat to a DM if that's alright with you so we can discuss details about your workspace.
Ryan
RyanOP4mo ago
Yep, sounds good 👍 For other people finding this thread. The solution was to add this to my .github/renovate.json file
"branchNameStrict": true,
"branchPrefix": "renovate-"
"branchNameStrict": true,
"branchPrefix": "renovate-"
https://docs.renovatebot.com/configuration-options/#branchnamestrict https://docs.renovatebot.com/configuration-options/#branchprefix

Did you find this page helpful?