Repository navigation
fix(schemas): download code bindings with SDK v3 responses - #8886
Open
itsrayeedscodespace wants to merge 1 commit into
Open
itsrayeedscodespace wants to merge 1 commit into
itsrayeedscodespace wants to merge 1 commit into
Conversation
Signed-off-by: Rayeed Zaman <rayeedzaman@gmail.com>
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
✅ I finished the code review, and didn't find any security or code quality issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #8885.
EventBridge Schemas code-binding downloads still check SDK v2's
ResourceNotFoundname, so SDK v3'sNotFoundExceptionnever starts code generation. Existing bindings also fail because v3 returnsUint8Array, while the downloader only acceptsBuffer. Returning a Buffer's entire backing ArrayBuffer can additionally include bytes outside the zip payload.Solution
NotFoundExceptionwhen deciding to generate and poll for code bindings.Uint8Array(including Buffer) and copy only its view into the returned ArrayBuffer.Validation
macOS arm64; Node 22.23.5 / npm 10.9.11; installed VS Code 1.146.0, using
@vscode/test-electron.runTestswith the repository's built Toolkit unit-test entrypoint and disposable user/config directories:e05c9eb08: 20 passing, 6 failing. The six cases catch v3 response handling, exact byte bounds, and missing-binding generation.eventSchemas/**/*.test.tsselection: 77 passing.npm run compileOnly -w packages/core: passed.npm run testCompile -w packages/toolkit: passed.git diff --check: passed.The extension-host tests use stubbed service responses, real SDK exception objects and real filesystem/zip extraction. No live AWS calls or credentialed integration tests were run; the full repository unit suite was not run. The installed VS Code binary was used to avoid downloading another editor. Its unrelated chat/agent features were disabled in the disposable test profile for repeatable startup.