Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Dec 2, 2024
1 parent c4f5664 commit fb46cc2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions python_modules/dagster/dagster_tests/daemon_tests/test_backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from dagster._core.definitions.events import AssetKeyPartitionKey
from dagster._core.definitions.partition import DynamicPartitionsDefinition, PartitionedConfig
from dagster._core.definitions.selector import (
JobSubsetSelector,
PartitionRangeSelector,
PartitionsByAssetSelector,
PartitionsSelector,
Expand Down Expand Up @@ -3219,12 +3220,21 @@ def test_run_retry_not_part_of_completed_backfill(

# simulate a retry of a run
run_to_retry = instance.get_runs()[0]
remote_job = remote_repo.get_full_job(run_to_retry.job_name)
selector = JobSubsetSelector(
location_name=code_location.name,
repository_name=remote_repo.name,
job_name=run_to_retry.job_name,
asset_selection=run_to_retry.asset_selection,
op_selection=None,
)
remote_job = code_location.get_job(selector)
retried_run = instance.create_reexecuted_run(
parent_run=run_to_retry,
code_location=code_location,
remote_job=remote_job,
strategy=ReexecutionStrategy.ALL_STEPS,
run_config=run_to_retry.run_config,
use_parent_run_tags=True, # ensures that the logic for not copying over backfill tags is tested
)

for tag in BACKFILL_TAGS:
Expand All @@ -3237,8 +3247,6 @@ def test_run_retry_not_part_of_completed_backfill(
assert backfill
assert backfill.status == BulkActionStatus.COMPLETED_SUCCESS

wait_for_all_runs_to_finish(instance, timeout=30)

assert retried_run.run_id not in [
r.run_id for r in instance.get_runs(filters=RunsFilter.for_backfill(backfill_id))
]

0 comments on commit fb46cc2

Please sign in to comment.