Entity matching pipeline hardening, observability, and cleanup#303
Conversation
BergsethCognite
commented
May 29, 2026
- Fixed runtime bug in read_manual_mappings (early-return shape mismatch crashed pipelines without the manual mapping table) and corrected its return-type annotation
- Replaced boolean filter checks with is not None to silence the SDK UserWarning and match its documented contract
- Made the Mixpanel usage tracker truly best-effort (daemon=True + try/except inside the thread body)
- Dropped redundant patch_existing_pipeline() call from run_locally
- Lazy-imported RawUploadQueue so pipeline.py is testable without cognite-extractor-utils
- Wired pipeline_optimizations helpers into production: pre-compiled rule regexes, RobustAPIClient retry around all 9 instances.apply sites, time_operation per major phase, monitor_memory_usage + cleanup_memory at phase boundaries
- Slimmed pipeline_optimizations.py and test_optimizations.py (~60% smaller) — kept only the 6 helpers actually used in production
- Fixed pre-existing test_handler.py rot (stale asset_entity_matching patch targets, drifted constants, over-strict assertions): now 11/11 passing instead of 1/11
- Rewrote the function README's Testing section (run commands, prerequisites, what's covered) and updated the helpers/advanced-usage sections to match reality
- All 16 tests passing, lint clean, no warnings
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |