Attachment upload issue in FaaS

115 阅读1分钟

Sent: Tuesday, 7 June, 2016 3:08 PM

Rename attachments in MyTask app on FaaS. The root cause of this issue is: the HTTP request header field ‘newfilename’ is missing in Gateway system.
And the Gateway team gives us below investigation result. As we discussed, I changed the file rename request to batch request and issue is solved.

But I found the file upload feature is unavailable in all our apps in FaaS. Please kindly refer to the attachment for detail analyzing results.
In a short word, the filed ‘slug’(object GUID) is missing when the HTTP request sending to gateway system.
From my analysis, you will find that ‘slug’ is a predefined parameter in the framework logic, so I think it should not be discarded in FaaS framework.
Cannot find ‘Slug’ parameter from parameters table, the slug is the task GUID which the file is upload to.
clipboard1
The file cannot be uploaded because Task GUID is blank! Task existence check failed!
clipboard2

Checking why the value of slug is missing! Firstly, check the HTTP request send from UI. The header data indeed contains file ‘slug’
clipboard3
When getting the header fields from HTTP request, field ‘slug’ has lost. Errors starts from here!
clipboard4
clipboard5
clipboard6
clipboard7

-----------------------------Check the same call stack on on-premise system --------------------------------------------
The HTTP request send from UI, it has the same structure with FaaS
clipboard8

The header field ‘slug’ has not lost when getting the header fields from HTTP request, but it lost in FaaS GateWay system!
clipboard9

clipboard10
clipboard11

clipboard12
------------------------------Try to fix this issue in Faas-------------------------------------------------------------------------
Step1: use Batch request in FaaS fiori UI
The HTTP request of file uploading is actually sent from function FileUploader.js->sendFiles(), so we cannot change the request to Batch
clipboard13
Step2: want to try to use ‘useBatch’: true in configuration.js, but the change cannot be tested before codes released to FaaS.
clipboard14

The issue is attachment uploading doesn’t work in faas environment, the reason described in incident is that there is an http request header(named slug) is not allowed in faas.

As we checked our code that this request header is not only consumed by our application code, and further it is mandatory required by SAP gateway framework, you can see in following screen shot of gateway code:
clipboard15
In gateway framework, if it is a media stream type request, it requires an http header named slug.

We think it is not only for our application, but also the media creation request from gateway to faas in generic.