Fix stale localStorage data causing frontend issues when re-importing
requested to merge 433341-direct-transfer-import-via-ui-fails-with-importing-the-group-failed-error into master
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.
How to set up and validate locally
Steps to reproduce the bug:
1. Go to the Direct transfer page:
- In the header bar, click on + icon (Create new...) > New group.
- Select Import group.
- Fill in the GDK URL as GitLab source instance URL and a Person Access Token. Then click Connect instance.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #433341 (closed)
Edited by Justin Ho Tuan Duong