[Model Monitoring] Fix TimescaleDB stream writer table not found error (ML-11807) #9182
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
Fix the model-monitoring-stream pod failing when flushing batches to TimescaleDB with "Table does not exist" errors.
Root Cause
TimescaleDBConnector(API server side) auto-generates database name asmlrun_mm_{system_id}, butTimescaleDBStoreyTarget(stream side) used the original profile database directly, causing a mismatch. Tables were created inmlrun_mm_{system_id}but stream tried to write topostgres.Changes Made
get_tsdb_database_name()function inmlrun/common/model_monitoring/helpers.pyTimescaleDBConnector._determine_database_name()to use the shared functionTimescaleDBStoreyTarget.__init__()to use the shared function for consistent database namingTesting
Checklist
Reference