When I run pytest with allure, the report are duplicated in job summary.

pip3 install allure-pytest
pytest --alluredir=alluredir
I checked the source code. The job summary is written in pytest_unconfigure hook. I am not quite familiar with pytest. I guess it was called twice when pytest run together with allure plugin. Maybe the job summary can be written in pytest_sessionfinish hook?