Skip to content

Fix missing discussion_id in GitHub imports

What does this MR do and why?

The discussion_id method can return nil if a previously cached value does not exist. This normally does not happen because we process notes from GitHub in ID order, so the note we're replying to should already be processed.

But we've seen production data where the discussion_id is nil. This may be a GitHub API problem where notes are missing or returned out of order, or a problem with our cache storage.

This falls back to generating a new discussion_id when this edge case happens.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346495 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading