Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELE-3709: Use get_report_link from alert class #1722

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
SlackAlertMessageSchema,
)
from elementary.monitor.data_monitoring.alerts.integrations.utils.report_link import (
get_model_runs_link,
get_model_test_runs_link,
get_test_runs_link,
)
from elementary.tracking.tracking_interface import Tracking
from elementary.utils.json_utils import (
Expand Down Expand Up @@ -148,9 +146,8 @@ def _get_dbt_test_template(
),
)

test_runs_report_link = get_test_runs_link(
alert.report_url, alert.elementary_unique_id
)
test_runs_report_link = alert.get_report_link()

if test_runs_report_link:
report_link = self.message_builder.create_context_block(
[
Expand Down Expand Up @@ -314,9 +311,8 @@ def _get_elementary_test_template(
),
)

test_runs_report_link = get_test_runs_link(
alert.report_url, alert.elementary_unique_id
)
test_runs_report_link = alert.get_report_link()

if test_runs_report_link:
report_link = self.message_builder.create_context_block(
[
Expand Down Expand Up @@ -461,9 +457,8 @@ def _get_model_template(
),
)

model_runs_report_link = get_model_runs_link(
alert.report_url, alert.model_unique_id
)
model_runs_report_link = alert.get_report_link()

if model_runs_report_link:
report_link = self.message_builder.create_context_block(
[
Expand Down Expand Up @@ -565,9 +560,8 @@ def _get_snapshot_template(
),
)

model_runs_report_link = get_model_runs_link(
alert.report_url, alert.model_unique_id
)
model_runs_report_link = alert.get_report_link()

if model_runs_report_link:
report_link = self.message_builder.create_context_block(
[
Expand Down Expand Up @@ -653,9 +647,8 @@ def _get_source_freshness_template(
),
)

test_runs_report_link = get_test_runs_link(
alert.report_url, alert.source_freshness_execution_id
)
test_runs_report_link = alert.get_report_link()

if test_runs_report_link:
report_link = self.message_builder.create_context_block(
[
Expand Down
Loading