Skip to content

Fix stale localStorage data causing frontend issues when re-importing

What does this MR do and why?

In !136489 (merged), we introduced a new field hasFailures to the GraphQL query. If an import was started before that and we used stale data from localStorage for the query, we caused a frontend console error in Apollo which caused the import to fail to start.

By bumping the version key, we can clear all previous queries / data and use the new version (that includes hasFailures field) which does not cause errors.

Changelog: fixed

Screenshots or screen recordings

No changes to UI.

Screenshot_2023-12-04_at_21.55.16

How to set up and validate locally

Steps to reproduce the bug:

1. Go to the Direct transfer page:

  1. In the header bar, click on + icon (Create new...) > New group.
  2. Select Import group.
  3. Fill in the GDK URL as GitLab source instance URL and a Person Access Token. Then click Connect instance.
  4. You should be on the Import groups by direct transfer page.

2. Revert the previous commit that introduced the new feature

git revert -m 1 b30dab12759858d06051aff2c8d50ccc9690ec7f

3. Start a new import and let it complete (might take a couple of minutes).

4. Re-apply the commit (or just checkout master)

git checkout master

5. Select the same previous import to be re-imported with "Re-import with projects". You should be able to see the "Importing the group failed" error.

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 #433341 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports