dagster-postgres 0.26.9__tar.gz → 0.26.11rc0__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.

Files changed (28) hide show
  1. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/MANIFEST.in +2 -0
  2. {dagster-postgres-0.26.9/dagster_postgres.egg-info → dagster-postgres-0.26.11rc0}/PKG-INFO +1 -1
  3. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/event_log/event_log.py +1 -1
  4. dagster-postgres-0.26.11rc0/dagster_postgres/test_fixtures/__init__.py +75 -0
  5. dagster-postgres-0.26.11rc0/dagster_postgres/test_fixtures/docker-compose.yml +10 -0
  6. dagster-postgres-0.26.11rc0/dagster_postgres/version.py +1 -0
  7. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0/dagster_postgres.egg-info}/PKG-INFO +1 -1
  8. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres.egg-info/SOURCES.txt +3 -1
  9. dagster-postgres-0.26.11rc0/dagster_postgres.egg-info/requires.txt +2 -0
  10. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/setup.py +1 -1
  11. dagster-postgres-0.26.9/dagster_postgres/version.py +0 -1
  12. dagster-postgres-0.26.9/dagster_postgres.egg-info/requires.txt +0 -2
  13. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/LICENSE +0 -0
  14. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/README.md +0 -0
  15. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/__init__.py +0 -0
  16. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/alembic/alembic.ini +0 -0
  17. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/event_log/__init__.py +0 -0
  18. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/py.typed +0 -0
  19. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/run_storage/__init__.py +0 -0
  20. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/run_storage/run_storage.py +0 -0
  21. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/schedule_storage/__init__.py +0 -0
  22. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/schedule_storage/schedule_storage.py +0 -0
  23. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/storage.py +0 -0
  24. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres/utils.py +0 -0
  25. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres.egg-info/dependency_links.txt +0 -0
  26. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres.egg-info/not-zip-safe +0 -0
  27. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/dagster_postgres.egg-info/top_level.txt +0 -0
  28. {dagster-postgres-0.26.9 → dagster-postgres-0.26.11rc0}/setup.cfg +0 -0
@@ -3,3 +3,5 @@ graft dagster_postgres/alembic
3
3
  global-exclude __pycache__
4
4
  global-exclude *.py[co]
5
5
  include dagster_postgres/py.typed
6
+ exclude conftest.py
7
+ include dagster_postgres/test_fixtures/docker-compose.yml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-postgres
3
- Version: 0.26.9
3
+ Version: 0.26.11rc0
4
4
  Summary: A Dagster integration for postgres
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-postgres
6
6
  Author: Dagster Labs
@@ -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,10 @@
1
+ services:
2
+ postgres:
3
+ image: postgres:16
4
+ container_name: postgres
5
+ ports:
6
+ - "5432:5432"
7
+ environment:
8
+ POSTGRES_PASSWORD: "test"
9
+ POSTGRES_USER: "test"
10
+ POSTGRES_DB: "test"
@@ -0,0 +1 @@
1
+ __version__ = "0.26.11rc0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-postgres
3
- Version: 0.26.9
3
+ Version: 0.26.11rc0
4
4
  Summary: A Dagster integration for postgres
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-postgres
6
6
  Author: Dagster Labs
@@ -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
@@ -0,0 +1,2 @@
1
+ dagster==1.10.11rc0
2
+ psycopg2-binary
@@ -38,6 +38,6 @@ setup(
38
38
  },
39
39
  include_package_data=True,
40
40
  python_requires=">=3.9,<3.13",
41
- install_requires=["dagster==1.10.9", "psycopg2-binary"],
41
+ install_requires=["dagster==1.10.11rc0", "psycopg2-binary"],
42
42
  zip_safe=False,
43
43
  )
@@ -1 +0,0 @@
1
- __version__ = "0.26.9"
@@ -1,2 +0,0 @@
1
- dagster==1.10.9
2
- psycopg2-binary