When a type's assembly contains an ABP module but is not part of the
module dependency chain, Autofac's property injection is silently
skipped. This causes LazyServiceProvider and other injected properties
to remain null, leading to NullReferenceException at runtime.
This change detects the misconfiguration at startup and logs a warning
with the affected assembly name, module type, and a fix suggestion.
- Upgrade Autofac from 8.4.0 to 9.1.0
- Upgrade Autofac.Extensions.DependencyInjection from 10.0.0 to 11.0.0
- Upgrade Microsoft.Bcl.AsyncInterfaces from 10.0.2 to 10.0.4
- Remove AnyKeyRegistrationSource (now native in Autofac 9.1.0)
- Add MSDI KeyedService.AnyKey to Autofac KeyedService.AnyKey translation
- Use Parameters.KeyedServiceKey<object>() for keyed factory key retrieval
- Add ExternallyOwned() to instance registrations
- Add unit tests for keyed services and AnyKey support
* Fix stdout/stderr deadlock in CmdHelper.RunCmdAndGetOutput
Read stdout and stderr concurrently to prevent pipe buffer deadlock.
The sequential ReadToEnd() calls caused a hang when child processes
(e.g. dotnet build) produced enough stderr output to fill the OS
pipe buffer (~4KB on Windows), since the parent blocked on stdout
while the child blocked on stderr.
Made-with: Cursor
* Simplify Task.WhenAll result handling per review
Made-with: Cursor
* Add test for CmdHelper to prevent stdout/stderr deadlock
* Reduce timeout in deadlock test for CmdHelper to 10 seconds
---------
Co-authored-by: maliming <malimings@gmail.com>
- Remove "Unknown event name" exception from all providers and LocalEventBus
to match typed PublishAsync behavior (no handler = silent, not exception)
- Use ABP's IJsonSerializer instead of System.Text.Json for ConvertDynamicEventData
to respect configured JSON serialization options
- Fix reflection method lookup in DefaultDynamicBackgroundJobManager to match by parameter types
- Add StopAllAsync to IDynamicBackgroundWorkerManager interface and all implementations
- Add semaphore locking to StopAllAsync in DefaultDynamicBackgroundWorkerManager with volatile _isDisposed
- Fix HangfireDynamicBackgroundWorkerManager.GetCron to match existing HangfireBackgroundWorkerManager format
- Fix QuartzDynamicBackgroundWorkerManager.UpdateScheduleAsync to reuse BuildTrigger method
- Fix TickerQDynamicBackgroundWorkerManager.IsRegistered to throw AbpException (consistent with other methods)
- Add GetAllNames and Clear to IDynamicBackgroundWorkerHandlerRegistry
- Call StopAllAsync in AbpBackgroundWorkersModule.OnApplicationShutdownAsync
- Move DynamicBackgroundWorkerManager_Tests to correct namespace/directory
- Fix singleton state pollution in BackgroundJobManager_Tests
- Update docs to warn about handler loss after restart for dynamic jobs and workers
Add SemaphoreSlim to DefaultDynamicBackgroundWorkerManager to protect
AddAsync/RemoveAsync/UpdateScheduleAsync from concurrent access on the
same worker name. Add 3 concurrency test cases covering concurrent
same-name add, concurrent add+remove, and concurrent mixed operations.
Extract override method resolution logic into a reusable GetEffectiveMethodInfo helper to avoid duplication.
Use the resolved override method in ValidateActionArgumentsAsync so that IMethodInvocationValidator validates
against the concrete method on the controller type, not the base method from ActionDescriptor.
Remove unused imports in FluentValidationTestAppService_Tests.
When Application Services are registered via ConventionalControllers.Create(),
their types are added to DynamicProxyIgnoreTypes, which disables the
ValidationInterceptor. The AbpValidationActionFilter only checked ModelState
(DataAnnotations), so FluentValidation rules were never executed.
Add IValidationEnabled check in AbpValidationActionFilter to call
IMethodInvocationValidator for conventional controllers, enabling
FluentValidation support without duplicating validation for regular controllers.
Resolve#23457
- Add ConfigurePolicy method to AbpOperationRateLimitingOptions for
partial modification of existing policies without full replacement
- Add ClearRules method to OperationRateLimitingPolicyBuilder for
clearing inherited rules before defining new ones
- Add FromPolicy factory method to reconstruct a builder from an
existing policy
- Change AddPolicy return type to AbpOperationRateLimitingOptions
for chaining consistency with ConfigurePolicy
- Add parameter validation to AddPolicy and FromPolicy
- Add documentation for overriding existing policies
- Add tests for ConfigurePolicy, ClearRules, chaining, and error cases
Add schedule validation and make dynamic workers replaceable. Introduced DynamicBackgroundWorkerSchedule.Validate (checks Period > 0) and call Validate() in all provider managers (in-memory, Hangfire, Quartz, TickerQ). Switched in-memory dynamic worker storage to ConcurrentDictionary and ensure adding a worker with an existing name stops/removes the previous instance before registering the new one; removals use TryRemove. Updated docs to clarify that adding a worker replaces an existing one and that CronExpression is only supported by scheduler-backed providers. Added tests for replacement behavior and invalid period values.
Move DynamicBackgroundWorkerHandlerRegistry.Register calls to after scheduling to avoid registering handlers when scheduling fails. Adjust Quartz behaviour to return actual outcomes: only unregister when DeleteJob reports deletion and return whether RescheduleJob succeeded. Convert TickerQ RemoveAsync to a non-async Task<bool> (using Task.FromResult) and move its registration similarly. Update test to poll with a timeout (instead of a fixed 500ms delay) to wait for background worker execution.