chronark
chronark
Explore posts from servers
CDCloudflare Developers
Created by chronark on 9/18/2024 in #workers-help
Observability
No description
3 replies
CDCloudflare Developers
Created by chronark on 6/12/2024 in #general-help
Load balancer times out
No description
7 replies
CDCloudflare Developers
Created by chronark on 4/6/2024 in #general-help
workers launchpad channel
hey guys, the email said we should message someone on discord about getting access to the cohort-3 discord channel, but that's very vague who do we actually need to reach out to?
14 replies
CDCloudflare Developers
Created by chronark on 4/4/2024 in #workers-help
workers.api.error.no_access_to_rollouts [code: 10208] when trying to upload a version
pnpm wrangler versions upload --experimental-versions
⛅️ wrangler 3.47.0
-------------------
Your worker has access to the following bindings:
- Durable Objects:
- DO_RATELIMIT: DurableObjectRatelimiter
- DO_USAGELIMIT: DurableObjectUsagelimiter
Total Upload: 1231.73 KiB / gzip: 237.45 KiB

✘ [ERROR] A request to the Cloudflare API (/accounts/REDACTED/workers/scripts/api/versions) failed.

workers.api.error.no_access_to_rollouts [code: 10208]
pnpm wrangler versions upload --experimental-versions
⛅️ wrangler 3.47.0
-------------------
Your worker has access to the following bindings:
- Durable Objects:
- DO_RATELIMIT: DurableObjectRatelimiter
- DO_USAGELIMIT: DurableObjectUsagelimiter
Total Upload: 1231.73 KiB / gzip: 237.45 KiB

✘ [ERROR] A request to the Cloudflare API (/accounts/REDACTED/workers/scripts/api/versions) failed.

workers.api.error.no_access_to_rollouts [code: 10208]
I logged out and in with wrangler to reset the token, but it's still returning this error
12 replies
CDCloudflare Developers
Created by chronark on 3/8/2024 in #workers-help
unstable_dev wrangler authentication
Hey there, I'm using https://developers.cloudflare.com/workers/wrangler/api/#unstable_dev for testing and it's great locally, where I have wrangler authenticated, but how would I do this in CI? there are no docs around it. I tried setting CLOUDFLARE_API_TOKEN as env variable, which works for deploying workers, but apparently that doesn't work with unstable_dev(.., { local: false})
2 replies
CDCloudflare Developers
Created by chronark on 2/21/2024 in #workers-help
Cannot resolve Durable Object due to transient issue on remote node.
We've gotten a ton of errors lately due to Cannot resolve Durable Object due to transient issue on remote node. What do you suggest we do about it? we're really sensitive about latency, so adding exponential backoffs is not ideal.
7 replies
DTDrizzle Team
Created by chronark on 2/2/2024 in #help
"drizzle-orm/planetscale-serverless/migrator" in cf workers
Hey guys in cf workers you don't have access to the file system, how hard would it be to provide migrations to the migrate function? something like this:
import {migrate} from "drizzle-orm/planetscale-serverless/migrator";

await migarte(db, `CREATE TABLE...`)
import {migrate} from "drizzle-orm/planetscale-serverless/migrator";

await migarte(db, `CREATE TABLE...`)
12 replies
DTDrizzle Team
Created by chronark on 12/11/2023 in #help
planetscale - removing uniqueIndex
Hey there, I'm trying to remove a unique index on planetscale but when I push my schema, it tells me the constraint is not found My change:
(table) => ({
tenantIdIdx: uniqueIndex("tenant_id_idx").on(table.tenantId),
- slugIdx: uniqueIndex("slug_idx").on(table.slug),
}),
(table) => ({
tenantIdIdx: uniqueIndex("tenant_id_idx").on(table.tenantId),
- slugIdx: uniqueIndex("slug_idx").on(table.slug),
}),
pnpm drizzle-kit push:mysql
pnpm drizzle-kit push:mysql
6 replies
DTDrizzle Team
Created by chronark on 12/8/2023 in #help
[solved] database.insert is not a function
Hey friends, I'm trying to setup drizzle with mysql but can not insert data :/
import { drizzle } from "drizzle-orm/mysql2";
import mysql from "mysql2/promise"

const conn = await mysql.createConnection({
host: opts.host,
user: opts.username,
password: opts.password,
ssl: { rejectUnauthorized: true }
})
const db = drizzle(conn,
{
schema,
mode: "default"
},
);

console.log("connected to db", Object.keys(db))
// connected to db [ "dialect", "session", "mode", "query", "_" ]
import { drizzle } from "drizzle-orm/mysql2";
import mysql from "mysql2/promise"

const conn = await mysql.createConnection({
host: opts.host,
user: opts.username,
password: opts.password,
ssl: { rejectUnauthorized: true }
})
const db = drizzle(conn,
{
schema,
mode: "default"
},
);

console.log("connected to db", Object.keys(db))
// connected to db [ "dialect", "session", "mode", "query", "_" ]
and then in my app it crashes:
await database.insert(schema.workspaces).values(unkeyWorkspace);
^
TypeError: database.insert is not a function. (In 'database.insert(schema.workspaces)', 'database.insert' is undefined)
await database.insert(schema.workspaces).values(unkeyWorkspace);
^
TypeError: database.insert is not a function. (In 'database.insert(schema.workspaces)', 'database.insert' is undefined)
Has anyone encountered this too?
3 replies