Skip to content

PPL Alerting with Feature Flag - #1311

Open
KashKondaka wants to merge 20 commits into
opensearch-project:mainfrom
KashKondaka:feature-flag2
Open

PPL Alerting with Feature Flag#1311
KashKondaka wants to merge 20 commits into
opensearch-project:mainfrom
KashKondaka:feature-flag2

Conversation

@KashKondaka

Copy link
Copy Markdown
Collaborator

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 <opensearch-infra@amazon.com>
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 <zhujiaxi@amazon.com>
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 <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Comment thread public/services/services.ts Outdated
if (alertingDashboardsCap?.pplV2 === true || alertingCap?.pplV2 === true) {
return true;
}
return true;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

keep this false

Comment thread public/services/services.ts Outdated
return true;
}
const alertingDashboardsCap = capabilities.alertingDashboards;
const alertingCap = capabilities.alerting;

@amsiglan amsiglan Nov 7, 2025

Copy link
Copy Markdown
Collaborator

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 thread public/services/services.ts Outdated
Comment on lines +92 to +94
if (!isPplV2Enabled()) {
return false;
}

Copy link
Copy Markdown
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

Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Comment thread server/plugin.js Outdated
destinations(services, router, dataSourceEnabled);
opensearch(services, router, dataSourceEnabled);
monitors(services, router, dataSourceEnabled);
pplAlertingMonitors(services, router, dataSourceEnabled);

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ack

Comment thread server/routes/monitors.js Outdated
monitorService.getMonitors
);

router.get(

Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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 thread public/types.ts
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
Copy Markdown
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
Copy Markdown
Collaborator 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.

Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Comment thread public/plugin.tsx Outdated
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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove?

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ack removed

Comment thread public/plugin.tsx
order: 9070,
category: DEFAULT_APP_CATEGORIES.detect,
updater$: this.appStateUpdater,
updater$: this.appStateUpdater$ as any,

Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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

Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Comment thread public/plugin.tsx

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
Copy Markdown
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
Copy Markdown
Collaborator 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

Comment thread public/utils/ppl_alerting_support.ts Outdated
return { status: 'unknown' };
};

export const ensurePplSupport = (

Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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 thread public/services/services.ts Outdated
Comment on lines +81 to +83
if (!isPplAlertingEnabled()) {
return false;
}

Copy link
Copy Markdown
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
Copy Markdown
Collaborator 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
Copy Markdown
Collaborator 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
Copy Markdown
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
Copy Markdown
Collaborator 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 <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
c
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
c
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
c
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
c
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
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