Skip to content

Only enqueue Jira workers when integration is configured

Heinrich Lee Yu requested to merge skip-enqueue-jira-connect-sync-workers into master

What does this MR do and why?

Looking at data in Kibana, only 4% of these jobs actually do something:

Screen_Shot_2021-12-07_at_12.42.33_AM

https://log.gprd.gitlab.net/goto/582597e40bbe03915ef42b90b54ebefe

These jobs have data_consistency: delayed, so there's some extra overhead when enqueuing these. We have to execute a DB query to get the current WAL location, and then these are turned into scheduled jobs 1 second in the future so there's extra work in Sidekiq and Redis.

This check is similar to the one we do in https://gitlab.com/gitlab-org/gitlab/blob/868d37615865f11771fd384c6c9d121af2fcb670/app/services/merge_requests/base_service.rb#L95 and https://gitlab.com/gitlab-org/gitlab/blob/81be7217f8670f5faa930bbd867951408040e123/app/services/git/branch_hooks_service.rb#L149

Related to gitlab-com/gl-infra/scalability#1380 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Heinrich Lee Yu

Merge request reports

Loading