telesto🌛
telesto🌛•6d ago

databaseBindingMismatch when trying to promote a deployment to production

Since recently, I can no longer promote deployments to production via dash.deno.com. Every time I try, I receive the following error message:
{"name":"ApiError","status":400,"code":"databaseBindingMismatch","traceId":"****","retryAfterSec":null,"message":"The requested deployment is binded to a different set of databases than the current production deployment."}
{"name":"ApiError","status":400,"code":"databaseBindingMismatch","traceId":"****","retryAfterSec":null,"message":"The requested deployment is binded to a different set of databases than the current production deployment."}
I've asked about this before in #general and opened an issue but I couldn't find anything that worked. I want to avoid deleting and starting all over again with my project if it's possible
No description
3 Replies
kliuksas
kliuksas•3d ago
hey, i had this in the past, idk what's the root cause, but maybe this can help: https://discord.com/channels/684898665143206084/826085979344470037/1284088904332480583
telesto🌛
telesto🌛OP•9h ago
hey 👋 thanks for the reply, if I'm reading this right I should be fine with my async calls as there aren't as many
import { Application, Router } from '@oak/oak';
import { getRestaurants } from './endpoints/restaurants.ts';
import { getDeals } from './endpoints/deals.ts';

const router = new Router();

router.get('/restaurants', async (ctx) => {
const restaurants = await getRestaurants();
ctx.response.body = restaurants;
});

router.get('/deals', async (ctx) => {
const day = ctx.request.url.searchParams.get('day');
const city = ctx.request.url.searchParams.get('city');

if (!day || !city) {
ctx.response.status = 400;
ctx.response.body = {
error: `Both 'day' and 'city' parameters are required`,
};
return;
}

const deals = await getDeals(day, city);
ctx.response.body = deals;
});

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({});
import { Application, Router } from '@oak/oak';
import { getRestaurants } from './endpoints/restaurants.ts';
import { getDeals } from './endpoints/deals.ts';

const router = new Router();

router.get('/restaurants', async (ctx) => {
const restaurants = await getRestaurants();
ctx.response.body = restaurants;
});

router.get('/deals', async (ctx) => {
const day = ctx.request.url.searchParams.get('day');
const city = ctx.request.url.searchParams.get('city');

if (!day || !city) {
ctx.response.status = 400;
ctx.response.body = {
error: `Both 'day' and 'city' parameters are required`,
};
return;
}

const deals = await getDeals(day, city);
ctx.response.body = deals;
});

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({});
do you spot anything that's off?
kliuksas
kliuksas•8h ago
Im not 100% certain whether the cause is really about the async stuff, but thats what i check now. The code you pasted seems fine, i would also check what getRestaurants and getDeals do, maybe they have some root level async or Deno.openKv

Did you find this page helpful?