Skip to content

Patchwork: retry POST/PATCH (longer) with Retry + more log - #88

Merged
kuba-moo merged 5 commits into
linux-netdev:mainfrom
matttbe:pw-post-retry-5
Jul 27, 2026
Merged

Patchwork: retry POST/PATCH (longer) with Retry + more log#88
kuba-moo merged 5 commits into
linux-netdev:mainfrom
matttbe:pw-post-retry-5

Conversation

@matttbe

@matttbe matttbe commented Jul 27, 2026

Copy link
Copy Markdown
Member

Recently, the nipa-upload-wireless service failed because it wasn't able to POST a PW check, even after 3 retries. All attempts failed with a 504 error. With the previous code, it was retrying only during 3.5 minutes, compared to ~17 minutes with the lib. Switching to the lib: it should be better, also for maintenance purposes. That also leaves more time for PW server maintenance operations.

While at it, improve the log: typo, non-JSON data, response time, and timestamps.

That's not urgent.

matttbe added 5 commits July 27, 2026 12:31
By default, these methods are not retried, because they are not
considered to be idempotent: multiple requests with the same parameters
end with the same state.

Here in this patchwork module, it looks like it is fine to retry
multiple times in case of errors. It sounds better doing that with the
lib than manual code here, with different timeout.

Note that the default manual retry timeout was too low: recently, the
nipa-upload-wireless service failed because it wasn't able to post a
check, even with 3 retries. All attempts failed with a 504 error. With
the previous code, it was retrying only during 3.5 minutes, compared to
~17 minutes with the lib. That leaves more time for server maintenance
operations.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
s/post/patch/, to be able to distinct between post and patch.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
This can probably happen in case of errors, e.g. a 504 timeout error.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Now that retries are handled by the lib, it looks interesting to find
out how long the different requests took, similar to what is done with
the GET methods.

Use a different message for each method, to be able to monitor them
individually if needed.

Note that on the brancher service, the longest GET response time was at
86 seconds. So logging such info looks important to understand other
errors.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
In case of issues, it looks interesting to have the timestamps in the
logs, to find out a root cause, e.g. a server maintenance, or too many
parallel requests.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
@matttbe
matttbe requested a review from kuba-moo July 27, 2026 10:36
@kuba-moo
kuba-moo merged commit 86ff37f into linux-netdev:main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants