From 60e55ed2a09c57ea28887f0ff43085e9ce1dd664 Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Thu, 12 Sep 2024 13:29:58 -0400 Subject: [PATCH] feat: updates for the comments --- .github/workflows/ci-e2e-no-metrics-tests.yml | 8 -------- clients/database/postgres.go | 6 +++--- service/service.go | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-e2e-no-metrics-tests.yml b/.github/workflows/ci-e2e-no-metrics-tests.yml index d53e97d..71e8526 100644 --- a/.github/workflows/ci-e2e-no-metrics-tests.yml +++ b/.github/workflows/ci-e2e-no-metrics-tests.yml @@ -16,14 +16,6 @@ jobs: cache: true - name: pull pre-built images run: sudo docker compose -f ci.docker-compose-no-metrics.yml pull - # In this step, this action saves a list of existing images, - # the cache is created without them in the post run. - # It also restores the cache if it exists. - # TODO(yevhenii): this step failed with "No space left on device" error, debug it and enable back - # - name: cache docker images - # uses: satackey/action-docker-layer-caching@v0.0.11 - # Ignore the failure of a step and avoid terminating the job. - continue-on-error: true - name: build and start proxy service and it's dependencies run: sudo docker compose -f ci.docker-compose-no-metrics.yml up -d --build - name: wait for proxy service to be running diff --git a/clients/database/postgres.go b/clients/database/postgres.go index 8cc477f..02b0195 100644 --- a/clients/database/postgres.go +++ b/clients/database/postgres.go @@ -24,7 +24,7 @@ type PostgresDatabaseConfig struct { DatabaseUsername string DatabasePassword string ReadTimeoutSeconds int64 - WriteTimeoutsSeconds int64 + WriteTimeoutSeconds int64 DatabaseMaxIdleConnections int64 DatabaseConnectionMaxIdleSeconds int64 DatabaseMaxOpenConnections int64 @@ -64,7 +64,7 @@ func NewPostgresClient(config PostgresDatabaseConfig) (PostgresClient, error) { pgdriver.WithPassword(config.DatabasePassword), pgdriver.WithDatabase(config.DatabaseName), pgdriver.WithReadTimeout(time.Second*time.Duration(config.ReadTimeoutSeconds)), - pgdriver.WithWriteTimeout(time.Second*time.Duration(config.WriteTimeoutsSeconds)), + pgdriver.WithWriteTimeout(time.Second*time.Duration(config.WriteTimeoutSeconds)), ) } else { pgOptions = pgdriver.NewConnector( @@ -74,7 +74,7 @@ func NewPostgresClient(config PostgresDatabaseConfig) (PostgresClient, error) { pgdriver.WithPassword(config.DatabasePassword), pgdriver.WithDatabase(config.DatabaseName), pgdriver.WithReadTimeout(time.Second*time.Duration(config.ReadTimeoutSeconds)), - pgdriver.WithWriteTimeout(time.Second*time.Duration(config.WriteTimeoutsSeconds)), + pgdriver.WithWriteTimeout(time.Second*time.Duration(config.WriteTimeoutSeconds)), ) } diff --git a/service/service.go b/service/service.go index 01ba48e..fc0a20a 100644 --- a/service/service.go +++ b/service/service.go @@ -150,7 +150,7 @@ func createDatabaseClient(ctx context.Context, config config.Config, logger *log SSLEnabled: config.DatabaseSSLEnabled, QueryLoggingEnabled: config.DatabaseQueryLoggingEnabled, ReadTimeoutSeconds: config.DatabaseReadTimeoutSeconds, - WriteTimeoutsSeconds: config.DatabaseWriteTimeoutSeconds, + WriteTimeoutSeconds: config.DatabaseWriteTimeoutSeconds, DatabaseMaxIdleConnections: config.DatabaseMaxIdleConnections, DatabaseConnectionMaxIdleSeconds: config.DatabaseConnectionMaxIdleSeconds, DatabaseMaxOpenConnections: config.DatabaseMaxOpenConnections,