flat-waiter-82487
10/27/2026, 1:54 PMwebhook_url bound late at runtime only?
union.ai/docs/…/run-with-notifications
notify.Slack(
on_phase=ActionPhase.SUCCEEDED,
webhook_url=SLACK_WEBHOOK_URL,
message="Run {{.Run.Name}} succeeded.",
),
The problem with current approach is that I have to know the webhook AT DEPLOYMENT time, which is problematic if I want to deploy the same job to two clusters. In v1, we had notification-on-failure that send out slack notification that just read the webhook url from mounted secrets at runtime. How to achieve the same in v2?freezing-airport-6809
flat-waiter-82487
10/27/2026, 2:12 PMon_failure that allowed late binding.
From the "it's just code" - how to implement it properly then? I could try-except the main driver task but then it would fire notification on every restart, while I only want it to fire on specific phases (SUCCESS/FAILURE) of the main task (=whole "workflow")freezing-airport-6809
freezing-airport-6809
flat-waiter-82487
10/27/2026, 2:29 PMnotify.Slack then if I have to code it differently anyway?flat-waiter-82487
10/27/2026, 2:52 PM@env.task
async def fail() -> int:
raise ValueError("fail() always fails")
@env.task(retries=3)
async def main() -> int:
try:
return await fail()
except flyte.errors.RuntimeUserError:
if flyte.ctx().attempt_number >= main.retries.count:
print("⚠️ SOMETHING WENT WRONG") # HERE SEND TO SLACK?
raise
Feels odd, so my "what's the point of notify.Slack" still holds.faint-pilot-24699
10/28/2026, 3:04 AMflat-waiter-82487
10/28/2026, 8:48 AMfreezing-airport-6809
powerful-gold-59386
10/29/2026, 1:56 PMpowerful-gold-59386
10/29/2026, 3:30 PM