Commit fcb5852
authored
### Motivation
The python-gitlab fix (python-gitlab/python-gitlab#2326) for 409 Resource lock retries checks `result.reason`, but GitLab sends `Conflict` (standard HTTP reason phrase) while `Resource lock` is in the response body. The check never matches, so retries never happen:
```
$ dda inv -- pipeline.auto-cancel-previous-pipelines
[...]
gitlab.exceptions.GitlabHttpError: 409: 409 Conflict: Resource lock
^ reason ^ response body
```
Example: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1262109099
### What does this PR do?
This patch adds HTTP `409` to GitLab's API retriable transient error codes as a lightweight workaround, allowing all 409 errors to be retried when `retry_transient_errors=True` (our case).
### Additional Notes
Will file an issue upstream.
Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
1 parent 3be6fcc commit fcb5852
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments