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

Move maxConnections into RDSClientConfig, move creation of RDSClientConfig #2817

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

paul-butcher
Copy link
Contributor

What does this change?

This is a straight refactor.

Previously, RDSBuilder.buildDB took a typespace Config, built an RDSClientConfig from it, then later on pulled out the maxConnections from the Config, and used that value alongside the RDSClientConfig. Later still, Main also builds RDSClientConfig from the Config, to pass in to the Worker Service.

This change minimises that duplication, and also clarifies the buildDB interface, by removing the "here's a stringly-keyed dictionary which I hope has all the values you want" approach.

How to test

As a straight refactor, everything should continue working as before.

How can we measure success?

This is part of some refactoring other facilitate wellcomecollection/platform#5888

There is a little inconsistency in the ID Minter about where certain things happen. This is one step towards bringing the configuration aspect in line with the other services we have converted to Lambda.

Have we considered potential risks?

The code in Main is a little undertested, but this is a fairly minimal change, and I've added comprehensive testing to RDSBuilder and RDSClientConfig.

@paul-butcher paul-butcher requested a review from a team as a code owner February 11, 2025 11:42
@paul-butcher paul-butcher merged commit 657c416 into main Feb 13, 2025
5 checks passed
@paul-butcher paul-butcher deleted the rds-config branch February 13, 2025 09:27
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