summaryrefslogtreecommitdiff
path: root/danger/gitaly/Dangerfile
blob: 59e55845c83d2068d7279df369143d5377415996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

TEMPLATE_MESSAGE = <<~MSG
This merge request requires coordination with gitaly deployments.
Before merging this merge request we should verify that gitaly
running in production already implements the new gRPC interface
included here.

Failing to do so will introduce a [non backward compatible
change](https://docs.gitlab.com/ee/development/multi_version_compatibility.html)
during canary depoyment that can cause an incident.

1. Identify the gitaly MR introducing the new interface
1. Verify that the environment widget contains a `gprd` deployment
MSG

changed_lines = helper.changed_lines('Gemfile.lock')
if changed_lines.any? { |line| line =~ /^\+\s+gitaly \(/ }
  warn 'Changing gitaly gem can cause a multi-version incompatibility incident'

  markdown(TEMPLATE_MESSAGE)
end