[go: up one dir, main page]

Skip to content

Display error message if the MR Metadata fails to load on the Overview tab

Issue

If you have a customized placeholder message (wherein you embed some variables), and the diffs_metadata.json fails to load, you'll be left with a commit message that isn't fully hydrated, but also you'll have no warning that happened.

Proposal

  1. 1 failure -> retry (no alert shown)
  2. 2 failures -> show alert (and show alert)
    • success: hide alert
  3. 3 failures -> stop retrying (keep alert up)

Alert text:

Unable to fully load the default commit message. You can still apply this suggestion and the commit message will be correct.

Original issue (follow up from MR) The following discussion from !56594 (merged) should be addressed:

@thomasrandolph thank you for the ping. I'm unassigning @sunjungp as she will only “officially” start working in Code Review in the 13.11 milestone.

If I understand it correctly, this is fetching the necessary data to translate the suggestion commit message placeholder when the user is in the Overview tab. For this to be used, I think these are the requirements: there must be a valid suggestion and the user must open the Apply suggestion dropdown to see the commit message placeholder. Because of these requirements, could we:

  1. Fail silently on the first failure.
  2. Try fetching again after a certain delay. Fail silently if this attempt also fails.
  3. When the user opens the Apply suggestions dropdown, try fetching again. If it fails, just display the default commit message with the variables and show a message similar to Unable to correctly show the default commit message. You can still apply the suggestion.

In summary, if we can, let's try our hardest not to show any error messages, unless we really have to 😄

@aqualls FYI


There are three parts here:

  • Error state / failure counter on the network request
  • Delayed / "backoff" request retry
  • Component-level error display
Edited by Annabel Dunstone Gray