dagster-postgres 0.26.8__tar.gz → 0.26.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dagster-postgres might be problematic. Click here for more details.
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/MANIFEST.in +2 -0
- {dagster-postgres-0.26.8/dagster_postgres.egg-info → dagster-postgres-0.26.11}/PKG-INFO +1 -1
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/event_log/event_log.py +1 -1
- dagster-postgres-0.26.11/dagster_postgres/test_fixtures/__init__.py +75 -0
- dagster-postgres-0.26.11/dagster_postgres/test_fixtures/docker-compose.yml +10 -0
- dagster-postgres-0.26.11/dagster_postgres/version.py +1 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11/dagster_postgres.egg-info}/PKG-INFO +1 -1
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/SOURCES.txt +3 -1
- dagster-postgres-0.26.11/dagster_postgres.egg-info/requires.txt +2 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/setup.py +1 -1
- dagster-postgres-0.26.8/dagster_postgres/version.py +0 -1
- dagster-postgres-0.26.8/dagster_postgres.egg-info/requires.txt +0 -2
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/LICENSE +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/README.md +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/__init__.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/alembic/alembic.ini +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/event_log/__init__.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/py.typed +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/run_storage/__init__.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/run_storage/run_storage.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/schedule_storage/__init__.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/schedule_storage/schedule_storage.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/storage.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/utils.py +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/dependency_links.txt +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/not-zip-safe +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/top_level.txt +0 -0
- {dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/setup.cfg +0 -0
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/event_log/event_log.py
RENAMED
|
@@ -228,7 +228,7 @@ class PostgresEventLogStorage(SqlEventLogStorage, ConfigurableClass):
|
|
|
228
228
|
insert_event_statement = self.prepare_insert_event_batch(events)
|
|
229
229
|
with self._connect() as conn:
|
|
230
230
|
result = conn.execute(insert_event_statement.returning(SqlEventLogStorageTable.c.id))
|
|
231
|
-
event_ids = [cast(int, row[0]) for row in result.fetchall()]
|
|
231
|
+
event_ids = [cast("int", row[0]) for row in result.fetchall()]
|
|
232
232
|
|
|
233
233
|
# We only update the asset table with the last event
|
|
234
234
|
self.store_asset_event(events[-1], event_ids[-1])
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import tempfile
|
|
2
|
+
from contextlib import contextmanager
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from dagster._core.test_utils import instance_for_test
|
|
7
|
+
from dagster._utils.merger import merge_dicts
|
|
8
|
+
from dagster_test.fixtures import docker_compose_cm, network_name_from_yml
|
|
9
|
+
|
|
10
|
+
from dagster_postgres.utils import get_conn_string, wait_for_connection
|
|
11
|
+
|
|
12
|
+
compose_file = Path(__file__).parent / "docker-compose.yml"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@pytest.fixture(scope="session")
|
|
16
|
+
def postgres_network():
|
|
17
|
+
yield network_name_from_yml(compose_file)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@pytest.fixture(scope="session")
|
|
21
|
+
def postgres_hostname():
|
|
22
|
+
with docker_compose_cm(docker_compose_yml=compose_file) as hostnames:
|
|
23
|
+
yield hostnames["postgres"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@pytest.fixture(scope="session")
|
|
27
|
+
def postgres_conn_str(postgres_hostname):
|
|
28
|
+
conn_str = get_conn_string(
|
|
29
|
+
username="test",
|
|
30
|
+
password="test",
|
|
31
|
+
hostname=postgres_hostname,
|
|
32
|
+
db_name="test",
|
|
33
|
+
params=dict(connect_timeout=5),
|
|
34
|
+
)
|
|
35
|
+
wait_for_connection(
|
|
36
|
+
conn_str,
|
|
37
|
+
retry_limit=10,
|
|
38
|
+
retry_wait=3,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
yield conn_str
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.fixture
|
|
45
|
+
def postgres_instance(postgres_conn_str):
|
|
46
|
+
@contextmanager
|
|
47
|
+
def _instance(overrides=None):
|
|
48
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
49
|
+
with instance_for_test(
|
|
50
|
+
temp_dir=temp_dir,
|
|
51
|
+
overrides=merge_dicts(
|
|
52
|
+
{
|
|
53
|
+
"run_storage": {
|
|
54
|
+
"module": "dagster_postgres.run_storage.run_storage",
|
|
55
|
+
"class": "PostgresRunStorage",
|
|
56
|
+
"config": {"postgres_url": postgres_conn_str},
|
|
57
|
+
},
|
|
58
|
+
"event_log_storage": {
|
|
59
|
+
"module": "dagster_postgres.event_log.event_log",
|
|
60
|
+
"class": "PostgresEventLogStorage",
|
|
61
|
+
"config": {"postgres_url": postgres_conn_str},
|
|
62
|
+
},
|
|
63
|
+
"schedule_storage": {
|
|
64
|
+
"module": "dagster_postgres.schedule_storage.schedule_storage",
|
|
65
|
+
"class": "PostgresScheduleStorage",
|
|
66
|
+
"config": {"postgres_url": postgres_conn_str},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
overrides if overrides else {},
|
|
70
|
+
),
|
|
71
|
+
) as instance:
|
|
72
|
+
instance.wipe()
|
|
73
|
+
yield instance
|
|
74
|
+
|
|
75
|
+
return _instance
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.26.11"
|
|
@@ -20,4 +20,6 @@ dagster_postgres/event_log/event_log.py
|
|
|
20
20
|
dagster_postgres/run_storage/__init__.py
|
|
21
21
|
dagster_postgres/run_storage/run_storage.py
|
|
22
22
|
dagster_postgres/schedule_storage/__init__.py
|
|
23
|
-
dagster_postgres/schedule_storage/schedule_storage.py
|
|
23
|
+
dagster_postgres/schedule_storage/schedule_storage.py
|
|
24
|
+
dagster_postgres/test_fixtures/__init__.py
|
|
25
|
+
dagster_postgres/test_fixtures/docker-compose.yml
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.26.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/run_storage/__init__.py
RENAMED
|
File without changes
|
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/run_storage/run_storage.py
RENAMED
|
File without changes
|
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres/schedule_storage/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dagster-postgres-0.26.8 → dagster-postgres-0.26.11}/dagster_postgres.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|