Commit graph

15 commits

Author SHA1 Message Date
Thong Kuah
d6b952ad3e
Add frozen_string_literal to spec/workers
Adds `# frozen_string_literal: true` to spec/workers ruby files
2019-04-01 13:35:22 -03:00
Sean McGivern
5b0210a0c8 Fix ProcessCommitWorker when upstream project is deleted 2018-07-10 17:11:31 +01:00
Sean McGivern
641b058b9e Fix MR merge commit cross-references to the MR itself 2018-03-05 14:15:58 +00:00
Micaël Bergeron
af5cd10e00 applying feedback
#	modified:   lib/gitlab/git/commit.rb
2018-02-16 13:51:19 -05:00
Micaël Bergeron
f949255461 fix specs 2018-02-16 13:51:19 -05:00
Micaël Bergeron
eef63813ea stop ProcessCommitWorker from processing MR merge commit
When a merge request is merged, it creates a commit with the
description of the MR, which may contain references and issue
closing references. As this will be handled in the PostMergeService
anyways, let's ignore merge commit generated from a MR.
2018-02-16 13:51:19 -05:00
Robert Speicher
9513bd18c4 Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Felipe Artur
0054963544 Remove unecessary commit pattern check 2017-05-25 12:13:32 -03:00
Felipe Artur
e44016b90a Prevent commits from upstream repositories to be re-processed by forks 2017-05-22 17:43:27 -03:00
James Edwards-Jones
020295fffc Use regex to skip unnecessary reference processing in ProcessCommitWorker 2017-05-04 20:03:46 +01:00
mhasbini
e52b1df1d5 Remove useless queries with false conditions (e.g 1=0) 2017-04-04 13:54:58 +03:00
Robert Speicher
68e6718932 Use :empty_project where possible in worker specs 2017-03-27 18:45:37 -04:00
Yorick Peterse
6b4d33566f
Pass commit data to ProcessCommitWorker
By passing commit data to this worker we remove the need for querying
the Git repository for every job. This in turn reduces the time spent
processing each job.

The migration included migrates jobs from the old format to the new
format. For this to work properly it requires downtime as otherwise
workers may start producing errors until they're using a newer version
of the worker code.
2016-12-01 13:36:06 +01:00
Yorick Peterse
509910b89f
Process commits in a separate worker
This moves the code used for processing commits from GitPushService to
its own Sidekiq worker: ProcessCommitWorker.

Using a Sidekiq worker allows us to process multiple commits in
parallel. This in turn will lead to issues being closed faster and cross
references being created faster. Furthermore by isolating this code into
a separate class it's easier to test and maintain the code.

The new worker also ensures it can efficiently check which issues can be
closed, without having to run numerous SQL queries for every issue.
2016-11-07 13:11:44 +01:00