Add retry responses for pyforgejo 2.0.7 in forgejo test cassette#986
Conversation
pyforgejo changed its default retry behavior between versions 2.0.4 and 2.0.7: - pyforgejo 2.0.4: max_retries defaults to 0 (no retries, 1 HTTP call) - pyforgejo 2.0.7: max_retries defaults to 2 (2 retries, 3 HTTP calls total) The test_issue_no_such_assignee test expects a 500 Internal Server Error response when attempting to add a non-existent user as an assignee. This is the actual behavior of the Forgejo API, and the test verifies that ogr properly converts this to a GitForgeInternalError. Compatibility with both versions: - pyforgejo 2.0.4 (F43): Uses first response, leaves 2 unused (safe) - pyforgejo 2.0.7 (Rawhide): Consumes all 3 responses during retries Fixes test failure in Fedora Rawhide with python3-pyforgejo-2.0.7.
There was a problem hiding this comment.
Code Review
This pull request updates the integration test data for Forgejo by adding two new recorded HTTP interactions to the Issues.test_issue_no_such_assignee.yaml cassette. These entries record 500 status code responses from the Forgejo API swagger endpoint. I have no feedback to provide.
|
Build succeeded. ✔️ pre-commit SUCCESS in 3m 21s |
|
It returns |
mfocko
left a comment
There was a problem hiding this comment.
In general I don't have any issue with merging this, but I'm also going to have a look at the Forgejo itself. Based on the API docs, I would suspect this should yield 412 — APIError is error format response.
yes, you can see it in the registered file ( I mean in those lines I haven't touched) |
Ok thanks! I will merge this one as it is so that the rawhide tests start working again. |
pyforgejo changed its default retry behavior between versions 2.0.4 and 2.0.7:
The test_issue_no_such_assignee test expects a 500 Internal Server Error response when attempting to add a non-existent user as an assignee. This is the actual behavior of the Forgejo API, and the test verifies that ogr properly converts this to a GitForgeInternalError.
Compatibility with both versions:
Fixes test failure in Fedora Rawhide with python3-pyforgejo-2.0.7.