feat(runner): add override config support with deep-merge#256
Draft
feat(runner): add override config support with deep-merge#256
Conversation
- Add `deepmerge` utility to `pipeline/config.py` (ported from sentry_streams_k8s) - Update `load_config` to accept optional `override_path`; loads override YAML and deep-merges it into the base config before schema validation - Update `load_runtime_with_config_file` and `run_with_config_file` to accept `override_config: Optional[str] = None` (Rust CLI callers unaffected by default) - Replace `--config` (required) CLI option with `--config-path` (directory) and `--config-file` (direct path), mutually exclusive; add `--override-config` - Add tests and fixture for override config path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧Deps
🤖 This preview updates automatically when you update the PR. |
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.
Summary
deepmergeutility topipeline/config.py(ported fromsentry_streams_k8s) withTypeMismatchError/ScalarOverwriteErrorfor incompatible typesload_configwith an optionaloverride_pathargument; if provided, the override YAML is loaded and deep-merged into the base config before schema validationload_runtime_with_config_fileandrun_with_config_fileto thread throughoverride_config: Optional[str] = None— existing Rust CLI callers are unaffected--config(required) CLI option with two mutually exclusive options:--config-path(directory, resolved to<dir>/<app-stem>.yaml) and--config-file(direct file path); adds--override-configfor the override YAML pathTest plan
cd sentry_streams && .venv/bin/pytest tests/pipeline/test_config.py -vv— all 10 tests pass🤖 Generated with Claude Code