diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4e847bb1..3fd70f4b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,17 +4,37 @@ Release History DEV --- -* Output VO values as nested dicts instead of a forced flat structure. -* Enclose DAOs within repositories to encourage DB interaction solely through repos. -* Cache registry, repositories, daos, and models with `@cache`. -* Fix sorting issue with null values in Memory DB. -* Add `any` filter and allow scalar values to `in` operator in Memory DB. -* Remove `remove` method from repository to discourage hard deletes. -* Add MessageDB Event store adapter. -* Introduce EventSourced Aggregates and Event Handlers. -* Introduce EventSourced Repositories. -* Wrap EventHandler execution within UoWs. + + +0.9.1 +----- + +* Bugfix - Use Domain's EventStore connection details for clearing events after test runs + +0.9.0 +----- + +* Output VO values as nested dicts instead of a forced flat structure +* Enclose DAOs within repositories to encourage DB interaction solely through repos +* Remove `remove` method from repository to discourage hard deletes +* Manage concurrency with Aggregate versions +* Add MessageDB Event store adapter +* Add stand-in Memory Event store +* Introduce EventSourced Aggregates and Event Handlers +* Introduce EventSourced Repositories +* Allow filtering of messages from their origin stream +* Allow Event Handlers to listen to other streams and ALL streams +* Allow Command Handler methods to handle any event +* Wrap EventHandler and CommandHandler methods execute within UnitOfWork +* Associate Commands and Events with streams (explicit and via Aggregates) +* Support processing events and commands in synchronous mode. +* Allow asynchronous command processing by submitting commands to domain * Add `autoflake` to `pre-commit` +* Treat empty string value as None in Date and DateTime Fields +* Support inter-attribute dependencies in Option defaults +* Cache registry, repositories, daos, and models with `@cache` +* Fix sorting issue with null values in Memory DB +* Add `any` filter and allow scalar values to `in` operator in Memory DB 0.8.1 ----- diff --git a/src/protean/adapters/event_store/message_db.py b/src/protean/adapters/event_store/message_db.py index f641e175..bbcf019a 100644 --- a/src/protean/adapters/event_store/message_db.py +++ b/src/protean/adapters/event_store/message_db.py @@ -1,4 +1,5 @@ from typing import Any, Dict, List +from urllib.parse import urlparse import psycopg2 @@ -55,14 +56,18 @@ def _read_last_message(self, stream_name) -> Dict[str, Any]: def _data_reset(self): """Utility function to empty messages, to be used only by test harness. - This method is designed to work only with the postgres instance run in the configured docker container: - Port is locked to 5433 and it is assumed that the default user does not have a password, both of which + This method is designed to work only with the postgres instance running in the configured docker container: + User is locked to `postgres` and it is assumed that the default user does not have a password, both of which should not be the configuration in production. - Any changes to docker configuration will need to updated here. + Any changes to configuration will need to updated here. """ + parsed = urlparse(self.domain.config["EVENT_STORE"]["DATABASE_URI"]) conn = psycopg2.connect( - dbname="message_store", user="postgres", port=5433, host="localhost" + dbname=parsed.path[1:], + user="postgres", + port=parsed.port, + host=parsed.hostname, ) cursor = conn.cursor()