Commit d45cc75a authored by Albert Salim's avatar Albert Salim

Merge branch...

Merge branch '335269-snowflake-data-warehouse-downstream-impact-due-to-db_structure-changes' into 'master'

Resolve "Snowflake dwh impact due to db_structure changes"

See merge request gitlab-org/gitlab!65537
parents a551f185 efc56511
# frozen_string_literal: true
# rubocop:disable Style/SignalException
DATA_WAREHOUSE_LABELS = [
"Data Warehouse::Impact Check",
"Data Warehouse::Impacted",
"Data Warehouse::Not Impacted"
].freeze
CHANGED_SCHEMA_MESSAGE = <<~MSG
Mentioning @gitlab-data/engineers to notify the team about changes to the db/structure.sql file.
Notification to the Data Team about changes to the db/structure.sql file, add label `Data Warehouse::Impact Check`.
/label ~"Data Warehouse::Impact Check"
MSG
db_schema_updated = !git.modified_files.grep(%r{\Adb/structure\.sql}).empty?
if db_schema_updated
no_data_warehouse_labels = (gitlab.mr_labels & DATA_WAREHOUSE_LABELS).empty?
if db_schema_updated && no_data_warehouse_labels
markdown(CHANGED_SCHEMA_MESSAGE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment