Feature/tenant lifecycle automation#1150
Merged
Merged
Conversation
Expanded `tenant-lifecycle-automation.md` with a detailed framework for automating tenant provisioning, activation, and health verification. - Defined goals, scope, and non-goals for the automation process. - Outlined personas (Platform Admin, Tenant Admin, SRE/DevOps). - Documented high-level workflow for provisioning steps. - Specified functional, operational, and security requirements. - Added acceptance criteria for successful provisioning. - Included failure/recovery criteria for error handling and retries. This update ensures a robust, secure, and observable tenant lifecycle management process.
- Introduced a tenant provisioning workflow with support for migrations, seeding, and cache warming. - Added `TenantProvisioningService` and related entities to manage provisioning steps and statuses. - Updated `ITenantService` with methods for tenant migration and seeding. - Added endpoints for retrieving and retrying tenant provisioning statuses. - Integrated Hangfire for background job execution and improved its configuration. - Refactored logging in `LogJobFilter` to use `Logger.DebugFormat`. - Updated `TenantDbContext` and added migrations for multitenancy and auditing. - Adjusted service lifetimes for audit and tenant provisioning components. - Updated `appsettings.json` for database connection and Serilog configuration. - Removed redundant code and improved maintainability with modern C# features.
Implemented automated tenant provisioning with persisted status and retry support. Added background provisioning via Hangfire with inline fallback for dev environments. Introduced startup hosted services for tenant catalog migration/seeding and optional auto-provision enqueue. Enhanced `TenantDbContextFactory` to support PostgreSQL via appsettings. Fixed audit pipeline to include tenant/user stamps and write per-tenant log batches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and updates focused on tenant lifecycle automation, multitenancy infrastructure, dependency upgrades, and enhanced logging for background jobs. The changes collectively improve the reliability, observability, and maintainability of tenant provisioning and background job execution.
Tenant Lifecycle Automation and Multitenancy Enhancements:
AppTenantInfoto use a record type inheriting fromTenantInfo, improved constructors for EF/tooling compatibility, and clarified property handling for connection strings and validity management. [1] [2] [3] [4]MultitenancyConstants, supporting schema-based multi-tenancy strategies.Dependency and Package Updates:
Finbuckle.MultiTenantand related packages to v10,Npgsql.EntityFrameworkCore.PostgreSQLto v10, and other supporting libraries to ensure compatibility and access to new features. [1] [2] [3]Finbuckle.MultiTenant.Abstractionsin the shared project for improved type access.Background Job and Hangfire Configuration Improvements:
HangfireOptions, improved database options retrieval, and ensured tenant context is set using the updatedAppTenantInforecord. [1] [2] [3]Microsoft.AspNetCore.Httpimport for audit publisher.Logging and Observability:
InfoFormattoDebugFormatinLogJobFilterto reduce log noise and improve log level appropriateness for job creation, execution, and state changes. [1] [2] [3] [4] [5] [6]These changes collectively strengthen the foundation for multi-tenant SaaS automation, improve operational safety, and ensure the codebase is up-to-date with the latest dependencies and best practices.