Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server options): allow connection timeouts to be configured #3701

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

iainsproat
Copy link
Contributor

Description & motivation

Postgres client configuration parameters were hard coded and could not be configured. This PR allows them to be configured by the server operator.

Changes:

  • new environment variables to server, fileimport service, preview service, and webhook service to configure POSTGRES_CONNECTION_CREATE_TIMEOUT_MILLIS and POSTGRES_CONNECTION_ACQUIRE_TIMEOUT_MILLIS
  • updates helm chart to provide db.connectionAcquisitionTimeoutMillis and db.connectionCreationTimeoutMillis configuration parameters and configure environment variables
  • Helm Chart updated to allow postgresMaxConnections to be configured for fileimport service, preview service, and webhook service. These were previously configurable via environment variable but not via the Helm Chart.
  • tidies environment variable parsing in preview service to use process.env['key'] syntax over process.env.key syntax.

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link
Contributor

📸 Preview service has generated an image.

@iainsproat iainsproat marked this pull request as ready for review December 16, 2024 13:32
@iainsproat iainsproat requested a review from alemagio December 16, 2024 13:33
@iainsproat iainsproat merged commit c4def81 into main Dec 16, 2024
28 of 30 checks passed
@iainsproat iainsproat deleted the iain/configure-db-connection-timeouts branch December 16, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants