feat: Improve inbox and outbox#3659
Conversation
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Lines of Code in a Single File, Number of Functions in a Single Module)
Enforce advisory code health rules
(2 files with Lines of Code in a Single File, Number of Functions in a Single Module, Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| RelationDatabaseOutbox.cs | 2 rules in this hotspot | 6.90 → 7.11 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| RelationalDatabaseInbox.cs | 1 advisory rule | 8.55 → 8.03 | Suppress |
| RelationDatabaseOutbox.cs | 2 advisory rules | 6.90 → 7.11 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| MsSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MySqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| PostgreSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| SqliteInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MsSqlOutbox.cs | 6.81 → 10.00 | Low Cohesion, Code Duplication, Complex Method |
| MySqlOutbox.cs | 9.39 → 10.00 | Code Duplication |
| PostgreSqlOutbox.cs | 7.74 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| SqliteOutbox.cs | 7.80 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| RelationDatabaseOutbox.cs | 6.90 → 7.11 | Low Cohesion |
| RelationalDatabaseInbox.cs | 8.55 → 8.03 | Primitive Obsession |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| using System.Collections.Generic; | ||
| using System.Data; | ||
| using System.Data.Common; | ||
| using System.IO; |
There was a problem hiding this comment.
❌ New issue: Lines of Code in a Single File
This module has 1285 lines of code, improve code health by reducing it to 1000
| using System.Collections.Generic; | ||
| using System.Data; | ||
| using System.Data.Common; | ||
| using System.IO; |
There was a problem hiding this comment.
❌ New issue: Number of Functions in a Single Module
This module has 78 functions, threshold = 75
| using System.Data; | ||
| using System.Data.Common; | ||
| using System.Linq; | ||
| using System.Text.Json; |
There was a problem hiding this comment.
❌ Getting worse: Code Duplication
introduced similar code in: MapBoolFunction,MapBoolFunctionAsync,MapBoolFunctionAsync
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Lines of Code in a Single File, Number of Functions in a Single Module)
Enforce advisory code health rules
(2 files with Lines of Code in a Single File, Number of Functions in a Single Module, Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| RelationDatabaseOutbox.cs | 2 rules in this hotspot | 6.90 → 7.11 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| RelationalDatabaseInbox.cs | 1 advisory rule | 8.55 → 8.03 | Suppress |
| RelationDatabaseOutbox.cs | 2 advisory rules | 6.90 → 7.11 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| MsSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MySqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| PostgreSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| SqliteInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MsSqlOutbox.cs | 6.81 → 10.00 | Low Cohesion, Code Duplication, Complex Method |
| MySqlOutbox.cs | 9.39 → 10.00 | Code Duplication |
| PostgreSqlOutbox.cs | 7.74 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| SqliteOutbox.cs | 7.80 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| RelationDatabaseOutbox.cs | 6.90 → 7.11 | Low Cohesion |
| RelationalDatabaseInbox.cs | 8.55 → 8.03 | Primitive Obsession |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
# Conflicts: # src/Paramore.Brighter.Inbox.MsSql/MsSqlInbox.cs # src/Paramore.Brighter.Inbox.MySql/MySqlInbox.cs # src/Paramore.Brighter.Inbox.Postgres/Paramore.Brighter.Inbox.Postgres.csproj # src/Paramore.Brighter.Inbox.Postgres/PostgreSqlInbox.cs # src/Paramore.Brighter.Inbox.Sqlite/SqliteInbox.cs # src/Paramore.Brighter.Outbox.MySql/MySqlOutbox.cs
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Lines of Code in a Single File, Number of Functions in a Single Module)
Enforce advisory code health rules
(2 files with Lines of Code in a Single File, Number of Functions in a Single Module, Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| RelationDatabaseOutbox.cs | 2 rules in this hotspot | 6.90 → 7.11 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| RelationalDatabaseInbox.cs | 1 advisory rule | 8.55 → 8.03 | Suppress |
| RelationDatabaseOutbox.cs | 2 advisory rules | 6.90 → 7.11 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| MsSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MySqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| PostgreSqlInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| SqliteInbox.cs | 9.10 → 10.00 | Code Duplication, Primitive Obsession |
| MsSqlOutbox.cs | 6.81 → 10.00 | Low Cohesion, Code Duplication, Complex Method |
| MySqlOutbox.cs | 9.39 → 10.00 | Code Duplication |
| PostgreSqlOutbox.cs | 7.74 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| SqliteOutbox.cs | 7.80 → 10.00 | Low Cohesion, Code Duplication, Large Method |
| RelationDatabaseOutbox.cs | 6.90 → 7.11 | Low Cohesion |
| RelationalDatabaseInbox.cs | 8.55 → 8.03 | Primitive Obsession |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
* feat: Improve inbox and outbox * fix: MySQL tests * fix: MSSQL unit test --------- Co-authored-by: Ian Cooper <ian_hammond_cooper@yahoo.co.uk>
During my implementation of GCP Spanner, I saw that Inbox and Outbox pattern have a lot code duplicated between provider, in this PR I'm moving the duplicated code to the base class (allowing those method to be override if necessary) and fix URI issue
Fix: #3653