General Polish - #39
Conversation
The `Immediate.Jobs.Aspire.Api` assembly name generated the unwieldy `AddImmediateJobsAspireApiJobs`, which makes the sample a natural place to show the escape hatch rather than a reason to tolerate the name.
Only 13 of 75 throws carried an `IJOB0xx:` prefix, all of them from the batches feature, so the codes read as a scheme that covers 8% of the runtime exceptions. Worse, they shared the `IJOB` prefix and numeric space with the analyzer diagnostics, leaving `IJOB020` and `IJOB0020` a zero apart and meaning different things. The messages keep their wording and lose the prefix, so `IJOB` now means a compile-time diagnostic and nothing else. No test asserted on the codes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
📝 WalkthroughWalkthroughThe change aligns grouped scheduler overloads and call sites, replaces legacy runtime diagnostic prefixes, updates diagnostic documentation, and migrates documentation and samples to application-specific handler and job registration APIs. ChangesAPI and diagnostics
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai rate limit |
|
Your plan includes PR reviews subject to rate limits. Reviews are available now. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Pull request overview
This PR focuses on API and documentation “polish” around scheduler overloads, registration ergonomics, and validation messaging across storage adapters.
Changes:
- Reordered grouped enqueue/scheduling overloads to place
groupIdbeforeCancellationToken, and updated tests/docs/samples accordingly. - Refined
ImmediateJobExceptionruntime messages for batch/continuation validation (including removing embeddedIJOB…codes from messages). - Updated registration guidance and samples to use generated
Add{Assembly}Jobs()/Add{Assembly}Handlers()patterns and clarify assembly naming.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Immediate.Jobs.FunctionalTests/Packages/TestingPackageTests.cs | Updates enqueue calls to use named arguments with the new grouped overload parameter order. |
| tests/Immediate.Jobs.FunctionalTests/Packages/NodaTimeTests.cs | Updates NodaTime scheduling calls to match the reordered grouped overloads. |
| src/Immediate.Jobs.Testing/CaptureOnlyJobScheduler.cs | Aligns testing scheduler overload signatures and forwarding calls with the new parameter order. |
| src/Immediate.Jobs.Shared/JobSchedulers.cs | Reorders grouped overload parameters in the shared scheduler contract and updates internal forwarding; adjusts several runtime exception messages. |
| src/Immediate.Jobs.Shared/JobBatches.cs | Updates batch validation exception messages (removing embedded IJOB codes). |
| src/Immediate.Jobs.Shared/InMemoryJobStorage.cs | Updates in-memory storage validation exception messages (removing embedded IJOB codes). |
| src/Immediate.Jobs.NodaTime/NodaTimeJobSchedulerExtensions.cs | Reorders NodaTime extension overload parameters and updates forwarding calls. |
| src/Immediate.Jobs.LinqToDB/LinqToDBJobStorage.cs | Updates LinqToDB storage validation exception messages (removing embedded IJOB codes). |
| src/Immediate.Jobs.EntityFrameworkCore/EntityFrameworkCoreJobStorage.cs | Updates EF Core storage validation exception messages (removing embedded IJOB codes). |
| samples/NativeAot/Program.cs | Adds generated handlers registration for the NativeAOT sample. |
| samples/Basic/Program.cs | Adds generated handlers registration for the Basic sample. |
| samples/Aspire/Api/Program.cs | Adds assembly identifier + generated handlers registration; updates jobs registration method name. |
| samples/Aspire/Api/Endpoints/SampleApiEndpoints.cs | Updates grouped enqueue calls to use named arguments with the new parameter order. |
| readme.md | Updates examples and diagnostics documentation; adds clarification on generated registrations. |
| docs/storage-capabilities.md | Updates registration examples to use AddMyAppJobs() naming. |
| docs/fair-queues.md | Updates grouped overload signature and examples to reflect new argument order and registration naming. |
| docs/batches-and-continuations.md | Updates diagnostic IDs and narrative around batch/continuation diagnostics and runtime guards. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
API Improvements
Documentation
Error Handling