Skip to content

feat(runner): add override config support with deep-merge#256

Draft
fpacifici wants to merge 1 commit intomainfrom
fpacifici/override_config
Draft

feat(runner): add override config support with deep-merge#256
fpacifici wants to merge 1 commit intomainfrom
fpacifici/override_config

Conversation

@fpacifici
Copy link
Collaborator

Summary

  • Adds a deepmerge utility to pipeline/config.py (ported from sentry_streams_k8s) with TypeMismatchError/ScalarOverwriteError for incompatible types
  • Extends load_config with an optional override_path argument; if provided, the override YAML is loaded and deep-merged into the base config before schema validation
  • Updates load_runtime_with_config_file and run_with_config_file to thread through override_config: Optional[str] = None — existing Rust CLI callers are unaffected
  • Replaces the --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-config for the override YAML path

Test plan

  • cd sentry_streams && .venv/bin/pytest tests/pipeline/test_config.py -vv — all 10 tests pass
  • Pre-commit hooks (black, flake8, mypy) pass on commit

🤖 Generated with Claude Code

- 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>
@github-actions
Copy link

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (runner) Add override config support with deep-merge by fpacifici in #256

Internal Changes 🔧

Deps

  • Bump virtualenv from 20.31.2 to 20.36.1 in /sentry_streams by dependabot in #248
  • Bump bytes from 1.10.1 to 1.11.1 in /sentry_streams by dependabot in #242
  • Bump urllib3 from 2.5.0 to 2.6.3 in /sentry_streams by dependabot in #239
  • Bump protobuf from 5.29.5 to 5.29.6 in /sentry_streams by dependabot in #244

🤖 This preview updates automatically when you update the PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant