-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add config validation and improve documentation #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added validation call in save_config to ensure config is valid before saving - Updated tests to verify validation behavior - Added test for empty description handling - Added test for schema validation errors
- Add pattern validation for release names: - Must be lowercase alphanumeric with hyphens - Must start and end with alphanumeric - Max length of 53 characters - Add pattern validation for deployment names: - Must be lowercase alphanumeric with hyphens - Must start and end with alphanumeric - Add comprehensive test cases for both validations
- Update HelmLogger to properly handle HELM_DEBUG=0 and HELM_DEBUG=false - Add pytest-style unit tests for HELM_DEBUG=0 and HELM_DEBUG=false cases - Add test-plugin.sh script with --debug flag for testing
- Improve heading structure and formatting - Remove duplicate configuration examples - Link to schema file instead of embedding it - Add note about schema evolution - Add spacing for better readability - Clarify configuration structure is an early example
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This comment was marked as resolved.
This comment was marked as resolved.
- Improve description of diagram contents - Add details about lock management - Update and clarify list of supported commands - Reorganize command descriptions for clarity
- Fix mutable default argument in PathData - Add proper Optional type annotation - Improve debug value handling in logger - Add explicit default for HELM_DEBUG - Simplify debug logic for better readability
Signed-off-by: Ritwik G <[email protected]>
for more information, see https://pre-commit.ci
- Import ConfigMetadata class - Use DEFAULT_DESCRIPTION for description option - Use DEFAULT_REQUIRED for required option - Use DEFAULT_SENSITIVE for sensitive option
- Add ValidationError to HelmValuesConfig.validate docstring - Add ValidationError to BaseCommand.save_config docstring - Clarify when each error type is raised
- Add test_path_data_init_no_metadata - Verify default ConfigMetadata values are used when metadata is None
|



User description
Related Issues
N/A
Changes Made
Documentation Changes
Testing Done
Checklist
Type of Change
Breaking Change
Additional Information
This PR adds validation to ensure configuration is valid before saving to disk, preventing corrupt or invalid configurations. It also improves the documentation to better reflect the current implementation and design decisions.
PR Type
Enhancement, Tests, Documentation
Description
Added configuration validation before saving to disk.
Enhanced testing for configuration validation and error handling.
Improved documentation for low-level design and schema evolution.
Introduced a test script for plugin installation and functionality.
Changes walkthrough 📝
8 files
Updated default description for CLI optionsAdded default metadata values for configurationsAdded configuration validation before savingIntroduced default values for metadata attributesValidated release and deployment names with patternsApplied default metadata values in PathDataImproved debug handling for HELM_DEBUG valuesUpdated schema with validation for names7 files
Added tests for configuration validation and error handlingMocked validation in initialization testsAdded error handling tests for set-value commandAdded tests for release and deployment name validationUpdated tests for default metadata valuesAdded tests for HELM_DEBUG handlingAdded test script for plugin installation and functionality1 files
Improved low-level design documentation and examples