Skip to content
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

Implement New Configuration System #4453

Open
27 tasks
ShohamBit opened this issue Dec 18, 2024 · 0 comments
Open
27 tasks

Implement New Configuration System #4453

ShohamBit opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@ShohamBit
Copy link
Collaborator

ShohamBit commented Dec 18, 2024

Implement New Configuration System (Config File and Flags)

Description

This issue tracks the implementation of a new configuration system for Tracee, supporting both configuration files (YAML/JSON) and command-line flags. This will improve configuration management, validation, and the ability to override settings.

Goal

Provide a flexible and manageable way to configure Tracee using both configuration files and command-line flags.

Steps

Implement Config File Parsing

  1. Implement YAML/JSON parsing for the config file.
  2. Define the data structures to represent the configuration.
  3. Handle file loading and error handling.

Checklist

Preview Give feedback

Implement Command-Line Flags Parsing and Mapping to Config

  1. Implement parsing for all command-line flags.
  2. Map the parsed flag values to the corresponding configuration data structures.

Checklist

Preview Give feedback

Implement Configuration Merging and Precedence Rules

  1. Define the precedence rules (flags override config file settings).
  2. Implement the logic to merge the configuration from the file and the flags.

Checklist

Preview Give feedback

Implement Validation, Error Handling, and Backward Compatibility

  1. Implement validation of the combined configuration.
  2. Implement proper error handling for invalid configurations.
  3. Ensure backward compatibility with existing flag usage.
  4. Implement deprecation warnings for deprecated options.

Checklist

Preview Give feedback

Enhance Testing, Logging, and Additional Configuration Options

  1. Write unit and integration tests for the new configuration system.
  2. Improve logging related to configuration loading and validation.
  3. Implement additional configuration options (e.g., --config <path>, --dry-run).

Checklist

Preview Give feedback

Acceptance Criteria

  1. All configuration options can be specified via both config file and flags.
  2. Flags override config settings when both are present.
  3. Validation ensures no invalid configurations are used.
  4. Deprecated fields are supported with a warning.
  5. Documentation and tests are updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant