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/r2dbc sourcing #20

Merged
merged 4 commits into from
Jun 19, 2024
Merged

Feat/r2dbc sourcing #20

merged 4 commits into from
Jun 19, 2024

Conversation

apoupard
Copy link
Contributor

No description provided.

Adrien added 4 commits June 12, 2024 23:28
refactor(GuardExecutor.kt): reformat verifyInitTransition and verifyTransition functions for better readability
refactor(S2AutomateExecutor.kt): update createInit and doTransition functions to use more descriptive parameter names and return types for clarity and consistency

The update to the VERSION_C2 variable in the .env_dev file ensures that the correct version is used for the C2 component. The refactoring of the GuardExecutor.kt file improves the readability of the code by reformatting the verifyInitTransition and verifyTransition functions. Similarly, the refactoring of the S2AutomateExecutor.kt file enhances clarity by updating parameter names and return types in the createInit and doTransition functions.

feat(S2AutomateExecutorImpl.kt): add support for handling AutomateSessionError and ERROR_UNKNOWN exceptions in S2AutomateExecutorImpl

The changes introduce support for handling AutomateSessionError and ERROR_UNKNOWN exceptions in the S2AutomateExecutorImpl class. This allows for better error handling and management within the automation execution process. The code now includes specific error handling logic for these exceptions, improving the robustness and reliability of the automation execution flow.

refactor(S2AutomateExecutorImpl.kt): simplify return statement using 'to' operator instead of Pair constructor
refactor(S2AutomateExecutorImpl.kt): update return type of createInit function to Flow<EVENT_OUT> for better clarity and consistency
refactor(S2AutomateExecutorImpl.kt): simplify mapping of persistContext to EVENT_OUT type
refactor(S2AutomateExecutorImpl.kt): remove unnecessary return statement in prepareCreationContext function
refactor(S2AutomateExecutorImpl.kt): remove redundant code and improve readability in prepareCreationContext function
refactor(S2AutomateExecutorImpl.kt): remove commented-out code for doTransitionFlow function
refactor(S2AutomateExecutorImpl.kt): update return type of doTransitionFlow function to Flow<EVENT_OUT> for better clarity and consistency
refactor(S2AutomateExecutorImpl.kt): refactor doTransitionFlow function to collect transition contexts and execute commands
refactor(S2AutomateExecutorImpl.kt): simplify error handling in handleException function
The changes were made to improve code readability, simplify return statements, update return types for better clarity, and refactor error handling for better maintainability and consistency.

fix(core): remove generic type parameter from AutomateSessionError class and related methods
refactor(listener): update AutomateListener and AutomateListenerAdapter to remove generic type parameter from automateSessionError method
refactor(publisher): update AutomateEventPublisher to remove generic type parameter from automateSessionError method
refactor(error): update ERROR_UNKNOWN function to include a nullable exception parameter
refactor(guard): update GuardExecutorImpl to improve readability by splitting long function parameters into multiple lines
refactor(persist): update AutomatePersister to change return type from Flow<ENTITY> to Flow<EVENT> for persistInitFlow and persistFlow methods
refactor(dsl): update s2error function to include default values for payload and cause parameters
refactor(ssm): update EventPersisterSsm to optimize persistFlow method by using flow{} builder and emitAll function
The changes were made to remove unnecessary generic type parameters from classes and methods, improve code readability by splitting long function parameters, update function signatures for consistency, and optimize the persistFlow method for better performance.

fix(s2-spring): fix return type of persistSnap method to return Pair<ENTITY, EVENT> instead of just ENTITY
refactor(s2-spring): refactor persist method to handle Flow of events and return Flow of Pair<ENTITY, EVENT>
refactor(s2-spring): refactor persistInitFlow and persistFlow methods to correctly handle saving entities and returning events
The changes were made to improve the code readability and maintainability by ensuring that the methods return the correct types and handle Flow of events appropriately. The refactoring also aims to enhance the overall functionality of persisting events and entities in the application.

fix(persister): update persistFlow method to correctly save entities and map events
fix(persister): update persistInitFlow method to return events instead of entities
fix(SsmAutomatePersister): refactor persist method to return Pair of entity and event
feat(persister): add support for saving multiple entities in persistFlow method
feat(persister): introduce zip operator to map saved entities back to events in persistFlow method
The changes were made to improve the logic of persisting data in the Spring Data Automate Persister and Reactive Persister classes. The persistFlow and persistInitFlow methods were updated to return events instead of entities. The persist method in SsmAutomatePersister was refactored to return a Pair of entity and event. Additionally, support for saving multiple entities and mapping saved entities back to events was added to the persistFlow method.

feat(OrderBookDeciderImplTest.kt): add support for kotlinx.coroutines.test.runTest to improve test reliability
refactor(OrderBookDeciderImplTest.kt): refactor test methods to use runTest instead of runBlocking for better handling of coroutines
The changes were made to enhance the reliability of the test cases by using runTest from kotlinx.coroutines.test instead of runBlocking. This change ensures better handling of coroutines in the test environment, improving the overall quality and stability of the tests.
…necessary comments, simplify doTransitionFlow method implementation

The commit removes commented-out code and unnecessary comments in the `S2AutomateExecutorImpl.kt` file. It simplifies the `doTransitionFlow` method implementation by removing redundant comments and streamlining the code for better readability and maintainability.
…ersistFlow methods to improve clarity and consistency

feat(persist methods): refactor persistInitFlow and persistFlow methods to collect and save entities in batches for improved performance and efficiency
The parameter names in the persistInitFlow and persistFlow methods have been updated to transitionContexts to improve clarity and consistency with other methods. The methods have been refactored to collect entities in batches from the transition contexts and save them in bulk to improve performance and efficiency. This change enhances the overall performance of the data persistence operations.
Copy link

sonarcloud bot commented Jun 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
15.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@apoupard apoupard merged commit ba444f4 into main Jun 19, 2024
8 of 10 checks passed
@apoupard apoupard deleted the feat/r2dbcSourcing branch June 19, 2024 07:51
@apoupard apoupard restored the feat/r2dbcSourcing branch June 19, 2024 08:12
@apoupard apoupard deleted the feat/r2dbcSourcing branch June 19, 2024 08:12
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.

1 participant