Skip to content

Conversation

@KashKondaka
Copy link
Contributor

Description

PPL Alerting changes

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

opensearch-trigger-bot bot and others added 4 commits October 7, 2025 13:03
…ject#1295)

(cherry picked from commit a232821)

Signed-off-by: opensearch-ci <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…opensearch-project#1297)

(cherry picked from commit 147e2e7)

Signed-off-by: Peter Zhu <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Revert "fix mustache format notif message"

This reverts commit 862d635.

update tests

Signed-off-by: KashKondaka <[email protected]>
Signed-off-by: KashKondaka <[email protected]>
if (alertingDashboardsCap?.pplV2 === true || alertingCap?.pplV2 === true) {
return true;
}
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep this false

return true;
}
const alertingDashboardsCap = capabilities.alertingDashboards;
const alertingCap = capabilities.alerting;
Copy link
Collaborator

@amsiglan amsiglan Nov 7, 2025

Choose a reason for hiding this comment

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

remove this one and also simply return !!capabilities.alertingDashboards?.pplV2

Comment on lines 92 to 94
if (!isPplV2Enabled()) {
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this since this check is not ppl alerting and should exist regardless

server/plugin.js Outdated
destinations(services, router, dataSourceEnabled);
opensearch(services, router, dataSourceEnabled);
monitors(services, router, dataSourceEnabled);
pplAlertingMonitors(services, router, dataSourceEnabled);
Copy link
Collaborator

Choose a reason for hiding this comment

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

gate this and remove the per api gating

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

monitorService.getMonitors
);

router.get(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't have it removed

Comment on lines +21 to +23
export type { ExplorePluginSetup, ExplorePluginStart } from '../../../src/plugins/explore/public';
// @ts-ignore
export type { QueryWithQueryAsString } from '../../../src/plugins/explore/public';
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't be exporting these from this plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are needed for alert flyout in discover.

Comment on lines 112 to 116
// mount: async (params) => {
// const { renderApp } = await import('./app');
// const [coreStart] = await core.getStartServices();
// return renderApp(coreStart, params);
// },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove?

Copy link
Collaborator

Choose a reason for hiding this comment

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

other places too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack removed

order: 9070,
category: DEFAULT_APP_CATEGORIES.detect,
updater$: this.appStateUpdater,
updater$: this.appStateUpdater$ as any,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why did we make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was getting a type error because the navigation API expects an Observable, not the BehaviorSubject instance itself. BehaviorSubject implements the observable interface, but its public type also exposes .next() and .value which doesn't match watch the registry expects


public start(core: CoreStart, { visAugmenter, embeddable, data, navigation, contentManagement, assistantDashboards }: AlertingStartDeps): AlertingStart {
public start(core: CoreStart, { visAugmenter, embeddable, data, navigation, contentManagement, assistantDashboards, explore }: AlertingStartDeps): AlertingStart {
navigateToAppRef = core.application.navigateToApp;
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are we using this? and why do we need to create a variable for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was old code for transporting query to ppl alerting. removing it

return { status: 'unknown' };
};

export const ensurePplSupport = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not actually being used, will remove

Comment on lines 81 to 83
if (!isPplAlertingEnabled()) {
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove this since updated ux should not be gated on ppl alerting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I remove this it looks like updated ux overwrites ppl flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

found error, fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you change all new files to be ts(x)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will address in next pr

c
Signed-off-by: KashKondaka <[email protected]>
Signed-off-by: KashKondaka <[email protected]>
Signed-off-by: KashKondaka <[email protected]>
Signed-off-by: KashKondaka <[email protected]>
c
Signed-off-by: KashKondaka <[email protected]>
c
Signed-off-by: KashKondaka <[email protected]>
c
Signed-off-by: KashKondaka <[email protected]>
c
Signed-off-by: KashKondaka <[email protected]>
Signed-off-by: KashKondaka <[email protected]>
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.

2 participants