Prep work to support git/git-lfs redirect to primary
What does this MR do?
- Allows additional routes to pass through the
Gitlab::Middleware::ReadOnly::Controller
(so they can be validated within the respective controller). - Move
upload_request? && Gitlab::Database.read_only?
logic into its own method, so it can be overridden in EE.
Are there points in the code the reviewer needs to double check?
-
Gitlab::Middleware::ReadOnly::Controller
needed to be modified to let a few more routes there to facilitate git/git-lfs redirect to primary feature. However, it's important to note that just because the controller lets the request through, it does not necessarily mean it will be processed, that decision is up to the respective controller.
Why was this MR needed?
To deliver https://gitlab.com/gitlab-org/gitlab-ee/issues/6195
Screenshots (if relevant)
Current
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary [ ] Documentation created/updated[ ] API support added-
Tests added for this feature/bug - Conform by the code review guidelines
[ ] Has been reviewed by a UX Designer[ ] Has been reviewed by a Frontend maintainer-
Has been reviewed by a Backend maintainer [ ] Has been reviewed by a Database specialist
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them [ ] Internationalization required/considered-
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
EE portion - https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6109
Edited by 🤖 GitLab Bot 🤖