-
Notifications
You must be signed in to change notification settings - Fork 1
fix(ci): fix flaky test and docs build failure #31
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
Conversation
…le in CI - Use Interlocked.Increment for thread-safe counter - Increase initial delay to 200ms to allow watcher to fully initialize - Use WaitForConditionAsync polling instead of fixed delay - Improve assertion message for better diagnostics - Add clarifying comments in TriggerReload method
- Use EF Core 8.0.11 for net8.0 - Use EF Core 9.0.0 for net9.0 - Use EF Core 10.0.1 for net10.0 This fixes the docfx build failure where EF Core 10.0.1 was being used for all target frameworks, but it only supports .NET 10.
…erver - Use EF Core 8.0.11 for net8.0 - Use EF Core 9.0.0 for net9.0 - Use EF Core 10.0.1 for net10.0 This fixes the same docfx build issue in the DataPlane.SqlServer project.
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 fixes a flaky test Hot_reload_ignores_invalid_configuration that was failing intermittently in CI due to race conditions and unreliable fixed delays. The fix applies thread-safe counting and polling-based waiting instead of fixed delays.
Key changes:
- Thread-safe callback counting using
Interlocked.Increment - Polling approach to detect callback invocation with configurable timeout
- Improved assertion messages for better diagnostics
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/ExperimentFramework.Tests/Configuration/ConfigurationFileWatcherTests.cs | Updated test to use thread-safe counter increment, increased initialization delay, and replaced fixed delays with polling approach for more reliable test execution in CI |
| src/ExperimentFramework.Configuration/ServiceCollectionExtensions.cs | Added clarifying comments documenting that callbacks are not invoked for invalid configurations or when reload fails |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/ExperimentFramework.Tests/Configuration/ConfigurationFileWatcherTests.cs
Show resolved
Hide resolved
Code Coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
=======================================
Coverage ? 83.23%
=======================================
Files ? 184
Lines ? 6860
Branches ? 1164
=======================================
Hits ? 5710
Misses ? 1150
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
This PR fixes two CI build failures:
Hot_reload_ignores_invalid_configurationChanges
Test Reliability Fix
Interlocked.Incrementfor thread-safe counter incrementWaitForConditionAsyncpolling (2-second timeout)TriggerReloadmethodDocs Build Fix
ExperimentFramework.Governance.Persistence.Sqlto use framework-specific EF Core versions:ExperimentFramework.DataPlane.SqlServerwith the same patternWhy This Fixes the Issues
Test Fix
The test was using fixed delays which are unreliable in CI environments where file system operations can be slower. The polling approach:
Docs Fix
DocFX was failing during restore because it tried to use EF Core 10.0.1 for .NET 8 and .NET 9 targets, which is not compatible. By using conditional package references, each target framework now gets the appropriate EF Core version.
Test Results