Repository navigation
pipeline: Keep recheck requests while waiting for their comments. - #4
Open
rosemarie-o wants to merge 1 commit into
Open
rosemarie-o wants to merge 1 commit into
rosemarie-o wants to merge 1 commit into
Conversation
A recheck request is a reply to a patch email. The scan of the dev archive matches the reply to a tracked patch and marks it to have its comments fetched; comment events mark the same. The fetch then reads the reply back from Patchwork, which turns list emails into comments, and parses the request out of it. The mark was not saved. It was set straight on the patch, without marking its history shard changed, and only changed shards are written; the usual target of a recheck is a finished series, which lives in history. A request not served within the same run of the bot, for example while Patchwork was unavailable, was lost: the next run saw no mark, and the reply is only new in a single scan. A fetch that returned no comments consumed the mark as well. Patchwork can answer again before it ingests the reply, so the request was dropped with nothing delivered, and nothing would look at the comments of that patch again. Mark the patch changed when asking for its comments, and note when that was, so that the request survives the run. Keep it until a fetch returns a comment newer than the ones already seen, or for six hours, and record giving up as a decision of the patch. Bump the state schema for the note. Count only the time Patchwork was available against the six hours, since it ingests nothing while down. Patchwork often fails for a few minutes many times in a row: the bot has seen 34 such periods add up to over seven hours in a single day, which would use up the wait however it was started. The availability record already keeps these periods, so nothing more is stored. Do not mark the patch changed while it only waits: its history shard holds a whole month, which would then be marshalled and compared with the file on every run. Mark it only when the request is served, when the start of the wait is first noted, or when the wait gives up. Fixes fuzzfactor#3 Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
Collaborator
|
From my agent to your's (based on my own investigation and comments): Thanks for tracking this down. The cause is right: a finished series lives in a history file, which is only written when a change is marked, so the comment scan was lost with the run. The fix and its tests cover what happened in #3. Before merging, please rework it as follows. Structure
Behaviour
Style
For later, not for this PR
|
Author
|
Ok thank you, these seem to be good findings. I started splitting the commit into 2 yesterday, and that's a good point about having one helper to set the flag. I can post a new version of this sometime soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A recheck request is a reply to a patch email. The scan of the dev archive matches the reply to a tracked patch and marks it to have its comments fetched; comment events mark the same. The fetch then reads the reply back from Patchwork, which turns list emails into comments, and parses the request out of it.
The mark was not saved. It was set straight on the patch, without marking its history shard changed, and only changed shards are written; the usual target of a recheck is a finished series, which lives in history. A request not served within the same run of the bot, for example while Patchwork was unavailable, was lost: the next run saw no mark, and the reply is only new in a single scan.
A fetch that returned no comments consumed the mark as well. Patchwork can answer again before it ingests the reply, so the request was dropped with nothing delivered, and nothing would look at the comments of that patch again.
Mark the patch changed when asking for its comments, and note when that was, so that the request survives the run. Keep it until a fetch returns a comment newer than the ones already seen, or for six hours, and record giving up as a decision of the patch. Bump the state schema for the note.
Count only the time Patchwork was available against the six hours, since it ingests nothing while down. Patchwork often fails for a few minutes many times in a row: the bot has seen 34 such periods add up to over seven hours in a single day, which would use up the wait however it was started. The availability record already keeps these periods, so nothing more is stored.
Do not mark the patch changed while it only waits: its history shard holds a whole month, which would then be marshalled and compared with the file on every run. Mark it only when the request is served, when the start of the wait is first noted, or when the wait gives up.
Fixes #3