Skip to content
Snippets Groups Projects

Graceful degradation for refs endpoint

Merged Vasilii Iakliushin requested to merge graceful_degradation_for_refs into master
All threads resolved!

What does this MR do and why?

Contributes to #351520 (closed)

Problem

We have an unhandled exception when Gitaly is not available.

Solution

Return 503 error with an error message.

Screenshots or screen recordings

Before After
Screenshot_2022-03-17_at_11.47.58 Screenshot_2022-03-17_at_11.48.43
Screenshot_2022-03-17_at_11.47.08 Screenshot_2022-03-17_at_11.39.32

Screenshot_2022-03-17_at_11.48.57

There is no UI difference, because we equally handle 500 and 503 errors. However, now API responds with a structured error message and a proper http error code.

How to set up and validate locally

  1. Visit http://127.0.0.1:3000/flightjs/Flight/refs
  2. Disable Gitaly (gdk stop gitaly)
  3. Visit http://127.0.0.1:3000/flightjs/Flight/refs
  4. Check that the response code is 503 and the response contains an error message.

MR acceptance checklist

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

Edited by Vasilii Iakliushin

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Marc Shaw removed review request for @marc_shaw

    removed review request for @marc_shaw

  • Vasilii Iakliushin added 989 commits

    added 989 commits

    Compare with previous version

  • requested review from @marc_shaw

  • Marc Shaw approved this merge request

    approved this merge request

  • Marc Shaw resolved all threads

    resolved all threads

  • Marc Shaw enabled an automatic merge when the pipeline for c0c42898 succeeds

    enabled an automatic merge when the pipeline for c0c42898 succeeds

  • merged

  • Marc Shaw mentioned in commit 05ceec73

    mentioned in commit 05ceec73

  • added workflowstaging label and removed workflowcanary label

  • Ulises Fierro mentioned in commit 3fabeae1

    mentioned in commit 3fabeae1

  • Ulises Fierro mentioned in commit c9754947

    mentioned in commit c9754947

  • Ulises Fierro mentioned in commit 87c6163a

    mentioned in commit 87c6163a

  • Please register or sign in to reply
    Loading