dagster-postgres 0.21.13__tar.gz → 0.21.14rc0__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 (26) hide show
  1. {dagster-postgres-0.21.13/dagster_postgres.egg-info → dagster-postgres-0.21.14rc0}/PKG-INFO +1 -1
  2. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/event_log/event_log.py +13 -1
  3. dagster-postgres-0.21.14rc0/dagster_postgres/version.py +1 -0
  4. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0/dagster_postgres.egg-info}/PKG-INFO +1 -1
  5. dagster-postgres-0.21.14rc0/dagster_postgres.egg-info/requires.txt +2 -0
  6. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/setup.py +1 -1
  7. dagster-postgres-0.21.13/dagster_postgres/version.py +0 -1
  8. dagster-postgres-0.21.13/dagster_postgres.egg-info/requires.txt +0 -2
  9. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/LICENSE +0 -0
  10. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/MANIFEST.in +0 -0
  11. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/README.md +0 -0
  12. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/__init__.py +0 -0
  13. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/alembic/alembic.ini +0 -0
  14. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/event_log/__init__.py +0 -0
  15. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/py.typed +0 -0
  16. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/run_storage/__init__.py +0 -0
  17. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/run_storage/run_storage.py +0 -0
  18. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/schedule_storage/__init__.py +0 -0
  19. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/schedule_storage/schedule_storage.py +0 -0
  20. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/storage.py +0 -0
  21. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres/utils.py +0 -0
  22. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres.egg-info/SOURCES.txt +0 -0
  23. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres.egg-info/dependency_links.txt +0 -0
  24. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres.egg-info/not-zip-safe +0 -0
  25. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/dagster_postgres.egg-info/top_level.txt +0 -0
  26. {dagster-postgres-0.21.13 → dagster-postgres-0.21.14rc0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-postgres
3
- Version: 0.21.13
3
+ Version: 0.21.14rc0
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
@@ -1,4 +1,5 @@
1
- from typing import Any, ContextManager, Mapping, Optional, Sequence
1
+ from contextlib import contextmanager
2
+ from typing import Any, ContextManager, Iterator, Mapping, Optional, Sequence
2
3
 
3
4
  import dagster._check as check
4
5
  import sqlalchemy as db
@@ -287,6 +288,17 @@ class PostgresEventLogStorage(SqlEventLogStorage, ConfigurableClass):
287
288
  def index_connection(self) -> ContextManager[Connection]:
288
289
  return self._connect()
289
290
 
291
+ @contextmanager
292
+ def index_transaction(self) -> Iterator[Connection]:
293
+ """Context manager yielding a connection to the index shard that has begun a transaction."""
294
+ with self.index_connection() as conn:
295
+ if conn.in_transaction():
296
+ yield conn
297
+ else:
298
+ conn = conn.execution_options(isolation_level="READ COMMITTED") # noqa: PLW2901
299
+ with conn.begin():
300
+ yield conn
301
+
290
302
  def has_table(self, table_name: str) -> bool:
291
303
  return bool(self._engine.dialect.has_table(self._engine.connect(), table_name))
292
304
 
@@ -0,0 +1 @@
1
+ __version__ = "0.21.14rc0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-postgres
3
- Version: 0.21.13
3
+ Version: 0.21.14rc0
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
@@ -0,0 +1,2 @@
1
+ dagster==1.5.14rc0
2
+ psycopg2-binary
@@ -38,6 +38,6 @@ setup(
38
38
  ]
39
39
  },
40
40
  include_package_data=True,
41
- install_requires=["dagster==1.5.13", "psycopg2-binary"],
41
+ install_requires=["dagster==1.5.14rc0", "psycopg2-binary"],
42
42
  zip_safe=False,
43
43
  )
@@ -1 +0,0 @@
1
- __version__ = "0.21.13"
@@ -1,2 +0,0 @@
1
- dagster==1.5.13
2
- psycopg2-binary