Skip to content

Extend Danger to detect potential scope changes

What does this MR do and why?

The idea of this first iteration is to detect when a scope has changed and check if we have any metrics utilising the scope.

For example, if a MR has a change like

in app/models/jira_connection.rb

scope :proxy_installations, -> { where.not(instance_url: nil) }

and we have metrics which is/are declaring data source as

relation { JiraConnection.proxy_installations.this_and_that }

then Danger will ping us.

This MR quite light weight as opposite to detecting actual underlying query change we can quickly release it to gather feedback. Query detection can be added as well of course.

wdyt?

Screenshots or screen recordings

How to set up and validate locally

Example MR !104641 (closed)

Screen_Shot_2022-11-22_at_1.57.40_PM

MR acceptance checklist

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

Related to #299331 (closed)

Edited by Niko Belokolodov

Merge request reports