Skip to content

Release PR for 2025-12-06 13:28#20

Merged
disafronov merged 26 commits into
releasefrom
main
Dec 6, 2025
Merged

Release PR for 2025-12-06 13:28#20
disafronov merged 26 commits into
releasefrom
main

Conversation

@disafronov
Copy link
Copy Markdown
Owner

@disafronov disafronov commented Dec 6, 2025

Changelog (#20)

📚 Documentation

  • (logging) clarify stacklevel usage in SchemaLogger
  • (logging) update README and tests for valid empty schema handling
  • (logging) clarify stack handling in SchemaLogger comments
  • (logging) refine comments on caller information retrieval in SchemaLogger
  • (logging) update comment for cache invalidation in schema loader
  • (logging) enhance comment for excessive nesting depth check in schema loader
  • (README) clarify definitions of inner and leaf nodes in schema
  • (README) update error message format for schema validation

♻️ Refactoring

  • (logging) update DataValidationError handling and logging behavior
  • (logging) remove DataValidationError and improve error logging
  • (logging) simplify error messages in schema validation
  • (logging) streamline error message formatting in schema logging
  • (logging) enhance caller information retrieval in SchemaLogger
  • (logging) update SchemaLogger error handling and remove SchemaValidationError
  • (logging) remove deprecated SchemaValidationError and update error handling
  • (logging) improve schema validation handling in SchemaLogger
  • (logging) update import statements in schema applier and loader
  • (tests) update import statements for _write_schema in test files
  • (logging) enhance caller information retrieval in SchemaLogger
  • (logging) replace Lock with RLock for path cache synchronization

🧹 Chores

  • update release configuration and workflow conditions
  • sync from template v1.0.2
  • (release) 0.1.2-rc.1
  • (release) 0.1.2-rc.2
  • (release) 0.1.2-rc.3
  • (workflow) add release branch to lint and test workflow

disafronov and others added 25 commits December 6, 2025 05:14
- Modified the release message format in `.releaserc.json` to include a "Signed-off-by" line for better traceability.
- Added a condition in the `release-stable.yaml` workflow to prevent releases from being triggered by commits that start with 'chore(release):', ensuring cleaner release management.
…havior

- Enhanced the DataValidationError class documentation to clarify its purpose and behavior, emphasizing that it logs validation issues as ERROR messages instead of raising exceptions.
- Modified the SchemaLogger to log validation errors after emitting log records, ensuring compatibility with standard logger behavior.
- Updated tests to reflect the new logging behavior, confirming that validation errors are logged correctly without raising exceptions.

This change improves the clarity of error handling in the logging system and maintains compatibility with existing logging practices.
- Removed the DataValidationError class to simplify error handling, as it was not raised during normal operation and was logged automatically.
- Updated the SchemaLogger to log validation errors without raising exceptions, ensuring that valid log data is emitted alongside error messages.
- Adjusted tests to verify that validation error details are included in the log output while maintaining compatibility with standard logger behavior.

This change enhances the clarity and efficiency of the logging system by streamlining error handling.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated error messages in the schema applier to remove unnecessary wording, enhancing clarity.
- Adjusted corresponding test assertions to reflect the simplified error messages.

This change improves the readability of error outputs during schema validation processes.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Simplified the error message construction in SchemaLogger to enhance clarity by consolidating problem messages into a single line.
- This change improves the readability of error outputs during schema validation processes.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated comments in the SchemaLogger to enhance clarity regarding the stacklevel adjustment used in logging validation errors.
- The changes ensure that the caller information points to the correct user code location, improving the maintainability of the logging implementation.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated the SchemaLogger to use inspect.stack() for obtaining caller information, ensuring consistent behavior across Python versions.
- Added comments to clarify the logic behind the stack frame indexing, improving maintainability and readability of the logging implementation.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.1.2-rc.1](v0.1.1...v0.1.2-rc.1) (2025-12-06)

Signed-off-by: Release Bot <noreply@github.com>
…maValidationError

- Refactored SchemaLogger to handle schema validation errors internally by logging to stderr and terminating the application instead of raising SchemaValidationError.
- Updated documentation in README.md to reflect the new error handling approach.
- Adjusted tests to verify that the application terminates correctly on schema issues, ensuring consistent behavior across various error scenarios.

This change simplifies error management in the logging system and enhances clarity in handling schema-related problems.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
… error handling

- Removed the deprecated SchemaValidationError class to streamline error management in the logging system.
- Updated the SchemaLogger to log schema problems without raising exceptions, enhancing clarity in error handling.
- Adjusted documentation to reflect the changes in error handling behavior.

This refactor simplifies the logging process and improves the overall maintainability of the codebase.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.1.2-rc.2](v0.1.2-rc.1...v0.1.2-rc.2) (2025-12-06)

