Skip to content

Commit

Permalink
Merge branch 'main' into improve_testing_for_stripe_and_hubspot
Browse files Browse the repository at this point in the history
  • Loading branch information
Linker44 committed Dec 11, 2024
2 parents 2abab56 + 6ab5e9e commit b28f1e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The types of changes are:
- SaaS integrations using `oauth_client_credentials` now properly update their access token when editing the secrets. [#5548](https://github.com/ethyca/fides/pull/5548)
- Saas integrations using `oauth_client_credentials` now properly refresh their access token when the current token expires [#5569](https://github.com/ethyca/fides/pull/5569)
- Adding `dsr_testing_tools_enabled` security setting [#5573](https://github.com/ethyca/fides/pull/5573)
- Reverted elimination of connection pool in worker tasks to prevent DB performance issues [#5592](https://github.com/ethyca/fides/pull/5592)

## [2.51.0](https://github.com/ethyca/fides/compare/2.50.0...2.51.0)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def optional_requirements(
## Package Setup ##
###################
setup(
name="ethyca-fides",
name="ethyca_fides",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Open-source ecosystem for data privacy as code.",
Expand Down
3 changes: 2 additions & 1 deletion src/fides/api/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def get_new_session(self) -> ContextManager[Session]:
if self._task_engine is None:
self._task_engine = get_db_engine(
config=CONFIG,
pool_size=CONFIG.database.task_engine_pool_size,
max_overflow=CONFIG.database.task_engine_max_overflow,
keepalives_idle=CONFIG.database.task_engine_keepalives_idle,
keepalives_interval=CONFIG.database.task_engine_keepalives_interval,
keepalives_count=CONFIG.database.task_engine_keepalives_count,
disable_pooling=True,
)

# same for the sessionmaker
Expand Down
15 changes: 0 additions & 15 deletions tests/ops/tasks/test_database_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ def always_failing_session_maker(self):
mock_maker.side_effect = OperationalError("connection failed", None, None)
return mock_maker

@pytest.mark.parametrize(
"config_fixture", [None, "mock_config_changed_db_engine_settings"]
)
def test_get_task_session(self, config_fixture, request):
if config_fixture is not None:
request.getfixturevalue(
config_fixture
) # used to invoke config fixture if provided
pool_size = CONFIG.database.task_engine_pool_size
max_overflow = CONFIG.database.task_engine_max_overflow
t = DatabaseTask()
session: Session = t.get_new_session()
engine: Engine = session.get_bind()
assert isinstance(engine.pool, NullPool)

def test_retry_on_operational_error(self, recovering_session_maker):
"""Test that session creation retries on OperationalError"""

Expand Down

0 comments on commit b28f1e8

Please sign in to comment.