allure-docker-service
allure-docker-service copied to clipboard
Async report endpoint
Starting from some amount of Test Cases (300 for my case) report generation begin taking time bigger than a minute. Since
allure-docker-service
does call on allure-commandline
in a synchronous manner that drives me to a situation when my proxy (nginx) count such request as hanged and abort the connection with 504 Gateway Timeout
. Apparently that triggers a kill of the python process which handles generation request. And because allure-docker-service
communicate with the spawned proccess this process receives SIGPIPE
signal and exits leaving report unfinished. My instance running on Kubernetes with many other stuff hanging around, and it's not possible to increase ingress proxt timeout just for the one pod and not for others.
This PR does the following things:
- Introduce 2 new endpoints: POST and GET for
/generate-report/async
path- POST
/generate-report/async
returns response immediately and not communicate with the spawned process so it's fully independent - GET
/generate-report/async
return the status of currently processed job: 202 for still processing and 200 for processed
- POST
- Documentation for these two methods above
- Allure version update
- Dependecies versions update: all Flask 1.* versions literally broken due to dependency deletion, so that has to be done just to bring it up again
- All dependencies moved to a single place:
requirements.txt
file; which is a standard file to store them - Some code refactoring to reduce copy-paste
PS: Looks like the repo is out of support for a while. So for those who eagerly want my changes I built a package in my space: https://github.com/HardNorth/allure-docker-service/pkgs/container/allure-docker-service
@fescobar Please review
@fescobar we appear to be seeing this as well
The latest changes in upstream were merged, new docker image was built.
@fescobar pls review changes, i need to use async
@HardNorth merge pls last update for Allure 2.21
@Phoenix124 Done
Sorry guys, but I don't have plans to implement async endpoints. The way the Allure native framework works won't allow the async endpoints work properly.