Eliminate unnecessary and duplicate system hook fires

Previously `SystemHookPushWorker` would always be called after a push event,
and this would queue a Sidekiq job regardless of whether any system hooks
needed that event. Moreover, another call inside `Project#execute_hooks` would
also fire system hooks if they existed.

This change both removes the duplicate system hook calls. For installations
without system hooks for push events, this change also can save significant
amount of RAM used by Redis.

Closes #50549
94 jobs for sh-conditional-system-hook-push in 45 minutes and 49 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
manual #91047943
allowed to fail manual
package-and-qa
manual #91047944
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #91047946
gitlab-org
compile-assets

00:08:08

passed #91047945
gitlab-org
retrieve-tests-metadata

00:00:27

passed #91047947
gitlab-org
setup-test-env

00:06:25

 
  Test
passed #91048028
allowed to fail
code_quality

00:09:06

passed #91047948
allowed to fail
danger-review

00:00:47

passed #91048019
gitlab-org
db:check-schema-pg

00:02:34

passed #91048018
gitlab-org
db:migrate:reset-mysql

00:06:23

passed #91048017
gitlab-org
db:migrate:reset-pg

00:02:52

passed #91048023
gitlab-org
db:rollback-mysql

00:05:36

passed #91048022
gitlab-org
db:rollback-pg

00:04:14

passed #91048030
allowed to fail
dependency_scanning

00:05:05

passed #91048013
gitlab-org
docs lint

00:00:41

passed #91048014
gitlab-org
downtime_check

00:02:58

passed #91048016
gitlab-org
ee_compat_check

00:04:04

passed #91048026
gitlab-org
gitlab:assets:compile

00:13:35

passed #91048025
gitlab-org
gitlab:setup-mysql

00:06:22

passed #91048024
gitlab-org
gitlab:setup-pg

00:05:57

passed #91048033
gitlab-org
gitlab_git_test

00:00:55

passed #91048027
gitlab-org
karma

00:09:25

57.05%
passed #91048021
gitlab-org
migration:path-mysql

00:13:19

passed #91048020
gitlab-org
migration:path-pg

00:10:58

passed #91048034
gitlab-org
no_ee_check

00:00:41

passed #91048031
gitlab-org
qa:internal

00:03:05

passed #91048032
gitlab-org
qa:selectors

00:02:32

passed #91048015
gitlab-org
rails5_gemfile_lock_check

00:03:38

passed #91047982
gitlab-org
rspec-mysql 0 30

00:18:08

passed #91047983
gitlab-org
rspec-mysql 1 30

00:13:28

passed #91047992
gitlab-org
rspec-mysql 10 30

00:18:27

passed #91047993
gitlab-org
rspec-mysql 11 30

00:19:55

passed #91047994
gitlab-org
rspec-mysql 12 30

00:18:02

passed #91047995
gitlab-org
rspec-mysql 13 30

00:19:12

passed #91047996
gitlab-org
rspec-mysql 14 30

00:20:28

passed #91047997
gitlab-org
rspec-mysql 15 30

00:18:19

passed #91047998
gitlab-org
rspec-mysql 16 30

00:22:47

passed #91047999
gitlab-org
rspec-mysql 17 30

00:20:04

passed #91048000
gitlab-org
rspec-mysql 18 30

00:17:17

passed #91048001
gitlab-org
rspec-mysql 19 30

00:17:59

passed #91047984
gitlab-org
rspec-mysql 2 30

00:18:45

passed #91048002
gitlab-org
rspec-mysql 20 30

00:23:24

passed #91048003
gitlab-org
rspec-mysql 21 30

00:20:51

passed #91048004
gitlab-org
rspec-mysql 22 30

00:20:35

passed #91048005
gitlab-org
rspec-mysql 23 30

00:20:14

passed #91048006
gitlab-org
rspec-mysql 24 30

00:22:23

passed #91048007
gitlab-org
rspec-mysql 25 30

00:22:21

passed #91048008
gitlab-org
rspec-mysql 26 30

00:19:02

passed #91048009
gitlab-org
rspec-mysql 27 30

00:20:08

passed #91048010
gitlab-org
rspec-mysql 28 30

00:20:38

passed #91048011
gitlab-org
rspec-mysql 29 30

00:16:57

passed #91047985
gitlab-org
rspec-mysql 3 30

00:15:21

passed #91047986
gitlab-org
rspec-mysql 4 30

00:17:09

passed #91047987
gitlab-org
rspec-mysql 5 30

00:15:59

passed #91047988
gitlab-org
rspec-mysql 6 30

00:20:45

passed #91047989
gitlab-org
rspec-mysql 7 30

00:15:54

passed #91047990
gitlab-org
rspec-mysql 8 30

00:17:57

passed #91047991
gitlab-org
rspec-mysql 9 30

00:18:27

passed #91047949
gitlab-org
rspec-pg 0 30

00:15:10

passed #91047950
gitlab-org
rspec-pg 1 30

00:16:30

passed #91047959
gitlab-org
rspec-pg 10 30

00:18:04

passed #91047961
gitlab-org
rspec-pg 11 30

00:20:25

passed #91047963
gitlab-org
rspec-pg 12 30

00:15:59

passed #91047965
gitlab-org
rspec-pg 13 30

00:16:09

passed #91047966
gitlab-org
rspec-pg 14 30

00:17:54

passed #91047967
gitlab-org
rspec-pg 15 30

00:20:18

passed #91047968
gitlab-org
rspec-pg 16 30

00:14:45

passed #91047969
gitlab-org
rspec-pg 17 30

00:15:52

passed #91047970
gitlab-org
rspec-pg 18 30

00:19:25

passed #91047971
gitlab-org
rspec-pg 19 30

00:18:36

passed #91047951
gitlab-org
rspec-pg 2 30

00:17:56

passed #91047972
gitlab-org
rspec-pg 20 30

00:17:38

passed #91047973
gitlab-org
rspec-pg 21 30

00:17:01

passed #91047974
gitlab-org
rspec-pg 22 30

00:20:06

passed #91047975
gitlab-org
rspec-pg 23 30

00:18:22

passed #91047976
gitlab-org
rspec-pg 24 30

00:19:06

passed #91052986
gitlab-org
rspec-pg 25 30

00:18:23

passed #91047978
gitlab-org
rspec-pg 26 30

00:17:03

passed #91047979
gitlab-org
rspec-pg 27 30

00:17:22

passed #91047980
gitlab-org
rspec-pg 28 30

00:17:02

passed #91047981
gitlab-org
rspec-pg 29 30

00:16:36

passed #91047952
gitlab-org
rspec-pg 3 30

00:16:24

passed #91047953
gitlab-org
rspec-pg 4 30

00:14:33

passed #91047954
gitlab-org
rspec-pg 5 30

00:15:59

passed #91047955
gitlab-org
rspec-pg 6 30

00:18:41

passed #91047956
gitlab-org
rspec-pg 7 30

00:13:28

passed #91047957
gitlab-org
rspec-pg 8 30

00:15:32

passed #91047958
gitlab-org
rspec-pg 9 30

00:14:21

passed #91048029
allowed to fail
sast

00:04:24

passed #91048012
gitlab-org
static-analysis

00:07:12

failed #91047977
gitlab-org
rspec-pg 25 30

00:15:09

 
  Post Test
passed #91048036
gitlab-org
coverage

00:03:59

94.63%
passed #91048035
gitlab-org allowed to fail
flaky-examples-check

00:01:23

passed #91048037
gitlab-org
lint:javascript:report

00:02:50

 
  Post Cleanup
manual #91048038
gitlab-org allowed to fail manual
review-docs-cleanup