Repository navigation
[KAN-382] Fix Transaction Propagation in ExcursionReviewRepository - #147
huytran2005 wants to merge 4 commits into
Conversation
…ES_NEW) from ExcursionReviewRepository.save Refactored ExcursionReviewService to use a dedicated ExcursionReviewItemWriter component to isolate transactions for duplicate/constraint violation resilience without modifying the transaction semantics of the Spring Data JPA repository. Added tests to verify changes. Co-authored-by: huytran2005 <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…Test Removed `@Transactional(propagation = Propagation.REQUIRES_NEW)` from `ExcursionReviewRepository.save` in `cruise-activity-service` and moved isolation logic to a dedicated `ExcursionReviewItemWriter`. Additionally, specified `columnDefinition = "bytea"` for `fileData` (which is a byte array mapped as `@Lob`) on `ReportExportJob` in `cruise-pos-service` because H2 in PostgreSQL mode does not recognize "blob" appropriately and throws an unknown data type error when running tests that try to create `pos_report_export_jobs`. Co-authored-by: huytran2005 <[email protected]>
Fixed CI by setting Java version from '25' to '21' as Java 21 LTS is used. Also removed `@Transactional(propagation = Propagation.REQUIRES_NEW)` from `ExcursionReviewRepository.save` in `cruise-activity-service` and moved isolation logic to a dedicated `ExcursionReviewItemWriter`. Additionally, specified `columnDefinition = "bytea"` for `fileData` (which is a byte array mapped as `@Lob`) on `ReportExportJob` in `cruise-pos-service` because H2 in PostgreSQL mode does not recognize "blob" appropriately and throws an unknown data type error when running tests that try to create `pos_report_export_jobs`. Co-authored-by: huytran2005 <[email protected]>
…lugin Fixed CI by setting Java version from '25' to '21' as Java 21 LTS is used. Downgraded `sonar-maven-plugin` to `4.0.0.4121` because version `5.8.0.7211` has a known issue where it attempts to query JRE metadata from SonarCloud (`https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64`) and receives a 403 Forbidden error, causing the CI pipeline to fail during the SonarCloud analysis phase. Also removed `@Transactional(propagation = Propagation.REQUIRES_NEW)` from `ExcursionReviewRepository.save` in `cruise-activity-service` and moved isolation logic to a dedicated `ExcursionReviewItemWriter`. Additionally, specified `columnDefinition = "bytea"` for `fileData` (which is a byte array mapped as `@Lob`) on `ReportExportJob` in `cruise-pos-service` because H2 in PostgreSQL mode does not recognize "blob" appropriately and throws an unknown data type error when running tests that try to create `pos_report_export_jobs`. Co-authored-by: huytran2005 <[email protected]>
|
Closing redundant draft PR created by automated bot. |
Fixes a transaction anti-pattern where a Spring Data repository method had
@Transactional(propagation = Propagation.REQUIRES_NEW), forcing all saves to create new transactions. Instead, this moves the isolation logic to a dedicated writer component called specifically by the service during idempotent save attempts.PR created automatically by Jules for task 18206693641074511826 started by @huytran2005