Conversation
Available PR Commands
See: https://github.com/tahminator/codebloom/wiki/CI-Commands |
Title872 PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository] -- returns Optional --> B[BackgroundTaskSqlRepository]
B -- provides Optional --> C[Scheduled Services]
C -- consumes Optional --> D[FetchAllLeetcodeQuestions]
C -- consumes Optional --> E[AddUserMetricsService]
F[BackgroundTaskRepositoryTest] -- validates Optional --> A
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository] --> B{Return Optional<BackgroundTask>};
B --> C[BackgroundTaskSqlRepository];
C -- Implements Optional returns --> D[Scheduled Tasks];
D -- Adapts to Optional --> E[Unit Tests];
E -- Verify Optional behavior --> A;
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
/deploy |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["BackgroundTaskRepository (Interface)"] --> B["BackgroundTaskSqlRepository (Implementation)"]
B --> C["FetchAllLeetcodeQuestions (Scheduled Task)"]
B --> D["AddUserMetricsService (Scheduled Task)"]
B --> E["BackgroundTaskRepositoryTest (Tests)"]
C --> F["FetchAllLeetcodeQuestionsTest (Tests)"]
D --> G["AddUserMetricsServiceTest (Tests)"]
A -- "Return Optional<BackgroundTask>" --> B
B -- "Implement Optional returns" --> C
B -- "Implement Optional returns" --> D
B -- "Implement Optional returns" --> E
C -- "Consume Optional" --> F
D -- "Consume Optional" --> G
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement, Bug fix, Tests Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository Interface] -- "Return Optional<BackgroundTask>" --> B[BackgroundTaskSqlRepository Implementation]
B -- "Provides Optional<BackgroundTask>" --> C[FetchAllLeetcodeQuestions Service]
B -- "Provides Optional<BackgroundTask>" --> D[AddUserMetricsService Service]
E[BackgroundTaskRepositoryTest] -- "Tests Optional behavior" --> A
E -- "Tests Optional behavior" --> B
|
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Api change | 1 files
| ||||||
| Enhancement | 1 files
| ||||||
| Refactoring | |||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement, Tests Description
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 4 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
RepoInterface["BackgroundTaskRepository Interface"] -- "Return Optional" --> RepoImpl["BackgroundTaskSqlRepository Implementation"]
RepoImpl -- "Implement Optional" --> Consumers["Scheduled Task Services"]
Consumers -- "Adapt to Optional" --> Tests["Unit/Integration Tests"]
Tests -- "Validate Optional Usage" --> NullSafety["Improved Null Safety"]
|
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Interface change | 1 files
| ||||||
| Implementation change | 1 files
| ||||||
| Refactoring | |||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["BackgroundTaskRepository (Interface)"]
B["BackgroundTaskSqlRepository (Implementation)"]
C["Scheduled Services (Consumers)"]
D["Unit Tests"]
A -- "API Change" --> B
B -- "Usage Update" --> C
A -- "Test Adaptation" --> D
C -- "Test Adaptation" --> D
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["BackgroundTaskRepository (Interface)"] --> B["BackgroundTaskSqlRepository (Implementation)"]
B -- "Returns Optional<BackgroundTask>" --> C["Scheduled Services (Consumers)"]
A -- "Tested by" --> D["BackgroundTaskRepositoryTest"]
C -- "Includes" --> E["FetchAllLeetcodeQuestions"]
C -- "Includes" --> F["AddUserMetricsService"]
|
| Relevant files | |||
|---|---|---|---|
| Interface change | 1 files
| ||
| Implementation change | 1 files
| ||
| Refactoring | |||
| Tests | |||
| Additional files | 1 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement, Tests Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository Interface] --> B{Update return types to Optional};
B --> C[BackgroundTaskSqlRepository Implementation];
C -- Implement Optional returns --> D[Scheduled Tasks (FetchAllLeetcodeQuestions, AddUserMetricsService)];
D -- Adapt to Optional --> E[BackgroundTaskRepositoryTest];
E -- Update assertions --> F[FetchAllLeetcodeQuestionsTest, AddUserMetricsServiceTest];
F -- Update mocks --> G[Completed Migration];
|
| Relevant files | |
|---|---|
| Enhancement | |
| Refactoring | |
| Tests |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement, Tests Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository] -- "Returns Optional<BackgroundTask>" --> B[BackgroundTaskSqlRepository]
B -- "Provides Optional<BackgroundTask>" --> C[FetchAllLeetcodeQuestions]
B -- "Provides Optional<BackgroundTask>" --> D[AddUserMetricsService]
B -- "Provides Optional<BackgroundTask>" --> E[BackgroundTaskRepositoryTest]
C -- "Consumes Optional" --> F[FetchAllLeetcodeQuestionsTest]
D -- "Consumes Optional" --> G[AddUserMetricsServiceTest]
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
BackgroundTaskRepository["BackgroundTaskRepository (Interface)"]
BackgroundTaskSqlRepository["BackgroundTaskSqlRepository (Implementation)"]
FetchAllLeetcodeQuestions["FetchAllLeetcodeQuestions (Scheduled Task)"]
AddUserMetricsService["AddUserMetricsService (Scheduled Task)"]
BackgroundTaskRepositoryTest["BackgroundTaskRepositoryTest (Unit Test)"]
BackgroundTaskRepository -- "Defines methods returning Optional" --> BackgroundTaskSqlRepository
BackgroundTaskSqlRepository -- "Implements Optional returns" --> BackgroundTaskRepository
FetchAllLeetcodeQuestions -- "Consumes Optional from Repository" --> BackgroundTaskRepository
AddUserMetricsService -- "Consumes Optional from Repository" --> BackgroundTaskRepository
BackgroundTaskRepositoryTest -- "Tests Optional handling" --> BackgroundTaskRepository
|
| Relevant files | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 4 files
| ||||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
/deploy |
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository Interface] --> B{getBackgroundTaskById, getMostRecentlyCompletedBackgroundTaskByTaskEnum};
B --> C[BackgroundTaskSqlRepository Implementation];
C -- returns Optional --> D[FetchAllLeetcodeQuestions];
C -- returns Optional --> E[AddUserMetricsService];
C -- returns Optional --> F[BackgroundTaskRepositoryTest];
D -- consumes Optional --> G[Scheduled Task Logic];
E -- consumes Optional --> H[Scheduled Task Logic];
F -- asserts Optional --> I[Test Assertions];
|
| Relevant files | |||||||
|---|---|---|---|---|---|---|---|
| Enhancement | |||||||
| Refactoring | |||||||
| Tests | 3 files
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Modified two methods inside BackgroundTaskRepository.java to use Java Optional, returning Optional.of() if non-null and replacing null returns with Optional.empty(), and updated call sites in other classes and test files, to avoid possibility of null pointer exceptions and null checks.
Modified tests to reach sonarqube code coverage
Title872: Migrate BackgroundTask to use Optional PR TypeEnhancement, Bug fix Description
Diagram Walkthroughflowchart LR
A[BackgroundTaskRepository Interface] -- "Return Optional<BackgroundTask>" --> B[BackgroundTaskSqlRepository Implementation]
B -- "Provides Optional<BackgroundTask>" --> C[FetchAllLeetcodeQuestions Scheduled Task]
B -- "Provides Optional<BackgroundTask>" --> D[AddUserMetricsService Scheduled Task]
A -- "Tested by" --> E[BackgroundTaskRepositoryTest]
C -- "Tested by" --> F[FetchAllLeetcodeQuestionsTest]
|
| Relevant files | |||
|---|---|---|---|
| Api change | 1 files
| ||
| Implementation | 1 files
| ||
| Refactoring | |||
| Tests |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
/deploy |
872
Description of changes
Migrated from using null to using Optional for BackgroundTask and related files
Checklist before review
Screenshots
Dev
n/a
Staging
n/a