Signed-off-by: Release Bot <noreply@github.com>
- Added documentation in README.md to clarify that a valid empty schema (e.g., `{}`) is acceptable and does not cause errors during logger creation.
- Updated the SchemaLogger class to ensure that partially initialized instances are removed from the cache if schema validation fails.
- Introduced a new test to verify that the SchemaLogger can be created successfully with a valid empty schema, ensuring it behaves as expected without raising exceptions.

These changes enhance the clarity of schema handling in the logging system and improve test coverage for edge cases.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated the SchemaLogger to validate the schema before creating the logger instance, preventing broken instances from being cached.
- Removed the cleanup method for failed logger instances, simplifying the error handling process.
- Enhanced the README.md to reflect the new behavior of schema validation and logger initialization.

These changes streamline the logging process and improve the clarity of schema handling in the logging system.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Updated comments in the SchemaLogger to explain the use of inspect.stack() for caller information retrieval, particularly addressing issues with Python 3.10's findCaller() method.
- Enhanced clarity regarding the fallback mechanism for obtaining caller information, improving maintainability of the logging implementation.

These changes ensure that the logging behavior is well-documented and consistent across different Python versions.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
…emaLogger

- Clarified comments in the SchemaLogger regarding the use of inspect.stack() for obtaining caller information, specifically addressing compatibility with Python 3.10's findCaller() method.
- Enhanced the explanation of the fallback mechanism to improve understanding and maintainability of the logging implementation.

These updates ensure that the logging behavior is well-documented and consistent across different Python versions.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Revised the comment in the _check_cached_found_file_path function to clarify the reason for cache invalidation when the cached schema path no longer exists. This enhances understanding of the function's behavior and its implications for schema searching.

These changes improve the documentation and maintainability of the schema loading process.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Replaced imports from `typing` with `collections.abc` for `Mapping` and `MutableMapping` in both `schema_applier.py` and `schema_loader.py`.
- This change aligns with modern Python practices and improves code clarity.

These updates enhance the maintainability of the logging system by adhering to updated import conventions.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
…iles

- Replaced imports of _write_schema from tests.conftest with direct imports from conftest in multiple test files, including test_integration.py, test_schema_loader.py, test_schema_logger_mimic.py, and test_thread_safety.py.
- This change improves consistency in import paths and aligns with the project's structure.

These updates enhance the maintainability of the test suite by standardizing import practices.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
…chema loader

- Updated the comment in the _compile_schema_tree function to provide a clearer explanation of the excessive nesting depth check, emphasizing its role as a DoS protection mechanism against stack overflow and excessive memory usage.

This change improves the documentation and understanding of the schema validation process in the logging system.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Introduced a version check for Python 3.11+ to utilize the improved findCaller() method for obtaining caller information, enhancing performance and reliability.
- Implemented a fallback to inspect.stack() for Python versions below 3.11, ensuring consistent behavior across different environments.
- Updated comments to clarify the logic behind caller information retrieval and the fallback mechanism.

These changes improve the efficiency and maintainability of the logging system by leveraging modern Python capabilities while ensuring compatibility with older versions.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Enhanced the descriptions of inner and leaf nodes in the README.md to provide clearer definitions, specifying the requirements for each type of node.
- Added details on the validation process for leaf nodes, emphasizing the necessity of both `type` and `source` fields for a valid leaf node.

These updates improve the documentation and understanding of schema structure in the logging system.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
- Clarified the format of the ERROR message logged after emitting a log record when validation problems are detected. The new format is: `"Log data does not match schema: {problem1}; {problem2}; ..."`.
- Enhanced documentation to ensure consistency in understanding how errors are reported during schema validation.

These updates improve the clarity of the logging system's error handling documentation.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
…tion

- Updated the path cache lock from threading.Lock to threading.RLock to allow recursive locking during schema path checks.
- Enhanced thread safety in the _check_cached_found_file_path and _check_cached_missing_file_path functions by ensuring that access to shared variables is properly synchronized.

These changes improve the reliability of the schema loading process in multi-threaded environments.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.1.2-rc.3](v0.1.2-rc.2...v0.1.2-rc.3) (2025-12-06)

Signed-off-by: Release Bot <noreply@github.com>
@github-actions github-actions Bot changed the title New release Release PR for 2025-12-06 13:26 Dec 6, 2025
- Updated the GitHub Actions workflow to include the 'release' branch in the pull request trigger configuration for linting and testing. This change ensures that code quality checks are performed on both the main and release branches.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
@github-actions github-actions Bot changed the title Release PR for 2025-12-06 13:26 Release PR for 2025-12-06 13:28 Dec 6, 2025
@disafronov disafronov merged commit 01c734e into release Dec 6, 2025
14 checks passed
@disafronov
Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 0.1.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants