Simplify interface to database module #156
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
Resolves navapbc/template-infra#752
Contributes to navapbc/template-infra#726
Changes
Benefits of this approach is that it:
Context for reviewers
See description in changes, but this is a new architectural design I've been discussing with @rocketnova last year that was born out of an idea by @sonicos . I think it solves a couple of problems at once. In addition to simplifying data source access it also helps address the problem stated in navapbc/template-infra#726.
This is purely a refactor PR, there are no functional changes.
Testing
Running
![image](https://private-user-images.githubusercontent.com/447859/404074011-3b2448f2-d71b-4260-a76a-5c75c3ff3db7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzk2MzgsIm5iZiI6MTczOTM3OTMzOCwicGF0aCI6Ii80NDc4NTkvNDA0MDc0MDExLTNiMjQ0OGYyLWQ3MWItNDI2MC1hNzZhLTVjNzVjM2ZmM2RiNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxNjU1MzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMWQxOWE5NjhlMzFiYzhiZWY0MWEzMWI1YTU0OTk3ZmIwOGE3MmFlYzcwYzg5ODc2M2E1MThlNmQwYWM2MGM0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ryWrTAiLuQ28RP7tdPoQ_noFlTFuo86zbeSPEgFamMI)
make infra-update-app-database APP_NAME=app ENVIRONMENT=dev
only no diff except for a last_modified timestamp on a file due to moving the database module from /modules/database to /modules/database/resourcesRunning
![image](https://private-user-images.githubusercontent.com/447859/404075688-58522c81-8101-4b6d-be47-b87b13e1e3b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzk2MzgsIm5iZiI6MTczOTM3OTMzOCwicGF0aCI6Ii80NDc4NTkvNDA0MDc1Njg4LTU4NTIyYzgxLTgxMDEtNGI2ZC1iZTQ3LWI4N2IxM2UxZTNiMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxNjU1MzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYzg3YmUyMjVmZmNlNzA3NWIyNDBhZmE2NmM2ODM1M2Y3NWJkYmM2YzkwODg1YTFiNDEyNjBiNzFjMDZlNjY4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.3ONoxAmvmkvZJHxr0zs8trSoOBzIj0QO22wOMT5wy_o)
make infra-update-app-service
shows no changesPreview environment
♻️ Environment destroyed ♻️