Possible data loss related to using import/export feature
A few releases ago we were investigating problem with CI/CD stages migration
When someone adds a database column / creates a new relation, is is necessary to add a new relation / column description to the lib/gitlab/import_export/import_export.yml. This is a file we use to rebuild relations, but it only describes a small subset of relations.
It appears that whenever we have a relation
column_a.id <- column_b.*_id that is not in the
import_export.yml we don't correctly assign ids. It also appears that adding multiple relations to one resource in
import_export.yml is not supported, so we had to fix the bug mentioned earlier in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16221 in a way that I'm not particularly proud of.
I noticed a discussion on Slack that might be related https://gitlab.slack.com/archives/C101F3796/p1520022330000262 (GitLab internal discussion).