R Lucas
05/18/2023, 2:20 PMmonitor_all_repositories
being set to False
by default, it seems like any failure on a given code location will be catched by any teams_on_run_failure
sensor regardless of the sensor code location.
I am able to replicate with rather simple code locations and can see all failure sensors being triggered regardless of failing asset location. Please find below an sample definition for one of the code location.
from dagster import asset, Definitions, load_assets_from_current_module
from dagster_msteams import make_teams_on_run_failure_sensor
from os import getenv
LOCATION = "a"
# Assets
@asset(name=f"error_asset_{LOCATION}")
def error_asset() -> None:
raise Exception(f"Error from location {LOCATION}")
defs = Definitions(
assets = load_assets_from_current_module(key_prefix=LOCATION),
sensors=[
make_teams_on_run_failure_sensor(
hook_url=getenv("MS_TEAMS_WEBHOOK"),
dagit_base_url=getenv("DAGIT_URL"),
)
],
)
How can I ensure failure sensor is triggered only for the code location it has been defined for ?jamie
05/18/2023, 3:08 PMR Lucas
05/18/2023, 3:49 PM