gitlab-org--gitlab-foss/app/services
Yorick Peterse daad7144ec
Support Markdown rendering using multiple projects
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
2018-04-11 14:10:19 +02:00
..
application_settings
applications
auth Verify that deploy token has valid access when pulling container registry image 2018-04-10 07:31:30 +00:00
badges Projects and groups badges API 2018-03-05 17:51:40 +00:00
boards Fix more specs 2018-04-05 14:58:49 -03:00
chat_names Expose ChatName objects to slash commands 2018-02-23 14:37:53 +01:00
ci Revert "Merge branch 'improve-jobs-queuing-time-metric' into 'master'" 2018-04-10 10:41:08 +00:00
clusters Replace KubeException with Kubeclient::HttpError (kubeclient 3.0) 2018-03-15 08:14:13 +01:00
commits
concerns Move ModuleWithInstanceVariables to Gitlab namespace 2017-11-22 17:06:57 +08:00
deploy_keys
deploy_tokens Handle limit for datetime attributes on MySQL 2018-04-06 22:28:44 -05:00
discussions
emails
events Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
files Use correct encoding with Lfs::FileTransfromer 2018-03-15 21:49:01 +00:00
gpg_keys
groups Merge branch 'fix/gh-namespace-issue' into 'security-10-4' 2018-02-09 12:16:28 -06:00
issuable Deleting a MR you are assigned to should decrements counter 2018-04-05 13:24:45 -05:00
issues Improve specs and docs 2018-04-05 15:14:04 -03:00
keys
labels Allow to find labels in ancestor groups and better group support in label service 2018-02-26 16:23:19 +00:00
lfs Use correct encoding with Lfs::FileTransfromer 2018-03-15 21:49:01 +00:00
mattermost
members Don't delete todos or unassign issues and MRs when a user leaves a project 2018-03-07 17:18:01 -06:00
merge_requests Send notification emails when push to a merge request 2018-03-26 13:24:52 +01:00
milestones Fix promoting milestone updating all issuables without milestone 2017-11-21 11:09:14 -02:00
notes Support Markdown rendering using multiple projects 2018-04-11 14:10:19 +02:00
projects Extend API for importing a project export with overwrite support 2018-04-06 15:23:49 +00:00
prometheus Implemente Prometheus:AdapterService 2018-03-05 19:34:59 +01:00
protected_branches ProtectedBranchPolicy used from Controller for destroy/update 2018-03-26 10:29:52 +01:00
protected_tags DestroyService for protected tags/branches used from controller 2018-03-26 10:29:52 +01:00
quick_actions Allow assigning and filtering issuables by ancestor group labels 2018-04-04 15:40:29 +00:00
search Skip projects filter on merge requests search 2017-12-21 15:43:14 +01:00
tags
test_hooks use class reader instead of dynamic constant 2018-01-17 09:55:00 +01:00
users Backport relevant changes from EE https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4827 to CE 2018-03-07 17:01:32 +00:00
wiki_pages
access_token_validation_service.rb
after_branch_delete_service.rb
akismet_service.rb use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
audit_event_service.rb
base_count_service.rb Code review comments applied 2017-12-01 18:32:12 +01:00
base_renderer.rb
base_service.rb use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
check_gcp_project_billing_service.rb Fix billing checking 2018-01-10 15:23:22 +01:00
cohorts_service.rb
compare_service.rb Avoid re-fetching merge-base SHA from Gitaly unnecessarily 2018-03-07 22:46:29 -03:00
create_branch_service.rb
create_deployment_service.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
create_release_service.rb
create_snippet_service.rb
delete_branch_service.rb
delete_merged_branches_service.rb Remove allow_n_plus_1 block from DeleteMergedBranchesService 2018-02-12 17:22:26 +01:00
event_create_service.rb Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
git_push_service.rb use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
git_tag_push_service.rb
gravatar_service.rb use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
ham_service.rb
import_export_clean_up_service.rb
issuable_base_service.rb Show issues of subgroups in group-level issue board 2018-04-05 14:58:49 -03:00
merge_request_metrics_service.rb Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
metrics_service.rb Update prometheus-client-mmap gem to highly optimized version 2017-12-07 17:47:23 +01:00
note_summary.rb
notification_recipient_service.rb Refactor `add_recipients` 2018-04-09 19:16:40 +11:00
notification_service.rb Send notification emails when push to a merge request 2018-03-26 13:24:52 +01:00
pages_service.rb
preview_markdown_service.rb
push_event_payload_service.rb
repair_ldap_blocked_user_service.rb
repository_archive_clean_up_service.rb
reset_project_cache_service.rb Rename Project#cache_index to jobs_cache_index 2018-01-04 22:17:03 +01:00
search_service.rb
spam_check_service.rb Move ModuleWithInstanceVariables to Gitlab namespace 2017-11-22 17:06:57 +08:00
spam_service.rb
submit_usage_ping_service.rb Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6' 2018-03-21 14:39:21 +00:00
system_hooks_service.rb Don't error out in system hook if user has `nil` datetime columns 2018-03-05 13:38:46 -08:00
system_note_service.rb Better group support notes-related code 2018-04-05 13:29:57 +02:00
todo_service.rb Add discussion API 2018-03-07 12:27:50 +01:00
update_release_service.rb
update_snippet_service.rb
upload_service.rb use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
user_agent_detail_service.rb
user_project_access_changed_service.rb
validate_new_branch_service.rb
verify_pages_domain_service.rb Allow pages domain verification to run on invalid domains 2018-03-26 15:07:01 +01:00
web_hook_service.rb Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6' 2018-03-21 14:39:21 +00:00