kruize / autotune

Autonomous Performance Tuning for Kubernetes!
Apache License 2.0
153 stars 52 forks source link

Fix and validate "version" field while importing metadata in local monitoring #1217

Open shreyabiradar07 opened 1 week ago

shreyabiradar07 commented 1 week ago

Currently version is not used in the current local monitoring datasource codeflow and hence POST /dsmetadata API passes and imports metadata successfully even with blank and invalid input json version field values.

Associated test case failure in local_monitoring_tests: rest_apis.test_import_metadata.test_import_metadata_invalid_test[blank_version-400--prometheus-1] rest_apis.test_import_metadata.test_import_metadata_invalid_test[invalid_version-400-xyz-prometheus-1]