You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/04 05:34:03 UTC

[PR] fix(metrics): require data source config in source factory [rocketmq-dashboard]

yyqdbngt opened a new pull request, #3121:
URL: https://github.com/apache/rocketmq-dashboard/pull/3121

   ### Summary
   Guard and cover the metrics source factory:
   
   - `MetricsSourceFactory.create` rejects a null configuration with a clear 400 (`metrics data source config is required`) instead of NPE-ing on `config.getProviderType()`.
   - New `MetricsSourceFactoryTest` (first coverage) verifies the null guard and that a padded `prometheus` provider type builds a `PrometheusMetricsSource` (backend normalization).
   
   ### Why
   The factory builds every Prometheus-compatible backend and had no automated coverage; a null config previously crashed with an opaque NPE.
   
   ### Testing
   - `mvn -f server/pom.xml -Dtest=MetricsSourceFactoryTest test` passes: 2/2.
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(metrics): require data source config in source factory [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3121: fix(metrics): require data source config in source factory
URL: https://github.com/apache/rocketmq-dashboard/pull/3121


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org