Add pluggable TSS backend support to smoke test infrastructure#8401
Open
cnewkirk wants to merge 1 commit intoOpenNMS:developfrom
Open
Add pluggable TSS backend support to smoke test infrastructure#8401cnewkirk wants to merge 1 commit intoOpenNMS:developfrom
cnewkirk wants to merge 1 commit intoOpenNMS:developfrom
Conversation
Adds INTEGRATION time series strategy with Prometheus-compatible backend containers for end-to-end testing of TSS plugins via the Integration API: - INTEGRATION enum value for TimeSeriesStrategy - ThanosReceiveContainer (write endpoint) and ThanosQueryContainer (read endpoint) - PrometheusContainer as standalone building block - OpenNMSContainer/OpenNMSStack wiring for INTEGRATION strategy with Cortex plugin config, meta tags, and features-on-boot - CortexTestUtils with shared resolveKarFile() for KAR resolution - TimeSeriesValidationUtils for strategy-agnostic validation (resource tree, measurements, metadata) - Expanded CortexTssPluginIT with comprehensive coverage: write/read path, meta tags, metric sanitization, label ordering, resource discovery, two-phase discovery, data consistency - smoke-test README with INTEGRATION section and architecture diagram
Contributor
|
I'll let others comment on the code (and CI failures) but I suspect we may want to target this at foundation-2025 (maybe 2024 since it seems not breaking?) so that we can leverage it with testing for that version. https://opennms.atlassian.net/browse/NMS-19646 created for this. |
cgorantla
reviewed
Mar 30, 2026
Contributor
cgorantla
left a comment
There was a problem hiding this comment.
I think cortex plugin itself is better place to have these tests. We just need to bring up OpenNMS container there (which is already available through docker hub), see https://github.com/OpenNMS/alec for reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
INTEGRATIONstrategy toTimeSeriesStrategyenum, enabling smoke tests to run against pluggable TSS backends (Cortex TSS plugin with Prometheus/Thanos)ThanosReceiveContainerandThanosQueryContainerfor distributed Thanos backend testingPrometheusContaineras a standalone building blockTimeSeriesValidationUtilswith strategy-agnostic validation methods for resource trees, measurements, metadata, and all aggregation typesCortexTestUtils.resolveKarFile()shared utility for KAR file resolutionOpenNMSStackandOpenNMSContainerfor INTEGRATION strategy (cortex.cfg overlay, opennms.properties, features boot)CortexTssPluginITto 26 test methods covering plugin lifecycle, write/read path, meta tags, metric sanitization, label ordering, resource discovery, two-phase discovery, and data consistencyCortexTssTimeseriesPluginITto use sharedCortexTestUtilssmoke-test/README.mdwith INTEGRATION section and architecture diagramCompanion PR
KAR File Resolution
Tests use
CortexTestUtils.resolveKarFile()to find the Cortex TSS plugin KAR:-Dcortex.kar=/path/to/plugin.kar— explicit path (throws if path invalid)-Dorg.opennms.dev.m2=$HOME/.m2/repository— bind-mount Maven repo for Karaf resolutionTest plan
-Dsmoke --projects :smoke-test./compile.pl -DskipTests install)./assemble.pl -Dopennms.home=/opt/opennms -DskipTests)queryThanos()checks HTTP response code and includes error bodyresolveKarFile()deduplicated intoCortexTestUtilswith consistent error handlingopennms/deploy-baseamd64-only limitation