Commit Graph

17 Commits

Author SHA1 Message Date
GitLab Bot 3c55affa66 Add latest changes from gitlab-org/gitlab@master 2023-10-19 15:07:55 +00:00
GitLab Bot 2571f43401 Add latest changes from gitlab-org/gitlab@master 2022-08-16 21:12:07 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 76923eae4b Add latest changes from gitlab-org/gitlab@master 2019-10-22 09:06:14 +00:00
GitLab Bot 6b75320f52 Add latest changes from gitlab-org/gitlab@master 2019-10-17 12:07:33 +00:00
Stan Hu 4e2bb4e5e7 Reduce Gitaly calls in PostReceive
This commit reduces I/O load and memory utilization during PostReceive
for the common case when no project hooks or services are set up.

We saw a Gitaly N+1 issue in `CommitDelta` when many tags or branches
are pushed. We can reduce this overhead in the common case because we
observe that most new projects do not have any Web hooks or services,
especially when they are first created. Previously, `BaseHooksService`
unconditionally iterated through the last 20 commits of each ref to
build the `push_data` structure. The `push_data` structured was used in
numerous places:

1. Building the push payload in `EventCreateService`
2. Creating a CI pipeline
3. Executing project Web or system hooks
4. Executing project services
5. As the return value of `BaseHooksService#execute`
6. `BranchHooksService#invalidated_file_types`

We only need to generate the full `push_data` for items 3, 4, and 6.

Item 1: `EventCreateService` only needs the last commit and doesn't
actually need the commit deltas.

Item 2: In addition, `Ci::CreatePipelineService` only needed a subset of
the parameters.

Item 5: The return value of `BaseHooksService#execute` also wasn't being
used anywhere.

Item 6: This is only used when pushing to the default branch, so if
many tags are pushed we can save significant I/O here.

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

Fic
2019-08-12 22:28:49 -07:00
Thong Kuah f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
Jonathon Reinhart f48605c796 Use all keyword args for DataBuilder::Push.build() 2019-04-25 13:54:26 +02:00
Luke Duncalfe f27cba0fee
Fix private user email being visible in tag webhooks
Fixes #54721
2019-01-31 16:51:18 +01:00
Luke Duncalfe 6c0758f69b
Prefer build() rather than create() 2019-01-31 16:51:17 +01:00
Micael Bergeron a31e0aff22 Resolve "Error 500 in non-UTF8 branch names" 2017-09-12 14:07:31 +00:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
David Turner 47b8516c15 Add username field to push webhook
Signed-off-by: David Turner <novalis@novalis.org>
2017-05-10 17:11:36 -04:00
Robert Speicher 80a6d2fda2 Use `:empty_project` where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
tiagonbotelho c90483406e refactors tests because of gitlab-test repository changes 2016-10-11 16:33:06 +01:00
Lin Jen-Shin d5264e8804 Simplify the name for data builder, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
2016-08-12 16:09:29 +08:00