[PASQAL] Add pasqal clients retry policy - #155
Conversation
badtst
left a comment
There was a problem hiding this comment.
LGTM, I'd suggest adapting the way we match against the QRMI_PASQAL_RETRIES_DISABLED env variable for usage with the qrmi_config.json
badtst
left a comment
There was a problem hiding this comment.
lgtm ! Waiting for feedback on the variable name
| /// `<backend_name>_QRMI_PASQAL_RETRIES_DISABLED` (e.g. | ||
| /// `PASQAL_LOCAL_QRMI_PASQAL_RETRIES_DISABLED`), falling back to the unprefixed | ||
| /// name as a global override (e.g. for e2e tests). | ||
| const RETRIES_DISABLED_ENV: &str = "QRMI_PASQAL_RETRIES_DISABLED"; |
There was a problem hiding this comment.
An opinion on the naming @MatthieuMoreau0 @awennersteen ?
There was a problem hiding this comment.
An alternative suggestion: instead of activating/disabling retries with a boolean env variable, have you considered using this to define the maximum number of retries? It can be set to 0 to disable retries but can also be tweaked for finer controls over the retries
There was a problem hiding this comment.
I like Matthieus suggestion.
There was a problem hiding this comment.
I had not considered the amount of retries, only the time budget, given the initial use-case - retry in case of transient errors to the Cloud.
IMHO a time budget (as a single value) is easier to reason with than an initial delay + exponential backoff + number of retries, so we could make the time-budget configurable (instead of simple on/off switch) - that would be my preference.
We can otherwise configure the number of retries, but that alone is only half of the story, we probably would need to make the initial delay configurable - but that feels like over-engineering to me, most users will not tweak these much.
Happy to discuss this further offline
There was a problem hiding this comment.
We now have a unified Middleware, which uses retries. If the number of retries is set to 0, then there is no retries (also in case of 429)
Co-authored-by: badtst <122630723+badtst@users.noreply.github.com>
|
Edit: schedmd's website is back up, re-running the failed test fixed it. |
Description of Change
pasqal_commonpackage containing common retry logicpasqal-localandpasqal-cloudQRMI_PASQAL_RETRIES_DISABLED=1Retry-After, defaults to jitter / exponential backoff, max 5 minutesChecklist ✅