Skip to content

gh-5 [feat]: 2025-12-22 | Bootstrap configuration model - #7

Merged
frost-leo merged 6 commits into
developfrom
feature/gh-5/bootstrap-configuration-model
Dec 22, 2025
Merged

frost-leo merged 6 commits into
developfrom
feature/gh-5/bootstrap-configuration-model

Conversation

@frost-leo

Copy link
Copy Markdown
Owner

Pull Request

Description

Add bootstrap configuration model for Leviftas system initialization, including:

  • InternalBaseSettings - Base settings class with env/CLI support
  • ConfigCenterBaseModel - Registry pattern for config center implementations
  • NacosConnConfigModel - Nacos connection config with SecretStr protection
  • BootstrapConfigurationModel - Main bootstrap config with auto-detection

Features:

  • Auto-detect system info (hostname, OS, architecture)
  • Multi-source config loading (env, .env, CLI, secrets)
  • Config center auto-registration and instantiation
  • Sensitive field protection with SecretStr

Related Links

frost-leo and others added 6 commits December 10, 2025 13:57
- Add pydantic-settings for environment variable configuration loading

Date: 2025-12-10
Refs: #5
Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
- Add InternalBaseSettings base class for settings models
- Add BootstrapConfigurationModel with host info auto-detection
- Add ConfigCenterBaseModel with registry pattern for auto-discovery
- Add NacosConnConfigModel for Nacos config center connection

Date: 2025-12-19
Refs: #5
Signed-off-by: Frost Leo <frostleo.dev@gmail.com>
- Add platformdirs for cross-platform configuration directory support

Date: 2025-12-19
Refs: #5
Signed-off-by: Frost Leo <frostleo.dev@gmail.com>
- InternalBaseSettings: Add env_prefix, env_nested_delimiter; disable cli_parse_args and secrets_dir by default for cross-platform support
- ConfigCenterBaseModel: Use model_config inheritance; fix get_by_type return type; add duplicate type_name check
- NacosConnConfigModel: Use model_config inheritance; remove cli_prog_name; use SecretStr for sensitive fields
- BootstrapConfigurationModel: Use model_config inheritance; remove redundant NacosConnConfigModel import
- Replace Optional[X] with X | None syntax; use typing_extensions for Literal

Date: 2025-12-22
Refs: #5
Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
- Add InternalBaseSettings tests: default config, env loading, nested delimiter, subclass override
- Add ConfigCenterBaseModel tests: registry pattern, get_by_type, duplicate detection, inheritance
- Add NacosConnConfigModel tests: env loading, SecretStr fields, default values
- Add BootstrapConfigurationModel tests: auto-detection, required fields, config source validation, auto-load
- Fix model_config inheritance syntax to avoid duplicate keyword arguments
- Use _cli_parse_args=False in tests to prevent CLI interference with pytest

All 125 tests passing, mypy type checking clean.

Date: 2025-12-22
Refs: #5
Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
- Add bootstrap configuration model changelog entries
- Document all 5 commits for gh-5 feature branch

Date: 2025-12-22
Refs: #5
Signed-off-by: Frost Leo <FrostLeo.Dev@gmail.com>
@frost-leo frost-leo self-assigned this Dec 22, 2025
@github-actions github-actions Bot changed the title gh-5 [feat]: Bootstrap configuration model gh-5 [feat]: 2025-12-22 | Bootstrap configuration model Dec 22, 2025
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 98.97959% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../models/bootstrap/bootstrap_configuration_model.py 97.67% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@frost-leo
frost-leo merged commit bea8c07 into develop Dec 22, 2025
2 checks passed
@frost-leo
frost-leo deleted the feature/gh-5/bootstrap-configuration-model branch December 22, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants