Skip to content

Commit

Permalink
Add flag to TestEventLogStorage for storages that don't implement get…
Browse files Browse the repository at this point in the history
…_logs_for_all_runs_by_log_id (#26604)

BK

> Insert changelog entry or delete this section.

## Summary & Motivation

## How I Tested These Changes

## Changelog

> Insert changelog entry or delete this section.
  • Loading branch information
gibsondan authored Dec 19, 2024
1 parent 37f6bef commit 3fcec9f
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ def can_set_concurrency_defaults(self):
def supports_offset_cursor_queries(self):
return True

def supports_get_logs_for_all_runs_by_log_id(self):
return True

def supports_multiple_event_type_queries(self):
return True

Expand Down Expand Up @@ -4142,6 +4145,9 @@ def never_materializes_asset():
assert result.run_id == records[0].asset_entry.last_run_id

def test_get_logs_for_all_runs_by_log_id_of_type(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

@op
def return_one(_):
return 1
Expand All @@ -4161,6 +4167,9 @@ def _ops():
) == [DagsterEventType.RUN_SUCCESS, DagsterEventType.RUN_SUCCESS]

def test_get_logs_for_all_runs_by_log_id_by_multi_type(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

if not self.supports_multiple_event_type_queries():
pytest.skip("storage does not support deprecated multi-event-type queries")

Expand Down Expand Up @@ -4191,6 +4200,9 @@ def _ops():
]

def test_get_logs_for_all_runs_by_log_id_cursor(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

@op
def return_one(_):
return 1
Expand Down Expand Up @@ -4225,6 +4237,9 @@ def _ops():
]

def test_get_logs_for_all_runs_by_log_id_cursor_multi_type(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

if not self.supports_multiple_event_type_queries():
pytest.skip("storage does not support deprecated multi-event-type queries")

Expand Down Expand Up @@ -4269,6 +4284,9 @@ def _ops():
]

def test_get_logs_for_all_runs_by_log_id_limit(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

@op
def return_one(_):
return 1
Expand Down Expand Up @@ -4299,6 +4317,9 @@ def _ops():
]

def test_get_logs_for_all_runs_by_log_id_limit_multi_type(self, storage: EventLogStorage):
if not self.supports_get_logs_for_all_runs_by_log_id():
pytest.skip("storage does not support get_logs_for_all_runs_by_log_id")

if not self.supports_multiple_event_type_queries():
pytest.skip("storage does not support deprecated multi-event-type queries")

Expand Down

0 comments on commit 3fcec9f

Please sign in to comment.