Skip to content

Allow for conditional warmup tasks based on IOptions#9086

Merged
tobias-tengler merged 4 commits intomainfrom
tte/conditional-warmup-tasks
Feb 4, 2026
Merged

Allow for conditional warmup tasks based on IOptions#9086
tobias-tengler merged 4 commits intomainfrom
tte/conditional-warmup-tasks

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

@tobias-tengler tobias-tengler force-pushed the tte/conditional-warmup-tasks branch from d8a0baa to be87df9 Compare February 4, 2026 15:31
@tobias-tengler tobias-tengler marked this pull request as ready for review February 4, 2026 15:31
Copilot AI review requested due to automatic review settings February 4, 2026 15:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AddWarmupTask methods to accept a Func<IServiceProvider, bool>? instead of bool for the skipIf parameter, 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.cs to OpenApiFusionGatewayBuilderExtensions.cs and RequestExecutorBuilderExtensions.cs to OpenApiRequestExecutorBuilderExtensions.cs) and added skipIf parameter 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.

Comment on lines +162 to +164
/// <exception cref="ArgumentNullException">
/// The <paramref name="skipIf"/> is <c>null</c>.
/// </exception>
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
/// <exception cref="ArgumentNullException">
/// The <paramref name="skipIf"/> is <c>null</c>.
/// </exception>

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5795.57 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.80ms 7.08ms 161.97ms 8.47ms 13.49ms 19.16ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4503.50 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.86ms 38.80ms 252.11ms 49.40ms 110.93ms 127.88ms

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 Query

Constant Load (50 VUs)

Requests/sec Error Rate
267.41 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.68ms 174.77ms 618.49ms 181.41ms 227.76ms 255.25ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
305.23 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.04ms 680.06ms 1754.60ms 692.62ms 1364.89ms 1478.56ms

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 Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
24005.64 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.68ms 49.30ms 2.03ms 3.88ms 4.74ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
19027.62 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 9.14ms 99.78ms 11.15ms 23.18ms 27.91ms

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

@tobias-tengler tobias-tengler merged commit 76a85fd into main Feb 4, 2026
117 checks passed
@tobias-tengler tobias-tengler deleted the tte/conditional-warmup-tasks branch February 4, 2026 16:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

🚀 Fusion Gateway Performance Results

Simple Composite Query

Constant Load (50 VUs)

Requests/sec Error Rate
5830.26 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.77ms 7.09ms 164.08ms 8.42ms 13.11ms 18.82ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
4613.03 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.71ms 38.65ms 252.28ms 48.05ms 106.35ms 124.98ms

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 Query

Constant Load (50 VUs)

Requests/sec Error Rate
267.59 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
12.91ms 174.57ms 698.67ms 181.15ms 226.10ms 250.79ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
309.18 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
3.13ms 661.12ms 1692.90ms 684.69ms 1388.54ms 1477.59ms

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 Throughput

Constant Load (50 VUs)

Requests/sec Error Rate
24054.26 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.09ms 1.67ms 42.29ms 2.03ms 3.87ms 4.74ms

Ramping Load (0→50→500→50 VUs)

Requests/sec Error Rate
18987.10 req/s 0.00%
📊 Response Time Metrics
Min Med Max Avg P90 P95
0.10ms 9.10ms 98.41ms 11.11ms 22.90ms 27.62ms

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
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (5d9ec73) to head (8984f78).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9086   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants