Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: kv - local list output different schema than typical listing #3715

Closed
JacksonKearl opened this issue Aug 7, 2023 · 1 comment · Fixed by #3720
Closed

🐛 BUG: kv - local list output different schema than typical listing #3715

JacksonKearl opened this issue Aug 7, 2023 · 1 comment · Fixed by #3720
Assignees
Labels
bug Something that isn't working

Comments

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Aug 7, 2023

Which Cloudflare product(s) does this pertain to?

KV, Wrangler core

What version(s) of the tool(s) are you using?

building off main

What version of Node are you using?

No response

What operating system are you using?

Mac

Describe the Bug

The recent addition of the --local flag is lovely and I am a big fan. However the format it outputs list operations in is different from that which the non---local list operation uses. Specifically a --local list looks like:

{ 
    keys: {
        name: string,
        metadata?: string, // note the raw JSON, not parsed value
        expiration?: number
    }[], 
    list_complete: true
 }

whereas a standard list looks like:

{
    name: string,
    metadata?: any, // parsed JSON
    expiration?: number
}[]

It'd be nice if they had the same output format so tools building on wrangler don't have to have a special case for parsing local commands.

cc @jspspike

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@JacksonKearl JacksonKearl added the bug Something that isn't working label Aug 7, 2023
@jspspike
Copy link
Contributor

jspspike commented Aug 7, 2023

I see, I'll try to put up a PR sometime this week

@jspspike jspspike self-assigned this Aug 7, 2023
JacksonKearl added a commit to JacksonKearl/workers-sdk that referenced this issue Aug 8, 2023
jspspike pushed a commit that referenced this issue Aug 9, 2023
* Unify `kv:key list` output in local vs remote case
Fix #3715, Fix #3716

* Add tests
lrapoport-cf pushed a commit that referenced this issue Aug 11, 2023
* Unify `kv:key list` output in local vs remote case
Fix #3715, Fix #3716

* Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants