Skip to content

NMS-19489 Realtime graphing doesn't work when the Cortex TSS plugin is used#8277

Open
Mohammad-Junid wants to merge 2 commits intodevelopfrom
jira/MJ/NMS-19489
Open

NMS-19489 Realtime graphing doesn't work when the Cortex TSS plugin is used#8277
Mohammad-Junid wants to merge 2 commits intodevelopfrom
jira/MJ/NMS-19489

Conversation

@Mohammad-Junid
Copy link
Contributor

Fix realtime graphing issue when the Cortex TSS plugin is used

Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Can you re-target this to foundation-2023 ?

@christianpape christianpape requested a review from Copilot February 6, 2026 09:19
christianpape
christianpape previously approved these changes Feb 6, 2026
Copy link
Contributor

@christianpape christianpape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes realtime graphing when the Cortex TSS plugin is used by adjusting how metadata ResourcePaths are derived for different timeseries strategies.

Changes:

  • Avoid repeated TimeSeries.getTimeseriesStrategy() calls by storing the strategy once.
  • Split NEWTS vs INTEGRATION handling when converting rrdRelativePath into a ResourcePath.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pathToMetaFile = ResourcePath.get(path.split(":"));
if (strategy == Strategy.NEWTS) {
pathToMetaFile = ResourcePath.get(path.split(":"));
} else {
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.split(\"/+\" ) uses a regex, where + is a quantifier ("one or more slashes"). If that’s the intent, it would help readability to make it explicit (e.g., extract a named constant like SPLIT_ON_ONE_OR_MORE_SLASHES = \"/+\" or add a short comment). If the intent is to split on a single slash delimiter, use path.split(\"/\") instead to avoid confusion.

Suggested change
} else {
} else {
// Use regex "/+" to split on one or more slashes

Copilot uses AI. Check for mistakes.
// by the ResourceStorageDao.
ResourcePath pathToMetaFile;
if (TimeSeries.getTimeseriesStrategy() == Strategy.NEWTS || TimeSeries.getTimeseriesStrategy() == Strategy.INTEGRATION) {
Strategy strategy = TimeSeries.getTimeseriesStrategy();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strategy is not reassigned in this hunk; consider declaring it as final to communicate immutability and reduce accidental reassignment during future edits.

Suggested change
Strategy strategy = TimeSeries.getTimeseriesStrategy();
final Strategy strategy = TimeSeries.getTimeseriesStrategy();

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-target this to foundation-2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants