- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 799
Re-add IRequestExecutorOptionsMonitor #8846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 PR re-adds the IRequestExecutorOptionsMonitor interface as a synchronous abstraction layer over the existing IOptionsMonitor<RequestExecutorSetup>, needed for Nitro. The implementation includes a default adapter and comprehensive test coverage.
Key Changes:
- Introduces IRequestExecutorOptionsMonitorinterface withGetandOnChangemethods
- Adds DefaultRequestExecutorOptionsMonitoras an adapter aroundIOptionsMonitor<RequestExecutorSetup>
- Replaces direct IOptionsMonitor<RequestExecutorSetup>usage with the new abstraction throughout the codebase
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| IRequestExecutorOptionsMonitor.cs | Defines the new monitor interface for RequestExecutorSetup change notifications | 
| DefaultRequestExecutorOptionsMonitor.cs | Implements the default monitor that wraps IOptionsMonitor | 
| InternalServiceCollectionExtensions.cs | Registers the default monitor implementation in DI | 
| RequestExecutorManager.cs | Updated to use IRequestExecutorOptionsMonitor and subscribe to changes | 
| RequestExecutorBuilderExtensions.Caches.cs | Updated to use the new monitor interface | 
| RequestExecutorWarmupService.cs | Updated to use the new monitor interface | 
| RequestExecutorOptionsMonitorTests.cs | Comprehensive tests for the monitor functionality | 
| IConfigureRequestExecutorSetup.cs | Removed unused interface | 
| ConfigureRequestExecutorSetup.cs | Removed unused implementation | 
| RequestExecutorServiceCollectionExtensions.cs | Added call to register the monitor | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
        
          
                src/HotChocolate/Core/src/Execution/Configuration/DefaultRequestExecutorOptionsMonitor.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/HotChocolate/Core/test/Execution.Tests/Configuration/RequestExecutorOptionsMonitorTests.cs
          
            Show resolved
            Hide resolved
        
      | 🚀 Performance Test Results📊 Response TimeCurrent
 Baseline
 Change vs Baseline
 ⚡ Throughput
 🎯 Reliability
 🔍 AnalysisRun 18783770312 • Commit ae85bcf • Fri, 24 Oct 2025 15:09:58 GMT | 
7589f3d    to
    d004eda      
    Compare
  
    | 🚀 Performance Test Results📊 Response TimeCurrent
 Baseline
 Change vs Baseline
 ⚡ Throughput
 🎯 Reliability
 🔍 Analysis✅ No significant performance regression detected Run 18783983367 • Commit 5d9c2fe • Fri, 24 Oct 2025 15:17:28 GMT | 
I removed this in #8793 after discussion with Michael, since there weren't any usages.
Turns out Nitro is still using it, so I'm re-adding a slightly modified and less bulky version of it. With tests, since it didn't have any before...