Dependency Update Plan
This issue tracks a comprehensive update of dependencies across both the operator and CLI components of Netchecks.
Current Status
Operator Dependencies
- Currently on Pydantic v1.10.x
- Several packages need major version updates
- Some dependencies removed/replaced (deprecated, wrapt)
CLI Dependencies
- Using
uv for dependency management
- Needs similar update sweep
Phased Approach
Phase 1: Operator - Compatible Updates (CURRENT)
Goal: Update to latest compatible versions without breaking changes
Updates completed:
- ✅ kopf: 1.37.1 → 1.38.0
- ✅ kubernetes: 29.0.0 → 34.1.0
- ✅ rich: 13.x → 14.x
- ✅ structlog: 23.x → 25.4.0
- ✅ prometheus-client: 0.16.0 → 0.23.1
- ✅ opentelemetry-*: 1.24/1.25 → 1.37.0
- ✅ ruff: 0.3.x → 0.14.0
- ✅ pytest: 8.1.x → 8.4.x
- ⏳ Kept pydantic at 1.10.24 (not breaking 2.x yet)
Testing Required:
Phase 2: Pydantic 2.x Migration (Operator)
Goal: Migrate to Pydantic 2.x with breaking changes
Impact Analysis:
Files using Pydantic:
operator/netchecks_operator/config.py - Uses BaseSettings, nested config
netcheck/checks/http.py - Uses BaseModel
Breaking Changes in Pydantic 2.x:
BaseSettings moved to pydantic-settings package
Config inner class → model_config attribute
customise_sources → settings_customise_sources
env_nested_delimiter → nested model automatically parsed
.json() → .model_dump_json()
.dict() → .model_dump()
Migration Tasks:
Phase 3: CLI Dependencies
Goal: Update netcheck CLI dependencies with uv
Current versions to update:
- Check all outdated packages with
uv
- Similar pydantic 2.x migration needed for
netcheck/checks/http.py
- Update all test dependencies
- Verify CLI commands still work
Testing Required:
Phase 4: Final Integration Testing
Goal: Verify entire stack works with all updates
Breaking Change Considerations
For Users
- Operator image tag will change
- Helm chart may need values.yaml updates
- No CRD schema changes expected
Internal
- Config loading mechanism may need adjustment
- Environment variable parsing with nested models
- JSON serialization calls need updating
Rollback Plan
If Phase 2+ causes issues:
- Revert pyproject.toml changes
- Run
poetry install --sync or uv sync --frozen
- Rebuild Docker images from previous commit
- Keep Phase 1 updates (safe and tested)
Related Issues
Notes
- Phase 1 is conservative - no breaking API changes
- Phase 2 requires careful testing due to Pydantic 2.x breaking changes
- Consider creating feature branch for Phase 2+
- Document any migration issues in CLAUDE.md
Checklist
Dependency Update Plan
This issue tracks a comprehensive update of dependencies across both the operator and CLI components of Netchecks.
Current Status
Operator Dependencies
CLI Dependencies
uvfor dependency managementPhased Approach
Phase 1: Operator - Compatible Updates (CURRENT)
Goal: Update to latest compatible versions without breaking changes
Updates completed:
Testing Required:
Phase 2: Pydantic 2.x Migration (Operator)
Goal: Migrate to Pydantic 2.x with breaking changes
Impact Analysis:
Files using Pydantic:
operator/netchecks_operator/config.py- UsesBaseSettings, nested confignetcheck/checks/http.py- UsesBaseModelBreaking Changes in Pydantic 2.x:
BaseSettingsmoved topydantic-settingspackageConfiginner class →model_configattributecustomise_sources→settings_customise_sourcesenv_nested_delimiter→ nested model automatically parsed.json()→.model_dump_json().dict()→.model_dump()Migration Tasks:
pydantic-settingsdependencyoperator/netchecks_operator/config.py:from pydantic import BaseSettings→from pydantic_settings import BaseSettingsConfiginner class tomodel_configcustomise_sourcestosettings_customise_sourcesnetcheck/checks/http.pyif using deprecated APIs.json()calls → replace with.model_dump_json().dict()calls → replace with.model_dump()Phase 3: CLI Dependencies
Goal: Update netcheck CLI dependencies with uv
Current versions to update:
uvnetcheck/checks/http.pyTesting Required:
uv run pytestpassesnetcheck dns,netcheck http,netcheck runPhase 4: Final Integration Testing
Goal: Verify entire stack works with all updates
Breaking Change Considerations
For Users
Internal
Rollback Plan
If Phase 2+ causes issues:
poetry install --syncoruv sync --frozenRelated Issues
Notes
Checklist