Skip to content

fix: MR compare with empty file and opening from commit ID

Paul Slaughter requested to merge ps-fix-mr-with-new-files into main
  • This is because we changed the kind of error we throw
  • The 404AsEmpty decorator looks for content in this error to determine if its a 404 or not

Screenshots

When opening an MR with new file:

Before After
Screenshot_2024-02-07_at_2.21.13_PM Screenshot_2024-02-07_at_4.27.01_PM

When opening Web IDE from commit ID

Before After
Screenshot_2024-02-07_at_2.59.53_PM Screenshot_2024-02-07_at_3.45.21_PM

How to test?

When opening an MR with new file:

  1. In the package.json of local gdk, point the @gitlab/web-ide package to the artifact of create-development-package of this MR pipeline (see patch below).
  2. Run yarn install
  3. Open an MR that introduces new files
  4. Open the Web IDE from the MR under Code dropdown
  5. There should be no errors

When opening Web IDE from commit ID:

  1. In the package.json of local gdk, point the @gitlab/web-ide package to the artifact of create-development-package of this MR pipeline (see patch below).
  2. Run yarn install
  3. Open a project repository tree at a specific commit (not a branch)
  4. Open the Web IDE under Edit dropdown
  5. There should be no errors

Patch for running this MR's Web IDE in local GDK

Based on recent pipeline https://gitlab.com/gitlab-org/gitlab-web-ide/-/jobs/6121405284

diff --git a/package.json b/package.json
index c903c25d9fb1..63d0bf0b67ae 100644
--- a/package.json
+++ b/package.json
@@ -63,7 +63,7 @@
     "@gitlab/svgs": "3.80.0",
     "@gitlab/ui": "^73.1.1",
     "@gitlab/visual-review-tools": "1.7.3",
-    "@gitlab/web-ide": "^0.0.1-dev-20240201215504",
+    "@gitlab/web-ide": "https://gitlab.com/gitlab-org/gitlab-web-ide/-/jobs/6121405284/artifacts/raw/tmp/packages/gitlab-web-ide-0.0.1-dev-20240207221315.tgz",
     "@mattiasbuelens/web-streams-adapter": "^0.1.0",
     "@rails/actioncable": "7.0.8",
     "@rails/ujs": "7.0.8",
Edited by Paul Slaughter

Merge request reports