Compare: 3.6.0-rc2...3.6.0-rc3
This release candidate includes significant multitenancy improvements, bug fixes, and enhanced test coverage.
⚠️ Breaking changes / upgrade notes
Multitenancy Tenant ID Convention Changes
Affected users: Applications using multitenancy features, especially those with existing tenant data.
What changed:
- Default tenant ID convention: The default tenant now uses an empty string (
"") instead ofnull(ADR-0008). (b09a564) (#7217) - Tenant-agnostic entity convention: Tenant-agnostic entities (visible to all tenants) now use asterisk (
"*") as the sentinel value instead ofnull(ADR-0009). (7bc9035) (#7226) - Database schema impact: Database indexes on the
Triggerstable now includeTenantIdin unique constraints across all EF Core providers. (b09a564) (#7217)
Migration required:
- Convert existing
nullTenantIdvalues to empty strings for default tenant data inWorkflowDefinitions,WorkflowInstances, and runtime entities. - Review ADR-0008 (Default Tenant ID) and ADR-0009 (Tenant-Agnostic Entities) in
doc/adr/for detailed rationale and migration guidance.
Query filter changes: EF Core query filters have been updated to handle the new tenant ID conventions, ensuring tenant isolation is properly maintained. (7bc9035) (#7226)
✨ New features
Multitenancy enhancements
- Configuration-based multitenancy: Introduced configuration-based tenant provider to streamline tenant initialization and customization. (b09a564) (#7217)
- Tenant-agnostic workflow support: Workflows and activities can now be marked as tenant-agnostic (using
"*"as tenant ID) to make them accessible across all tenants. (7bc9035) (#7226) - Selective lock mocking in tests: Added
SelectiveMockLockProviderfor precise lock mocking in tests without affecting unrelated background operations. (b09a564) (#7217)
🔧 Improvements
Multitenancy
- Tenant filtering in workflow store populator: Added tenant-specific filtering in
DefaultWorkflowDefinitionStorePopulatorto ensure workflows are only loaded for the current tenant. (b09a564) (#7217) - Tenant isolation in activity provider: Enforced tenant isolation in
WorkflowDefinitionActivityProviderand included tenant ID in activity type names for better separation. (558902b) - Optimized activity registry: Improved
ActivityRegistry.Findto prefer tenant-specific descriptors over tenant-agnostic ones with single-pass iteration for better performance. (7bc9035) (#7226) - Tenant headers support: Added tenant headers support to
BackgroundWorkflowCancellationDispatcherfor proper tenant context propagation during workflow cancellation. (bc70bef) (#7040)
API improvements
- Labels endpoints migration: Updated Labels endpoints to use
ElsaEndpointbase class with standardized permission configuration. (7256970) (#7205)
Error handling
- Graceful
ParentInstanceIdhandling: EnhancedResumeBulkDispatchWorkflowActivityto gracefully handle missingParentInstanceIdvalues. (641dd66) - Improved async handling: Enhanced async handling in
CommandHandlerInvokerMiddlewareto properly await tasks without blocking. (7bc9035) (#7226) - Enhanced logging for recurring tasks: Added error handling and logger support to prevent crashes in scheduled timers. (7bc9035) (#7226)
🐛 Fixes
- Synthetic inputs exception handling: Fixed uncaught exception thrown in
ReadSyntheticInputswhen workflow inputs have reserved names like 'Metadata'. Now collects exceptions and returns them to the caller with a validIActivityinstance instead of breaking the publishing loop. (4cd2c4c, b822835) (#7199) - Memory leak in compression: Fixed memory leak by properly disposing
IronCompressResultin Zstd codec implementation. (05d40e3) (#7193) - Default tenant data visibility: Fixed data visibility leak by removing
NullIfEmptyconversion to properly distinguish between default tenant ("") and tenant-agnostic ("*") entities. (7bc9035) (#7226)
🧪 Tests
- Reserved keywords documentation: Added unit tests to document and verify reserved keywords in workflow inputs (e.g.,
CustomProperties,Metadata). (ffd4327) (#7180) - Tenant ID normalization tests: Added comprehensive unit tests for tenant ID normalization covering null, empty, and valid ID scenarios. (b09a564) (#7217)
- Multitenancy pipeline tests: Added tests for multitenancy pipeline invoker covering various tenant resolution scenarios. (b09a564) (#7217)
- Activity registry tests: Added extensive tests for
ActivityRegistryto verify tenant-specific and tenant-agnostic descriptor handling. (7bc9035) (#7226) - Compression codec tests: Added tests for Zstd codec compression and decompression to prevent memory leaks. (05d40e3) (#7193)
- Workflow deletion tests: Enhanced
DeleteWorkflowTestswith signal-based waiting and improved registry refresh verification. (641dd66, 25bf377, cc3a2c2, afe33ba) - Activity construction tests: Improved test coverage for
ActivityConstructionResultand exception handling scenarios. (b09a564) (#7217) - Workflow store populator tests: Expanded test coverage for
DefaultWorkflowDefinitionStorePopulatorwith tenant-specific scenarios. (b09a564) (#7217)
📖 Documentation
- Architecture Decision Records: Added multiple ADRs documenting multitenancy design decisions:
📦 Full changelog
Commits not covered above:
- Remove duplicate reference to
tenant-deleted-eventADR in solution file. (af1e4e8) - Remove unused variables in synthetic input handling. (a69d447)
- Apply code review suggestions from @sfmskywalker. (b0b2080)
- Refactor obsolete class handling to avoid contract changes. (b3d155d)
🙏 Contributors
Special thanks to all contributors to this release:
- @sfmskywalker
- Community contributors who reported issues and provided feedback
Note: This is a release candidate. Please report any issues on GitHub Issues.