dagster-io / dagster

An orchestration platform for the development, production, and observation of data assets.
https://dagster.io
Apache License 2.0
11.69k stars 1.48k forks source link

"__ASSET_JOB_1 has no op named" error with asset reconciliation sensor and run retries #13360

Closed sryza closed 1 year ago

sryza commented 1 year ago

When an automatic run retry is launched for a run launched by the asset reconciliation sensor, sometimes it hits an error like this:

dagster._check.CheckError: Invariant failed. Description: __ASSET_JOB_1 has no op named kippcamden__powerschool__assignmentscore.

Reported twice:

mgierada commented 1 year ago

Yeah I had the same issue! The quick fix for me is to disable automatic retries through Dagster Cloud UI.

sryza commented 1 year ago

I was finally able to reproduce this. Minimal steps:

It appears that source of the problem is that the execution plan for the retry ends up containing all steps, instead of just the step that should be retried.

Interestingly, the same error does not occur when launching a manual re-execution from failure.

Here's what gets passed to create_run in the auto-retry case (which is where the problem is):

asset_selection: frozenset({AssetKey(['multi_dynamic_downstream2'])})
solid_selection: None
execution_plan_snapshot.steps: ['multi_dynamic_downstream2', 'multi_dynamic_upstream2', 'non_partitioned_asset']
pipeline_snapshot.node_names: ['multi_dynamic_downstream2', 'multi_dynamic_upstream2', 'non_partitioned_asset']

Here's what gets passed to create_run in the manual retry case (which works correctly):

asset_selection: frozenset({AssetKey(['multi_dynamic_downstream2'])})
solid_selection: None
execution_plan_snapshot.steps: ['multi_dynamic_downstream2']
pipeline_snapshot.node_names: ['multi_dynamic_downstream2']
mgierada commented 1 year ago

"It appears that source of the problem is that the execution plan for the retry ends up containing all steps, instead of just the step that should be retried."

I totally agree with that! Thanks @sryza for digging in!