Feat/1.0.0 - #16
Merged
Merged
Feat/1.0.0#16
Conversation
feat(settings): add fallback mechanism for missing conf.env module - Wrap conf.env import in try-except block to handle ModuleNotFoundError - Add comprehensive fallback configuration with default SQLite settings - Include detailed warning log message guiding users to create env config - Set default database, Redis, and application settings for development use - Configure default allowed hosts and column exclude apps ```
refactor(serializers): remove unused workflow approval models and add EE import check Remove obsolete workflow approval related models including WorkflowApprove, WorkflowApprovalRule, WorkflowApprovalNode, WorkflowApprovalInstance, WorkflowApprovalNodeExecution, and other unused models like HostLog, ManagedProgram, ProgramInstallTemplate, ProgramHostBinding, etc. Add conditional import logic for enterprise edition serializers with proper fallback handling to prevent AttributeError when EE module is missing. The thin wrapper serializers now only load when _EE_SUPERVISOR_PROGRAM_OK flag is True, otherwise fallback serializers are used. Fix DRF field info error in ProgramCommandViewSet when EE module is not available. ```
chore(serializers): add audit script to check Meta.model=None bug in Thin Wrapper Serializers Add audit script to identify serializers with Meta.model=None issues when EE is absent. The script checks various serializer classes including WorkflowDAGVersionSerializer, ProgramInstallTemplateSerializers, HostLogSerializers, OpsExecutionApprovalSerializers, Script approval serializers, SharePermission serializers, Workflow approval serializers, Scheduler HA serializers, and Extension center placeholders. The audit identifies problematic serializers by attempting to instantiate them and accessing their fields property which triggers DRF get_field_info and reveals ModelSerializer subclasses with Meta.model=None configuration that could cause HTTP 400/500 errors when ViewSet has no EE gate. ```
feat(serializers): add conditional EE serializer definitions with import guards Add defensive import guards for all EE serializers to prevent AttributeError when EE modules are not available. Introduce *_OK flags to conditionally define serializer classes only when EE imports succeed. This fixes an issue where CE functionality would fail when accessing WorkflowDAGVersionSerializer during workflow publishing due to missing Meta.model attribute when EE is not installed. Also adds CE base implementation for WorkflowDAGVersionSerializer to ensure core functionality remains available without EE dependencies. ```
refactor(serializers): remove conditional guards from EE serializer wrappers Remove _EE_*_OK conditional guards from enterprise edition serializer wrappers in taurus/serializers.py. All thin wrapper classes are now unconditionally defined since they are protected by dispatch-level EE gates that prevent instantiation when EE is not available. The changes ensure consistent behavior across all EE serializers and reduce complexity by removing the need to check import success flags. Classes that were previously conditionally defined are now always defined as thin wrappers extending their EE implementations or fallback serializers when EE imports fail. This affects multiple serializer groups including log center, operations approval, script audit/approval/check, share permissions, workflow approvals, and scheduler HA components. ```
refactor(taurus): update EE fallback serializer to avoid drf-spectacular crashes - Replace _EEFallbackSerializer inheritance from CustomModelSerializer to plain Serializer to prevent model_meta.get_field_info(None) crashes during schema scanning - Add proper docstring explaining the purpose of the fallback serializer - Remove unnecessary Meta class from _EEFallbackSerializer - Clean up unused imports in ee_fallback.py feat(taurus): implement conditional EE feature routing for workflow and script approvals - Add conditional registration of workflow approval endpoints based on _WFAPP_EE_OK flag - Add conditional registration of script approval endpoints based on _SCRIPT_EE_OK flag - Move approval-related URL patterns into conditional blocks to gate EE-only features - Update ContactLeadSerializer to extend CustomModelSerializer directly instead of _EEFallbackSerializer to ensure CE compatibility for anonymous portal submissions ```
feat(config): add config decryption helpers and enhance security configuration - Add automatic config decryption functionality with `_decrypt_if_needed` helper - Implement encrypted password support for database connections - Add workflow engine configuration with executable unit adapters list - Configure email notification settings with environment-based backends - Enable request signing verification for API security - Add SSL/TLS configuration options for supervisor connections - Include gRPC server certificate SAN configuration - Support encrypted format for sensitive configuration values ```
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.
描述
请简要描述此 PR 的目的和变更内容。
变更类型
请选择适用的选项:
测试方法
请描述您如何测试这些变更:
检查清单
相关 Issue
如果适用,请链接到相关的 issue:
Fixes #
截图(如果适用)
添加截图以帮助说明变更。