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 commands do not roundtrip binary data correctly #1273

Closed
koeninger opened this issue Jun 15, 2022 · 2 comments · Fixed by #1287
Closed

🐛 BUG: kv commands do not roundtrip binary data correctly #1273

koeninger opened this issue Jun 15, 2022 · 2 comments · Fixed by #1287
Labels
bug Something that isn't working

Comments

@koeninger
Copy link

koeninger commented Jun 15, 2022

What version of Wrangler are you using?

2.0.12

What operating system are you using?

Mac

Describe the Bug

Regression compared to wrangler1, raised by customers in discord. Even if #1255 fixes puts, it looks like reads don't work correctly.

bash-3.2$ dd if=/dev/urandom of=/tmp/random-binary bs=1 count=4096
4096+0 records in
4096+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.031555 s, 130 kB/s
bash-3.2$ wrangler1 kv:key put --binding="NEWKV" "a-random-key" "/tmp/random-binary" --path
✨ Success
bash-3.2$ wrangler1 kv:key get --binding="NEWKV" "a-random-key" > /tmp/random-binary-roundtrip
bash-3.2$ wrangler2 kv:key get --binding="NEWKV" "a-random-key" > /tmp/random-binary-roundtrip2
bash-3.2$ md5sum /tmp/random-binary
35f2320ed7c5c8ad4fd8056c6773c365 /tmp/random-binary
bash-3.2$ md5sum /tmp/random-binary-roundtrip
35f2320ed7c5c8ad4fd8056c6773c365 /tmp/random-binary-roundtrip
bash-3.2$ md5sum /tmp/random-binary-roundtrip2
2c8bb93dd8bd9c3a22e0158195365bda /tmp/random-binary-roundtrip2

@koeninger koeninger added the bug Something that isn't working label Jun 15, 2022
@threepointone
Copy link
Contributor

Thank you for reporting! We should fix this

@threepointone
Copy link
Contributor

We've currently reverted #1255 and will land it back as soon as we have a fix for kv:key read as well. Thank you for reporting this!

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