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

Use rules.payload when extracting data for event stream #4607

Merged
merged 2 commits into from May 23, 2024

Conversation

inf3rnus
Copy link
Contributor

@inf3rnus inf3rnus commented Mar 8, 2024

Fixes #4580, problem is that there were undefined variables in lib/protocol/rest_json.js

File could use more cleanup as well, as there are also unused variables from whoever touched it last.

Without this change, you cannot use the client to get a streamed sagemaker request.

Checklist
  • [x ] npm run test passes (tests seem flaky, less are failing after this change, and failures change with each run, before and after the change. Your guys' judgement call)
  • [x ] run npm run integration if integration test is changed (tests are flaky and also just fail, always fail on my machine before and after change, didn't change them)

@inf3rnus inf3rnus requested a review from a team as a code owner March 8, 2024 22:03
@inf3rnus inf3rnus changed the title Fix upstream issue involving undefined variable problem in res_json.j… Fix upstream sagemaker streamed request issue involving undefined variable problem in rest_json.js Mar 8, 2024
@@ -75,7 +76,7 @@ function extractData(resp) {
var body = resp.httpResponse.body;
if (payloadMember.isEventStream) {
parser = new JsonParser();
resp.data[payload] = util.createEventStream(
resp.data[rules.payload] = util.createEventStream(
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this was a miss in #2085, likely while doing copy-paste from rest-xml.js

@trivikr trivikr changed the title Fix upstream sagemaker streamed request issue involving undefined variable problem in rest_json.js Use rules.payload when extracting data for event stream May 23, 2024
@kuhe kuhe merged commit 9fbf324 into aws:master May 23, 2024
1 check passed
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.

ReferenceError in SageMaker invokeEndpointWithResponseStream
3 participants