adapt detector config and detectors + write and adapt tests#54
Merged
ipmach merged 7 commits intodevelopmentfrom Feb 13, 2026
Merged
adapt detector config and detectors + write and adapt tests#54ipmach merged 7 commits intodevelopmentfrom
ipmach merged 7 commits intodevelopmentfrom
Conversation
This was
linked to
issues
Feb 11, 2026
Contributor
|
@viktorbeck98 Looks good but you have a conflict merge issue :) solve it and I think the PR is ready |
Contributor
|
@viktorbeck98 also.. I know you want to have the script comment it in the combo detector. But that doesnt look good in a production code :D
|
This was referenced Feb 16, 2026
Open
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 a major refactor and enhancement of the configuration system for detectors, focusing on improved support for event-based variable configurations, round-trip YAML compatibility, and programmatic config generation. It also updates the default pipeline YAML to use the new structure and adds utility methods for converting configs to and from dictionary/YAML format. Additionally, it introduces a helper for extracting configured variables from parsed logs and improves the internal structure and serialization of event and variable configs.
Key changes include:
Configuration System Refactor and Serialization:
EventsConfig,_EventConfig,_EventInstance,Variable,Header) to represent event-based detector configurations, withto_dictmethods for round-trip serialization to YAML-compatible dictionaries. (src/detectmatelibrary/common/_config/_formats.py[1] [2]to_dictmethod to the main config class to enable converting configs back to YAML format, ensuring preservation of structure and compatibility. (src/detectmatelibrary/common/_config/__init__.pysrc/detectmatelibrary/common/_config/init.pyR41-R92)__init__.pyto expose new config-related utilities and types. (src/detectmatelibrary/common/_config/__init__.pysrc/detectmatelibrary/common/_config/init.pyL1-R4)Detector Configuration Generation and Processing:
generate_detector_configfunction to programmatically build detector configs from variable selections, supporting both single variables and variable combinations, and handling both positional and header variables. (src/detectmatelibrary/common/_config/_compile.py[1] [2]eventsstructure and improved handling of missing or auto-configured parameters, including new warnings for edge cases. (src/detectmatelibrary/common/_config/_compile.py[1] [2]YAML Pipeline Config Update:
config/pipeline_config_default.yaml) to use the newevents-based structure for detectors, removing legacylog_variablesandall_log_variablesfields and updating parameters accordingly. (config/pipeline_config_default.yaml[1] [2] [3] [4]Detector Utility Improvements:
get_configured_variableshelper to extract only those variables from parsed logs that are defined in the detector's config, supporting both positional and header variables. (src/detectmatelibrary/common/detector.py[1] [2]logIDsandextractedTimestampsinstead of extending, aligning with expected output structure. (src/detectmatelibrary/common/detector.pysrc/detectmatelibrary/common/detector.pyL69-R107)These changes collectively modernize and modularize the detector configuration system, making it more flexible, maintainable, and compatible with both code and YAML workflows.
Configuration System Refactor and Serialization
EventsConfig,_EventConfig,_EventInstance, etc.) withto_dictmethods for YAML round-trip compatibility. [1] [2]to_dictto the main config class for YAML serialization, and updated__all__to expose new utilities. [1] [2]Detector Configuration Generation and Processing
generate_detector_configfor programmatic config creation from variable selections, supporting both single and tuple variables. [1] [2]eventsstructure and improved parameter validation/warnings. [1] [2]YAML Pipeline Config Update
pipeline_config_default.yamlto useeventsfor detector variable definitions, removing legacy fields and updating parameters. [1] [2] [3] [4]Detector Utility Improvements
get_configured_variablesto extract only configured variables from parser output, supporting both positional and header variables. [1] [2]logIDsandextractedTimestampsfields.