Add gitaly gem bump danger check

This commit is contained in:
Alessio Caiazza 2021-07-02 12:01:13 +02:00
parent e66d46141a
commit f06b84ef9a
3 changed files with 24 additions and 1 deletions

22
danger/gitaly/Dangerfile Normal file
View file

@ -0,0 +1,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

View file

@ -221,7 +221,7 @@
describe '.local_warning_message' do
it 'returns an informational message with rules that can run' do
expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, database, datateam, documentation, duplicate_yarn_dependencies, eslint, karma, pajamas, pipeline, prettier, product_intelligence, utility_css')
expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, database, datateam, documentation, duplicate_yarn_dependencies, eslint, gitaly, karma, pajamas, pipeline, prettier, product_intelligence, utility_css')
end
end

View file

@ -10,6 +10,7 @@ module ProjectHelper
documentation
duplicate_yarn_dependencies
eslint
gitaly
karma
pajamas
pipeline