Skip to content

Commit

Permalink
turn run retries on for backfill tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 27, 2024
1 parent b117419 commit 1139a80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
from dagster._core.storage.tags import (
ASSET_PARTITION_RANGE_END_TAG,
ASSET_PARTITION_RANGE_START_TAG,
AUTO_RETRY_RUN_ID,
BACKFILL_ID_TAG,
DID_RETRY_TAG,
PARTITION_NAME_TAG,
WILL_RETRY_TAG,
)
Expand Down Expand Up @@ -978,7 +978,7 @@ def backfill_is_complete(
if any(
[
get_boolean_tag_value(run.tags.get(WILL_RETRY_TAG), False)
and run.tags.get(DID_RETRY_TAG) is None
and run.tags.get(AUTO_RETRY_RUN_ID) is None
for run in instance.get_runs(
filters=RunsFilter(
tags={BACKFILL_ID_TAG: backfill_id},
Expand Down
24 changes: 16 additions & 8 deletions python_modules/dagster/dagster_tests/daemon_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import tempfile
from typing import Iterator, Optional, cast

import pytest
Expand All @@ -21,15 +22,22 @@

@pytest.fixture(name="instance_module_scoped", scope="module")
def instance_module_scoped_fixture() -> Iterator[DagsterInstance]:
with instance_for_test(
overrides={
"run_launcher": {
"module": "dagster._core.launcher.sync_in_memory_run_launcher",
"class": "SyncInMemoryRunLauncher",
with tempfile.TemporaryDirectory() as temp_dir:
with instance_for_test(
overrides={
"run_launcher": {
"module": "dagster._core.launcher.sync_in_memory_run_launcher",
"class": "SyncInMemoryRunLauncher",
},
"event_log_storage": {
"module": "dagster._core.storage.event_log",
"class": "ConsolidatedSqliteEventLogStorage",
"config": {"base_dir": temp_dir},
},
"run_retries": {"enabled": True},
}
}
) as instance:
yield instance
) as instance:
yield instance


@pytest.fixture(name="instance", scope="function")
Expand Down

0 comments on commit 1139a80

Please sign in to comment.