sphinx-contrib / confluencebuilder

Confluence Markup Builder Plugin for Sphinx
BSD 2-Clause "Simplified" License
317 stars 99 forks source link

support api retry events #984

Closed jdknight closed 4 months ago

jdknight commented 4 months ago

There are undesired scenarios where when publishing documentation to a Confluence instance that a publish event may trigger an interim failed API call. This can be a situation where Confluence is dealing with a transaction rollback (which may take a brief moment) or maybe there was a random failure on a reverse proxy to a Confluence instance. When an error like this (e.g. 5xx errors) occurs, publication immediately stops and a user/job will need to retry again to complete any publication attempt. This can be a bit of a pain for large documentation sets where Confluence may have a 1 in 100/1000 chance of triggering an error.

To help deal with this scenario, this extension will automatically retry API calls in the event that it detects an error which appears to be an interim issue. When detect, the extension will sleep for around five seconds then repeat the call.