Skip to content

Guard against deleted project feature entry

Stan Hu requested to merge sh-guard-against-orphaned-project-feature into master

In https://gitlab.com/gitlab-org/gitlab-ce/issues/66482, we see that a project's project_feature association may be lazily loaded and hence return nil if the entry is deleted if the Project is already loaded in memory. To ensure we don't fail hard when this happens, assume all features are disabled.

We can fix this issue by eager loading the project_feature in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32169, but we shouldn't have to depend on that.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66482

Edited by Stan Hu

Merge request reports

Loading