From 9cbd3c843b0e28e3d9f6d81a3647691c7672a02d Mon Sep 17 00:00:00 2001 From: Albert Salim <asalim@gitlab.com> Date: Tue, 6 Dec 2022 16:47:57 +0800 Subject: [PATCH] Check Sidekiq queues in lefthook pre-push --- lefthook.yml | 5 +++++ lib/tasks/gitlab/sidekiq.rake | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index 44a4bd4eb67ef..05703b7a8d9ff 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -45,6 +45,11 @@ pre-push: files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD glob: '*.{rb,rake}' run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files} + sidekiq-queues: + tags: backend + files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD + glob: '{,ee/}app/workers/*.rb' + run: bundle exec rake gitlab:sidekiq:queues:check graphql_docs: tags: documentation files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD diff --git a/lib/tasks/gitlab/sidekiq.rake b/lib/tasks/gitlab/sidekiq.rake index dc47230530491..1b9ff33415fb3 100644 --- a/lib/tasks/gitlab/sidekiq.rake +++ b/lib/tasks/gitlab/sidekiq.rake @@ -130,5 +130,10 @@ namespace :gitlab do end end end + + namespace :queues do + desc 'GitLab | Sidekiq | Validate all_queues.yml and sidekiq_queues.yml match worker definitions' + task check: ['gitlab:sidekiq:all_queues_yml:check', 'gitlab:sidekiq:sidekiq_queues_yml:check', :environment] + end end end -- GitLab