123123213weqw opened a new pull request, #6489:
URL: https://github.com/apache/rocketmq-dashboard/pull/6489

   Fixes #6465.
   
   The connection-test probe rejected `victoria_metrics` (and 
`victoria-metrics`) even though `DataSourceDTO`'s pattern and 
`MetricsBackendType` both accept them: `isPrometheusCompatible` normalised the 
client-supplied type by stripping whitespace and lower-casing, which leaves the 
underscore spelling outside the hard-coded allowlist — so the request failed as 
unsupported before any HTTP probe, while `VictoriaMetrics` passed.
   
   The service now resolves the type through one normalising switch 
(whitespace, underscores and hyphens folded, case-insensitive) that returns the 
backend enum, and the probe URL uses that backend's own instant-query path — 
`victoria_metrics` reaches `/select/0/prometheus/api/v1/query` instead of the 
Prometheus one. Unknown types are still rejected with the same message 
(`Custom` and everything unrecognised), so there is no silent fallback to 
Prometheus.
   
   - `connectionShouldResolveVictoriaMetricsAliasesToItsOwnQueryPathTest` — 
`victoria_metrics` must hit the VictoriaMetrics query path and succeed (fails 
on the old code with "Unsupported data source type").
   - `connectionShouldStillRejectUnknownDataSourceTypesTest` — unknown types 
stay rejected.
   
   `SettingsServiceTest` is 45/45.
   
   cc @lizhimins
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to