Conversation
Include default and database-specific exception detectors (MySQL, PostgreSQL, SQLite, SQL Server). Introduce rescheduling logic for transient failures and register related configurations.
Include tests for transient exception detection and integrate solution structure updates.
Migrated transient exception detection logic from scheduling module to a new shared resilience module. Updated services, jobs, and features to utilize the centralized `ITransientExceptionDetectionService`. This change improves maintainability and promotes reusability across modules.
…exception detection
There was a problem hiding this comment.
Pull request overview
This pull request enhances the Quartz.NET scheduling module by adding resilience capabilities for handling transient exceptions. It updates Elsa to version 3.7.0-preview.4150 and integrates the shared resilience module to detect and handle transient failures in scheduled jobs.
Key Changes
- Integrated Elsa.Resilience.Core module for transient exception detection in Quartz jobs
- Added configurable retry mechanism with delay options (QuartzJobOptions)
- Enhanced RunWorkflowJob and ResumeWorkflowJob with transient exception handling and automatic rescheduling
- Added comprehensive unit and component tests for retry behavior
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/modules/scheduling/Elsa.Scheduling.Quartz/Jobs/RunWorkflowJob.cs |
Added transient exception detection and automatic job rescheduling on transient failures |
src/modules/scheduling/Elsa.Scheduling.Quartz/Jobs/ResumeWorkflowJob.cs |
Added transient exception handling with retry logic and error logging |
src/modules/scheduling/Elsa.Scheduling.Quartz/Features/QuartzSchedulerFeature.cs |
Added configuration method for QuartzJobOptions |
src/modules/scheduling/Elsa.Scheduling.Quartz/Options/QuartzJobOptions.cs |
New options class for configuring transient retry delay |
src/modules/scheduling/Elsa.Scheduling.Quartz/Extensions/QuartzJobExtensions.cs |
New extension method for rescheduling jobs after transient failures |
test/modules/scheduling/Elsa.Scheduling.Quartz.UnitTests/* |
Comprehensive unit tests for job execution scenarios including transient and non-transient exception handling |
test/modules/scheduling/Elsa.Scheduling.Quartz.ComponentTests/* |
Component tests validating retry behavior and exception detection |
Directory.Build.props |
Updated Elsa version to 3.7.0-preview.4150 |
Directory.Packages.props |
Added Elsa.Resilience.Core package reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/modules/scheduling/Elsa.Scheduling.Quartz.ComponentTests/Abstractions/AppComponentTest.cs
Show resolved
Hide resolved
test/modules/scheduling/Elsa.Scheduling.Quartz.ComponentTests/QuartzJobTransientRetryTests.cs
Outdated
Show resolved
Hide resolved
…tion and rename related methods and properties
…try logic instead of `IOptions<QuartzJobOptions>`.
… logic instead of `IOptions<QuartzJobOptions>`.
…ameterize transient exception retry scenarios.
…eption scenarios; replace `IOptions<QuartzJobOptions>` with `IQuartzJobRetryScheduler` mock.
…ions<QuartzJobOptions>` with `IQuartzJobRetryScheduler` mock; update job initialization and workflow starter setup.
…JobRetryScheduler`.
…add unit tests for retry scheduling logic.
|
@sfmskywalker I've opened a new pull request, #105, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@sfmskywalker I've opened a new pull request, #106, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
…ests The test now explicitly separates two scenarios: - Transient exceptions: test Execute() directly without scheduling - Non-transient exceptions: schedule job to verify deletion behavior This clarifies that we're testing the job Execute logic directly with test doubles, while only scheduling when needed to verify scheduler interactions. Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Fix resource leak in AppComponentTest by disposing service scope
Refactor QuartzJobTransientRetryTests to use manual job instances consistently
Updates Elsa to version 3.7.0-preview.4150 and refactors transient exception handling using the shared resilience module.
3.7.0-preview.4150.Elsa.Resilience.Corepackage reference.