-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft for socialization at this point] Migration side car actions 2 #112043
[Draft for socialization at this point] Migration side car actions 2 #112043
Conversation
…re, and moved everything into a subfolder
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
Hey @FrankHassanabad, after discussing with the team, we can’t recommend other plugins manipulating the internals of the alerting plugin without going through an API. We made the alerting saved objects hidden for this purpose. Otherwise, this can become hard to support and put our users in a bad position as we change the platform workflows by causing unintended side effects by the external code. The concern comes as we need to support customers upgrading from any 7.x version to any 8.x version, and it can get pretty complex without going through the standard migrations. Would it be possible to have a write-up somewhere of what you’re trying to accomplish? Then, I can engage the @elastic/kibana-alerting-services team to help address the concerns. It’s crucial to keep resiliency in mind given the challenges our customers face, and we need to be cautious by looping in other Kibana teams on changes like this. |
Hi @mikecote, We want to further align with kibana-alerting and kibana-core and that is what we are attempting here. We engaged with Kibana core here: under the section, "Add ability to query during saved object migrations" and the sub-ticket listed from it: I updated the sub-ticket to include these words to outline this secondary use case to try and be clearer: Second use case is that we have saved objects such as the "siem-detection-engine-rule-actions" which is a saved object that has a reference back to the original alert and was put into place by developers a long time ago before the maturity of notifyWhen and throttle options. For us to move away from our legacy model, we need a type of "join" where we can query the alerting from it when we migrate. The conclusion from kibana-core so far is this comment: Which indicated to us that hooks for doing queries during migrations such as a "join" was not going to happen during startup time or any time soonish if at all.
Please let me know if my write up above does not make sense. I can re-state it once more below if this helps: We have a legacy notification system and a legacy notification rule. This legacy notification system used a "side car" object called The good news is that we already re-did the code to use the newer notification system with great success, however we now need to migrate away and delete this legacy notification system on next upgrade which has a type of "join" from it to the alerting system which is the pain point. Other notes to hopefully be more clear on what is going on in our thinking:
If it matters we discussed during our team meetings alternatives such as:
We have added this to our agenda for today's meeting. If you see other options please list them below and if you have a particular option you want us to perform please tell us directly as well. |
} | ||
|
||
export const getThrottle = ({ actionSideCar, logger }: GetThrottleOptions): string => { | ||
if (actionSideCar.attributes.alertThrottle != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check "rule" first intead of "alert" first since terminology changed and it's more than likely rule that is being stored as a more first class than "alert".
return []; | ||
} | ||
|
||
if (actionSideCar.attributes.actions.length !== resolvedActions.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From @yctercero during in-person review with @dhurley14 these might not be 1-1. So I need to remove this check here and write tests (if this goes off of draft mode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think these will be 1-1 and they will just have duplicates. I think we are ok here. More testing will be utilized for this point.
Related issue: #112327 |
Summary
Summarize your PR. If it involves visual changes include a screenshot or gif.
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers