denoland / denokv

A self-hosted backend for Deno KV
https://deno.com/kv
MIT License
500 stars 24 forks source link

Issues between local denokv DB and KV Connect #57

Open mcgear opened 10 months ago

mcgear commented 10 months ago

I am receiving this error when connecting to deno KV database from deno deploy: Error: Enqueue operations are not supported in KV Connect.

All works fine against a local db on file system.

Based on the docs i read, it seems like this should work on deno deploy as well.

Code start at line 110 of this file: https://github.com/fathym-deno/everything-as-code/blob/integration/routes/api/eac/index.ts

igorzi commented 10 months ago

Can you please describe your project structure? Do you have a listenQueue handler in one Deno Deploy project? and you're trying to enqueue from another Deno Deploy project?

mcgear commented 10 months ago

No, everything is in the same project. The index file i linked to is where it starts, and the handler is here: https://github.com/fathym-deno/everything-as-code/blob/integration/handlers/eac/commit.handler.ts

The helper methods are here: https://github.com/fathym-deno/everything-as-code/blob/integration/src/utils/deno-kv/helpers.ts

Additional handling for the checks are here: https://github.com/fathym-deno/everything-as-code/blob/integration/handlers/eac/commit-check.handler.ts

Let me know if you need anything else.

igorzi commented 10 months ago

In Deno Deploy, you don't need to use KV connect to interact with a KV database. You can just do Deno.openKv() and it will use the default KV database in your project.

Queues are currently not supported in KV connect protocol.

mcgear commented 10 months ago

Is there a timeline for KV connect protocol support? We deploy our deno apps outside of Deno Deploy.

igorzi commented 10 months ago

It's on the roadmap. Do you want to only enqueue and dequeue outside of Deno Deploy? Or just enqueue from outside, but have listenQueue in Deno Deploy?

mcgear commented 10 months ago

Looking to do both outside at this point

mcgear commented 8 months ago

Wanted to check in on this and see what the roadmap looked like for this.