Repository navigation
fix(sdk): encode sandbox metadata filters once - #1940
DevChiniwala wants to merge 1 commit into
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @DevChiniwala on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
🦋 Changeset detectedLatest commit: 046c6de The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this comment.
TASTE.md review: no violations — checked T-1 (JS encodeURIComponent and Python quote(safe="!~*'()-._") escape the same characters), T-2 (one shared helper in e2b/sandbox/ used by sync and async), T-52 (no new client-side validation) and T-3/T-10 (no public signature changes); 0 inline comments.
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @DevChiniwala on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hey, the PR is incorrect, closing. |
Problem
The OpenAPI contract says each metadata filter key and value must be URL-encoded (sandbox list parameter). Both SDKs encoded each component and then passed them through another encoder while assembling the inner metadata query string. For example, a filter containing a space or
&arrived with its percent escapes encoded again, so the API could not match the original metadata.Fix
Build the inner query from individually encoded keys and values, joining pairs with literal
&and=separators. The Python sync and async SDKs use the same helper.Usage
Regression coverage
Mocked request tests verify the metadata query value after HTTP query parsing. Coverage includes multiple filters, spaces, Unicode, slashes, ampersands, equals signs, and percent signs across JavaScript, Python sync, and Python async.
Validation
require-yieldwarnings inwatchHandle.test.tsruff check .,ruff format --check ., andty check: passedpnpm changeset status: passedCompatibility
No public signatures changed. Plain metadata filters remain unchanged; filters containing URL-encoded characters now arrive in the format specified by the API.
Changeset
Patch releases for
e2band@e2b/python-sdk.