Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix backfill and DA backcompat with single implicit asset jobs (#23808)
## Summary & Motivation Here's the situation that's broken: - The user code is on a Dagster version where there's an implicit asset job per `PartitionsDefinition` - The host code is on a Dagster version where there's a single implicit asset job - The user code has assets with two different `PartitionsDefinition`s, meaning it has `__ASSET_JOB_0` and `__ASSET_JOB_1` - DA wants to submit a run to materialize one of those `PartitionsDefinition`s - It needs to figure out what job to submit the run for Prior to this PR, it expects there to be a job just named `__ASSET_JOB`, but because there isn't, this gets raised: ```python Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/_core/execution/asset_backfill.py", line 754, in _submit_runs_and_update_backfill_in_chunks submit_asset_run( File "/Users/sryza/dagster/python_modules/dagster/dagster/_core/execution/submit_asset_runs.py", line 260, in submit_asset_run run_to_submit = _create_asset_run( File "/Users/sryza/dagster/python_modules/dagster/dagster/_core/execution/submit_asset_runs.py", line 135, in _create_asset_run execution_data = _get_job_execution_data_from_run_request( File "/Users/sryza/dagster/python_modules/dagster/dagster/_core/execution/submit_asset_runs.py", line 67, in _get_job_execution_data_from_run_request check.failed( File "/Users/sryza/dagster/python_modules/dagster/dagster/_check/functions.py", line 1642, in failed raise CheckError(f"Failure condition: {desc}") dagster._check.functions.CheckError: Failure condition: Could not find an implicit asset job for the given assets: [AssetKey(['upstream_daily_partitioned_asset'])] ``` Now, it will look for a job whose name _starts with_ `__ASSET_JOB` and targets all the partitions. ## How I Tested These Changes Locally: - Ran a code server on 1.8.0 (no single implicit asset job) - Ran a daemon on master (without this fix applied) - Kicked off a backfill - Observed the above error - Killed the daemon - Applied this fix - Restarted the daemon - Kicked off a backfill - Observed the backfill complete successfully ## Changelog NOCHANGELOG
- Loading branch information