Resolve "User::DestroyService should cleanup projects where user is mirror_user"
Taken from the Issue description
81 have validation error
["Mirror user can't be blank"]and import error
The mirror user is not allowed to push code to all branches on this project.
All 81 have a mirror user that no longer exists
These should have their
mirror_userunset, and we should investigate how projects can get in this state.
What do we actually want to do with a mirror project when its
mirror_usergets deleted? Right now we're tripping over this validation, which we'd also get if we were to nullify
dependent: :nullifyor something. Maybe we should nullify it and set
false? From the
Users::DestroyService, that could be
Project.where(mirror_user: user).update_all(mirror: false, mirror_user_id: nil). If possible, we should also set an import error to tell them why the mirror feature got disabled.
Plain text email
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- Backport relevant changes to CE
- API support added
- Tests added for this feature/bug
- Has been reviewed by UX
- Has been reviewed by Frontend
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
- Internationalization required/considered
- If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan
End-to-end tests pass (
package-qamanual pipeline job)
What are the relevant issue numbers?
Closes #3892 (closed)