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

fix: kv:key put upload binary files fix #1255

Merged
merged 5 commits into from
Jun 14, 2022

Conversation

f5io
Copy link
Contributor

@f5io f5io commented Jun 14, 2022

fixes #1254

@changeset-bot
Copy link

changeset-bot bot commented Jun 14, 2022

🦋 Changeset detected

Latest commit: dfef5e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@f5io f5io changed the title fix: kv:key put upload fix fix: kv:key put upload binary files fix Jun 14, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 14, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2495587526/npm-package-wrangler-1255

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1255/npm-package-wrangler-1255

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2495587526/npm-package-wrangler-1255 dev path/to/script.js

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for putting this together so quickly.
Please could you add a unit test after
https://github.com/cloudflare/wrangler2/blob/de4e3c2d4a0b647f190e709a0cadb6ef8eb08530/packages/wrangler/src/__tests__/kv.test.ts#L450-L464

And also can you run npx changeset to add a changeset for this fix.

@f5io
Copy link
Contributor Author

f5io commented Jun 14, 2022

@petebacondarwin as requested, all done...

i had to slightly change the older test as all files are now just handled as straight Buffers, hope that's not a problem. full jest suite passed on my machine

@JacobMGEvans
Copy link
Contributor

This is looking great! I will leave it up to @petebacondarwin for the approval 😄

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Thanks @f5io and well done for ramping up to our development flow so quickly and effectively.

@petebacondarwin petebacondarwin merged commit 2d806dc into cloudflare:main Jun 14, 2022
@github-actions github-actions bot mentioned this pull request Jun 14, 2022
threepointone added a commit that referenced this pull request Jun 17, 2022
@threepointone
Copy link
Contributor

We have to revert this because of this issue #1273 We'll work on a fix (unless @f5io a fix comes to mind for you?) and release it right after

@github-actions github-actions bot mentioned this pull request Jun 17, 2022
@f5io
Copy link
Contributor Author

f5io commented Jun 17, 2022

i can have a look at this today.

@threepointone is the revert necessary as this issue doesn't seem related to wrangler2 put, but more wrangler1 put -> wrangler2 get?

@threepointone
Copy link
Contributor

Potentially also wrangler2 older versions and wrangler2 newer versions iiuc

I'd like to make sure we have a proper story for all combinations before we roll this out, just being cautious

@f5io
Copy link
Contributor Author

f5io commented Jun 17, 2022

i believe the new issue relates to just logging the output of getKVKeyValue, if there's some way we can dump this to stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: kv:key put no longer able to upload binary files
4 participants