You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Refactor sequential tests
Separate sequential state manager tests so that each test runs independently (does not depend on outcome of previous test to pass)
Sequential test can create extra work by linking multiple functions together
2. Mock Database Calls / Separate Unit Tests from Integration Tests
Known issue with Test Containers / Docker / Jenkins prevents running our current test suite in our pipelines for code change validation
Duplicate existing test files and convert to mocked unit tests where applicable
function wrapper with dependencies, init services once, return object with functions
Replace current usage of getDbInstance and service(db)
4. Review shared DB transactions in stateManager
StateManager creates Action Records and also updates Application State values in the DB. This is done using a single database transaction, preventing issues that arise if one action succeeds but the other fails.
Confirm if the current approach (using transactions in StateManager to call separate service methods) works fine, or if this should be refactored so that a transaction is passed as an argument to the services.
5. Synchronize Zod / Schema / Shared Types
Due to issues with Drizzle pgEnum there is a disconnect between Schema definitions and the shared Types package that is leading to duplicate type definitions. See discussion: https://github.com/Pan-Canadian-Genome-Library/daco/pull/174/files#r1932806224
With Zod added we should be able to resolve this and create shared definitions that are usable for both the front end and back end (when keys etc are all the same, still a need for some camelCase DTO definitions vs snake_case DB Model definitions )
The text was updated successfully, but these errors were encountered:
Somewhat related, but as a stop-gap measure while we wait for automated integration testing, we should update the PR template to require a screenshot of the test suite passing
Several updates which rose out of work related to: https://github.com/orgs/Pan-Canadian-Genome-Library/projects/1/views/1?pane=issue&itemId=85081519&issue=Pan-Canadian-Genome-Library%7Cdaco%7C3
and will facilitate future development on the API
Potentially worth breaking into multiple tickets
1. Refactor sequential tests
Separate sequential state manager tests so that each test runs independently (does not depend on outcome of previous test to pass)
Sequential test can create extra work by linking multiple functions together
See: #153
2. Mock Database Calls / Separate Unit Tests from Integration Tests
Known issue with Test Containers / Docker / Jenkins prevents running our current test suite in our pipelines for code change validation
Duplicate existing test files and convert to mocked unit tests where applicable
Relates to: https://github.com/orgs/Pan-Canadian-Genome-Library/projects/1/views/1?pane=issue&itemId=94825563&issue=Pan-Canadian-Genome-Library%7Cdaco%7C170
3. Refactor Service layer dependency injection
Create central dependency injection following example here: https://github.com/overture-stack/lyric/blob/main/packages/data-provider/src/core/provider.ts
function wrapper with dependencies, init services once, return object with functions
Replace current usage of
getDbInstance
andservice(db)
4. Review shared DB transactions in stateManager
StateManager creates Action Records and also updates Application State values in the DB. This is done using a single database transaction, preventing issues that arise if one action succeeds but the other fails.
Confirm if the current approach (using transactions in StateManager to call separate service methods) works fine, or if this should be refactored so that a transaction is passed as an argument to the services.
5. Synchronize Zod / Schema / Shared Types
Due to issues with Drizzle pgEnum there is a disconnect between Schema definitions and the shared Types package that is leading to duplicate type definitions. See discussion:
https://github.com/Pan-Canadian-Genome-Library/daco/pull/174/files#r1932806224
With Zod added we should be able to resolve this and create shared definitions that are usable for both the front end and back end (when keys etc are all the same, still a need for some camelCase DTO definitions vs snake_case DB Model definitions )
The text was updated successfully, but these errors were encountered: