Skip to content

Commit

Permalink
update test for did retry tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 27, 2024
1 parent aacfb88 commit 8b81eee
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from dagster._core.snap import snapshot_from_execution_plan
from dagster._core.storage.dagster_run import DagsterRunStatus, RunsFilter
from dagster._core.storage.tags import (
DID_RETRY_TAG,
MAX_RETRIES_TAG,
RETRY_ON_ASSET_OR_OP_FAILURE_TAG,
RETRY_STRATEGY_TAG,
Expand Down Expand Up @@ -346,6 +347,8 @@ def test_consume_new_runs_for_automatic_reexecution(instance, workspace_context)
)
)
assert len(instance.run_coordinator.queue()) == 1
run = instance.get_run_by_id(run.run_id)
assert run.tags.get(DID_RETRY_TAG) == "true"

# doesn't retry again
list(
Expand Down Expand Up @@ -384,6 +387,8 @@ def test_consume_new_runs_for_automatic_reexecution(instance, workspace_context)
)
)
assert len(instance.run_coordinator.queue()) == 2
first_retry = instance.get_run_by_id(first_retry.run_id)
assert first_retry.tags.get(DID_RETRY_TAG) == "true"

# doesn't retry a third time
second_retry = instance.run_coordinator.queue()[1]
Expand Down Expand Up @@ -413,6 +418,8 @@ def test_consume_new_runs_for_automatic_reexecution(instance, workspace_context)
)
)
assert len(instance.run_coordinator.queue()) == 2
second_retry = instance.get_run_by_id(second_retry.run_id)
assert second_retry.tags.get(DID_RETRY_TAG) is None


def test_daemon_enabled(instance):
Expand Down

0 comments on commit 8b81eee

Please sign in to comment.