Allow for conditional warmup tasks based on IOptions#9086
Allow for conditional warmup tasks based on IOptions#9086tobias-tengler merged 4 commits intomainfrom
Conversation
d8a0baa to
be87df9
Compare
be87df9 to
65994b9
Compare
There was a problem hiding this comment.
Pull request overview
This pull request enhances warmup task registration by allowing conditional registration based on application configuration through IOptions. The skipIf parameter has been changed from a static bool to a dynamic Func<IServiceProvider, bool>? delegate across multiple warmup task registration methods.
Changes:
- Updated
AddWarmupTaskmethods to accept aFunc<IServiceProvider, bool>?instead ofboolfor theskipIfparameter, enabling runtime conditional registration based on application services - Added comprehensive XML documentation to various extension methods across ErrorFilter, Diagnostics, HttpRequestInterceptor, TransactionScope, Optimizer, Instrumentation, and Subscriptions components
- Refactored OpenAPI adapter extension files (renamed
FusionGatewayBuilderExtensions.cstoOpenApiFusionGatewayBuilderExtensions.csandRequestExecutorBuilderExtensions.cstoOpenApiRequestExecutorBuilderExtensions.cs) and addedskipIfparameter support
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| CoreFusionGatewayBuilderExtensions.Warmup.cs | Changed skipIf from bool to Func delegate; updated XML docs |
| HotChocolateAspNetCoreServiceCollectionExtensions.Warmup.cs | Changed skipIf from bool to Func delegate; adapted ExportSchemaOnStartup |
| CoreFusionGatewayBuilderExtensions.ErrorFilter.cs | Added XML documentation for error filter methods |
| CoreFusionGatewayBuilderExtensions.Diagnostics.cs | Added remarks about service provider scope |
| AspNetCoreFusionGatewayBuilderExtensions.HttpRequestInterceptor.cs | Added XML documentation for HTTP interceptor methods |
| RequestExecutorBuilderExtensions.TransactionScope.cs | Added remarks about service provider scope |
| RequestExecutorBuilderExtensions.Optimizer.cs | Added XML documentation for optimizer methods |
| RequestExecutorBuilderExtensions.Instrumentation.cs | Added XML documentation for diagnostic listeners |
| RequestExecutorBuilderExtensions.ErrorFilter.cs | Added XML documentation for error filter methods |
| HotChocolateAspNetCoreServiceCollectionExtensions.Subscriptions.cs | Added remarks about service provider scope |
| HotChocolateAspNetCoreServiceCollectionExtensions.Http.cs | Added remarks about service provider scope |
| OpenApiFusionGatewayBuilderExtensions.cs | New file (renamed), added skipIf support to OpenAPI storage methods |
| FusionGatewayBuilderExtensions.cs | Deleted (renamed to OpenApiFusionGatewayBuilderExtensions.cs) |
| OpenApiRequestExecutorBuilderExtensions.cs | New file (renamed), added skipIf support to OpenAPI storage methods |
| RequestExecutorBuilderExtensions.cs | Deleted (renamed to OpenApiRequestExecutorBuilderExtensions.cs) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// <exception cref="ArgumentNullException"> | ||
| /// The <paramref name="skipIf"/> is <c>null</c>. | ||
| /// </exception> |
There was a problem hiding this comment.
The exception documentation states "The skipIf is null" but skipIf is now nullable and can be null without throwing an exception. This documentation is incorrect and should be removed.
| /// <exception cref="ArgumentNullException"> | |
| /// The <paramref name="skipIf"/> is <c>null</c>. | |
| /// </exception> |
🚀 Fusion Gateway Performance ResultsSimple Composite QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
}
}
}
}Deep Recursion QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
users {
...User
reviews {
...Review
product {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}
}
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}Variable Batching ThroughputConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query query TestQuery_8f7a46ce_2(
$__fusion_1_upc: ID!
$__fusion_2_price: Long!
$__fusion_2_weight: Long!
) {
productByUpc(upc: $__fusion_1_upc) {
inStock
shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
}
}Variables (5 sets batched in single request) [
{ "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
{ "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
{ "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]No baseline data available for comparison. Run 21677628184 • Commit bf81223 • Wed, 04 Feb 2026 15:51:43 GMT |
🚀 Fusion Gateway Performance ResultsSimple Composite QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
}
}
}
}Deep Recursion QueryConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query fragment User on User {
id
username
name
}
fragment Review on Review {
id
body
}
fragment Product on Product {
inStock
name
price
shippingEstimate
upc
weight
}
query TestQuery {
users {
...User
reviews {
...Review
product {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}
}
topProducts(first: 5) {
...Product
reviews {
...Review
author {
...User
reviews {
...Review
product {
...Product
}
}
}
}
}
}Variable Batching ThroughputConstant Load (50 VUs)
📊 Response Time Metrics
Ramping Load (0→50→500→50 VUs)
📊 Response Time Metrics
Executed Query query TestQuery_8f7a46ce_2(
$__fusion_1_upc: ID!
$__fusion_2_price: Long!
$__fusion_2_weight: Long!
) {
productByUpc(upc: $__fusion_1_upc) {
inStock
shippingEstimate(weight: $__fusion_2_weight, price: $__fusion_2_price)
}
}Variables (5 sets batched in single request) [
{ "__fusion_1_upc": "1", "__fusion_2_price": 899, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "2", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 },
{ "__fusion_1_upc": "3", "__fusion_2_price": 15, "__fusion_2_weight": 20 },
{ "__fusion_1_upc": "4", "__fusion_2_price": 499, "__fusion_2_weight": 100 },
{ "__fusion_1_upc": "5", "__fusion_2_price": 1299, "__fusion_2_weight": 1000 }
]No baseline data available for comparison. Run 21678821843 • Commit d0c8388 • Wed, 04 Feb 2026 16:25:01 GMT |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9086 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.