PUT method (addressing_mode=0) expects extra_data be populated as if it was addressing_mode=2 #29
Labels
No labels
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
You do not have permission to read 1 dependency
Reference: clevermicro/amq-adapter-python#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ref epic: CleverSwarm Onboarding #58
while testing update function of CleverSwarm integration, using test benchmark command:
python benchmark_client.py --detailed --username user --ontologies_ids 1 10 --server_url http://127.0.0.1:8080/api/v0 --token abcd
, the update method fails with the dictionary key error for key value 'unstructured'.Reason is that the PUT request is provided by Java adapter as DataMessage with addressing_mode=0 (meaning the DataMessage body contains the actual request payload, in this case entire multipart/form-data content), while the handler method assumes addressing_mode=2 (uploaded files are transmitted separately from the DataMessage).
Because the actual files are encoded in the multipart message itself rather than sent via separate queue, while the handler still expects the extra_data dictionary, associated with addressing_mode=2, to have reference to temp file, in order to build UploadedFile class instance. However in the addressing_mode=0, the arg value already IS UploadedFile instance and needs not a conversion (and the extra_data dictionary, capturing the separate file uploads, is empty, because there are no separate queue file uploads.
fixed by PR #30, the reverts above is because accidentally an unrelated file was included to the PR.