Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
19bd201
make POSTGRES_MINSIZE configurable
mrnicegyu11 Aug 7, 2025
b3f2daa
make POSTGRES_MAXSIZE configurable
mrnicegyu11 Aug 7, 2025
4cff733
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 8, 2025
8ffeec1
trying to fix concurrency issue
matusdrobuliak66 Aug 8, 2025
0ecc548
trying to fix concurrency issue
matusdrobuliak66 Aug 8, 2025
faf2cf4
revert back not needed changes
matusdrobuliak66 Aug 8, 2025
3f3c3c9
just switch asyncio context
matusdrobuliak66 Aug 11, 2025
c974bb1
revert last commit
matusdrobuliak66 Aug 11, 2025
89f8227
fix
matusdrobuliak66 Aug 12, 2025
c70cdb7
Merge remote-tracking branch 'upstream/master' into 2025/change/makeP…
mrnicegyu11 Aug 13, 2025
116e556
Add clearly identifyable container hostname
mrnicegyu11 Aug 13, 2025
5cde119
set POSTGRES_MINSIZE=2 default value
mrnicegyu11 Aug 13, 2025
190b9e0
AsyncPG disable jit compilation - speed improvement
mrnicegyu11 Aug 13, 2025
2173d60
set POSTGRES_MINSIZE=2 default value
mrnicegyu11 Aug 13, 2025
98b9a1a
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 13, 2025
2933b0e
@sanderegg change requests
mrnicegyu11 Aug 14, 2025
9ead512
Revert "Add clearly identifyable container hostname"
mrnicegyu11 Aug 14, 2025
83c606c
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 14, 2025
0a8271f
Fix tests
mrnicegyu11 Aug 14, 2025
c8306bc
Fix tests - 2
mrnicegyu11 Aug 14, 2025
6bbc694
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 14, 2025
11d455d
Fix tests - 3
mrnicegyu11 Aug 14, 2025
96c89ce
Fix tests - 4
mrnicegyu11 Aug 14, 2025
e783069
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 15, 2025
a284a75
Fix rabbit itnegration test failure
mrnicegyu11 Aug 15, 2025
01cf113
Merge branch 'master' into 2025/change/makePOSTGRESSIZEconfigurable
mrnicegyu11 Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env-devel
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ POSTGRES_HOST=postgres
POSTGRES_PASSWORD=adminadmin
POSTGRES_PORT=5432
POSTGRES_USER=scu

POSTGRES_MINSIZE=5
POSTGRES_MAXSIZE=50
POSTGRES_READONLY_PASSWORD=readonly
POSTGRES_READONLY_USER=postgres_readonly

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PostgresSettings(BaseCustomSettings):
# pool connection limits
POSTGRES_MINSIZE: Annotated[
int, Field(description="Minimum number of connections in the pool", ge=1)
] = 1
] = 5
POSTGRES_MAXSIZE: Annotated[
int, Field(description="Maximum number of connections in the pool", ge=1)
] = 50
Expand Down
2 changes: 2 additions & 0 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ services:
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_MINSIZE: ${POSTGRES_MINSIZE}
POSTGRES_MAXSIZE: ${POSTGRES_MAXSIZE}
POSTGRES_USER: ${POSTGRES_USER}

# WEBSERVER_DIAGNOSTICS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ async def check_running_services(app: FastAPI) -> None:
base_start_timestamp = datetime.now(tz=UTC)

# Get all current running services (across all products)
total_count: PositiveInt = await service_runs_db.total_service_runs_with_running_status_across_all_products(
_db_engine
total_count: PositiveInt = (
await service_runs_db.total_service_runs_with_running_status_across_all_products(
_db_engine
)
)

for offset in range(0, total_count, _BATCH_SIZE):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from collections.abc import Callable, Iterator
from datetime import UTC, datetime, timedelta

Expand Down Expand Up @@ -132,6 +133,7 @@ async def test_process_event_functions(

for _ in range(app_settings.RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_COUNTER_FAIL):
await check_running_services(initialized_app)
await asyncio.sleep(1)
# NOTE: As we are doing check that the modified field needs to be older then some
# threshold, we need to make this field artificaly older in this test
with postgres_db.connect() as con:
Expand Down
Loading