Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
commit419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch)
tree1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /tooling/danger/sidekiq_args.rb
parent1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff)
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'tooling/danger/sidekiq_args.rb')
-rw-r--r--tooling/danger/sidekiq_args.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/tooling/danger/sidekiq_args.rb b/tooling/danger/sidekiq_args.rb
index d06bb92ca6d..6d813d6b897 100644
--- a/tooling/danger/sidekiq_args.rb
+++ b/tooling/danger/sidekiq_args.rb
@@ -12,8 +12,14 @@ module Tooling
BEFORE_DEF_PERFORM_REGEX = /^[\s-]*def perform\b/
AFTER_DEF_PERFORM_REGEX = /^[\s+]*def perform\b/
+ MR_WARNING_COMMENT = <<~WARNING_COMMENT
+ Please follow the [Sidekiq development guidelines](https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#changing-the-arguments-for-a-worker) when changing Sidekiq worker arguments.
+ WARNING_COMMENT
+
SUGGEST_MR_COMMENT = <<~SUGGEST_COMMENT
- Please follow the [sidekiq development guidelines](https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#changing-the-arguments-for-a-worker) when changing sidekiq worker arguments.
+ Please follow the [Sidekiq development guidelines](https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#changing-the-arguments-for-a-worker) when changing Sidekiq worker arguments.
+
+ In particular, check whether you are updating callers of this method in this MR, and ensure that your change will be backwards compatible across updates.
SUGGEST_COMMENT
def changed_worker_files(ee: :include)
@@ -53,6 +59,7 @@ module Tooling
perform_method_line = file_lines.index { |line| line.include?(DEF_PERFORM) }
markdown(format(SUGGEST_MR_COMMENT), file: filename, line: perform_method_line.succ)
+ warn(MR_WARNING_COMMENT)
end
end
end