From 404eb5a0a42a8d808c7815adc67d546bea1fc61c Mon Sep 17 00:00:00 2001 From: Thomas Randolph <trandolph@gitlab.com> Date: Tue, 16 Apr 2024 18:26:49 -0600 Subject: [PATCH] Move the backend streamed files chart into the blueprint --- .../blueprints/rapid_diffs/index.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/doc/architecture/blueprints/rapid_diffs/index.md b/doc/architecture/blueprints/rapid_diffs/index.md index cdec444f79417..ee3758d8b1a5e 100644 --- a/doc/architecture/blueprints/rapid_diffs/index.md +++ b/doc/architecture/blueprints/rapid_diffs/index.md @@ -336,6 +336,51 @@ sequenceDiagram end ``` +- Future files rendered and streamed to the front end + +```mermaid +sequenceDiagram + participant Client + participant Back end + participant Authorization + participant HAML + participant Cache + participant Database + participant Diff storage + participant Gitaly + + Client ->> Back end: Stream request + Back end ->> Authorization: Check is good request + alt All the possible unhappy paths + Authorization ->> Back end: No! + Back end ->> Client: 403 + else + Authorization ->> Back end: Authorized. + alt MR Diff + Back end ->> Database: Get files + Database ->> Back end: Files + Back end ->> Diff storage: Get diffs + Diff storage ->> Back end: Diffs + else + Back end ->> Gitaly: Get diffs + Gitaly ->> Back end: Diffs + end + loop Iterate through each diff file + Back end ->> HAML: Render diff file + HAML ->> Cache: Give me the cached rendered UI per file + alt Cache miss + Cache ->> HAML: Nada! + HAML ->> Cache: Cache rendered UI per file + Cache ->> HAML: Cached, rendered UI per file + else + Cache ->> HAML: Cached, rendered UI per file + end + HAML ->> Back end: Rendered UI + end + Back end ->> Client: Stream rendered UI per file + end +``` + ### Accessibility Reusable Rapid Diffs should be displayed in a way that is compliant with [Web Content Accessibility Guidelines 2.1](https://www.w3.org/TR/WCAG21/) level AA for web-based content and [Authoring Tool Accessibility Guidelines 2.0](https://www.w3.org/TR/ATAG20/) level AA for user interface. -- GitLab