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

Upload of .zip with tests results via HTTP api, Premature end of file error, missing more details for the error ++ input checks #370

Closed
rsvoboda opened this issue Sep 21, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@rsvoboda
Copy link

I did some uploads of .zip with tests results via HTTP launch/import endpoint.
For one case I received Premature end of file error. I'm missing more details for the error ++ some input checks.
I had to "Force finish" the launch from the UI, import didn't end or recovered from this error.

Used version: https://github.com/rsvoboda/rsvoboda-playground/blob/master/reportportal.io/docker-compose-4.2.0.yml
Used zip: zzz.zip
Tested workflow: https://github.com/rsvoboda/rsvoboda-playground/tree/master/reportportal.io#push-of-zip-with-test-results

Details I would expect:

  • file name from the zip which caused the problem

Input checks I would expect:

  • file size > 0
  • (xml) file is well formed
  • file has known / parsable format (I noticed that api_1 service was parsing WildFly server configurations included in zzz.zip )

Recovery from the error:

  • I would expect import to proceed, skipping the problematic item
  • if it's hard to recover from the import, launch processing should be canceled automatically to avoid need of "Force finish" from the UI

Possible root cause:
Based on the error I assume problem is with the following xml file 0 09-20-2018 14:19 target/test-output/SmokeStandaloneTestCase/emptyConfigFile/empty.xml. I assume your service can't handle corrupted / 0 length xml file.

I added all my feedback into one issue, feel free to split it.

@svettsova
Copy link

Hello, @rsvoboda
Currently, version 5.1 of Report Portal have another behavior. Could you please have a look and leave your feedback?
Thank you in advance!
123

@rsvoboda
Copy link
Author

Can you share curl based upload command equivalent to the attached animated gif?

@svettsova
Copy link

@rsvoboda
Copy link
Author

ah, that's not what I meant. curl is command line tool used for invocation of URLs.

An example from https://github.com/rsvoboda/rsvoboda-playground/tree/master/reportportal.io#push-of-zip-with-test-results: curl -X POST --header 'Content-Type: multipart/form-data' --header 'Authorization: bearer 3b3763f3-6a48-4314-aba4-888851753c52' -F file=@xxx.zip 'http://localhost:8080/api/v1/default_personal/launch/import'

@svettsova
Copy link

Sure, sorry for misunderstanding
curl -X POST "http://dev.epm-rpp.projects.epam.com:8080/api/v1/kronos/launch/import" -H "accept: /" -H "Content-Type: multipart/form-data" -H "Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODU1NjY5NTMsInVzZXJfbmFtZSI6InN1cGVyYWRtaW4iLCJhdXRob3JpdGllcyI6WyJST0xFX0FETUlOSVNUUkFUT1IiXSwianRpIjoiZjI4OTExNzktNTVkZC00NTVmLWJhMmYtNjBmYjdjZDg0NjJmIiwiY2xpZW50X2lkIjoidWkiLCJzY29wZSI6WyJ1aSJdfQ.wzfu0uCPmdPle2qDNrSOaDpBDNPPPwTUQIO0fponU4g" -d {"file":{}}

@evjlobanova evjlobanova added this to the 5.1 milestone Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants