feat(governance): dynamic OpenMetadata registration with domains, owners, tiers, and certification (zero hardcoding)
This commit is contained in:
@@ -293,6 +293,9 @@ class MericaAlertHook:
|
||||
|
||||
results: Dict[str, bool] = {}
|
||||
|
||||
om_public_url = os.getenv("OPENMETADATA_PUBLIC_URL", os.getenv("OPENMETADATA_HOST", "http://localhost:14585"))
|
||||
pipeline_svc = os.getenv("OPENMETADATA_PIPELINE_SERVICE_NAME", "dlh_airflow_service")
|
||||
|
||||
# 1. Telegram Dispatch
|
||||
tg_bot_token = os.getenv("ALERT_TELEGRAM_BOT_TOKEN")
|
||||
tg_chat_id = os.getenv("ALERT_TELEGRAM_CHAT_ID")
|
||||
@@ -313,7 +316,7 @@ class MericaAlertHook:
|
||||
f"👤 <b>Owner:</b> <code>{ctx_data['owner']}</code> | <b>Tier:</b> <code>{ctx_data['tier']}</code>\n\n"
|
||||
f"⚠️ <b>Root Cause:</b>\n<code>{ctx_data['error_msg']}</code>\n\n"
|
||||
f"🔗 <a href='{ctx_data['log_url']}'>Airflow Log</a> | "
|
||||
f"<a href='http://localhost:8585/pipeline/dlh_airflow_service.{ctx_data['dag_id']}/lineage'>OpenMetadata Lineage</a>"
|
||||
f"<a href='{om_public_url}/pipeline/{pipeline_svc}.{ctx_data['dag_id']}/lineage'>OpenMetadata Lineage</a>"
|
||||
)
|
||||
results["telegram"] = cls.send_telegram_alert(tg_bot_token, tg_chat_id, tg_message)
|
||||
|
||||
@@ -354,7 +357,7 @@ class MericaAlertHook:
|
||||
"type": "actions",
|
||||
"elements": [
|
||||
{"type": "button", "text": {"type": "plain_text", "text": "View Airflow Log"}, "url": ctx_data["log_url"]},
|
||||
{"type": "button", "text": {"type": "plain_text", "text": "OpenMetadata Lineage"}, "url": f"http://localhost:8585/pipeline/dlh_airflow_service.{ctx_data['dag_id']}/lineage"}
|
||||
{"type": "button", "text": {"type": "plain_text", "text": "OpenMetadata Lineage"}, "url": f"{om_public_url}/pipeline/{pipeline_svc}.{ctx_data['dag_id']}/lineage"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user