-
Notifications
You must be signed in to change notification settings - Fork 41
fix: Standardize namespace before userId parameter order in Java SDK #180
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,7 +169,7 @@ void testDeleteWorkingMemory() throws Exception { | |
| .addHeader("Content-Type", "application/json")); | ||
|
|
||
| // Execute | ||
| AckResponse response = client.workingMemory().deleteWorkingMemory("session-123", "user-456", "test-namespace"); | ||
| AckResponse response = client.workingMemory().deleteWorkingMemory("session-123", "test-namespace", "user-456"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test passes userId and namespace in wrong orderMedium Severity In
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // Verify | ||
| assertNotNull(response); | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swapped namespace and userId in addMemoriesToWorkingMemory call
High Severity
In
addMemoriesToWorkingMemory, the callputWorkingMemory(sessionId, updated, null, namespace, null, null)passesnullas thenamespaceparameter and the localnamespacevariable as theuserIdparameter. After the signature reorder to(sessionId, memory, namespace, userId, ...), this call was not updated and now has the arguments swapped. The namespace value gets sent as auser_idquery parameter and namespace falls back to the default instead of the intended value.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raphaeldelio 👆🏽