Skip to content

Fix excessive page updates in gitlab migration

What does this MR do and why?

Related to #350984 (closed)

This MR fixes excessive page updates in gitlab migration page.

The main reason of redraws was computed, where we attempted to setup "default target" for each group. However, due to the way how Vue reactivity works, that meant that computed value considered that it was depending on entire this.importTargets object - so when any import target was changed (by typing) - all elements on page were rerendered

We are changing this logic to prepopulate default targets when groups data changes. In this way reactivity system correctly sets dependency tracking group with id X <--> this.importTargets[x] instead of depending on whole this.importTargets which fixes redraw problem

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Before (multiple redraws tracked by Vue devtools)

before

After (no redraws tracked)

after

How to set up and validate locally

  • Open "New group" -> Import (/groups/new)
  • Use https://gitlab.com as source instance and GeK1Nis4j-SY1X4sqE5c as personal access token (this token is from separate user on GitLab instance with 0 real data available, so we do not expose any security risks here)
  • Open Vue devtools and enable Highlight updates (three dots in top right corner)
  • Start typing something in inputs
  • Observe no page redraws

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 Illya Klymov

Merge request reports

Loading