Skip to content
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

[Alerting] Add alert.updatedAt field to represent date of last user edit #83784

Merged
merged 13 commits into from
Nov 19, 2020

Conversation

ymao1
Copy link
Contributor

@ymao1 ymao1 commented Nov 19, 2020

Resolves #83578

Summary

Re-do of this PR: #83578

Original Summary

Adds updatedAt field to the alert saved object that is updated when a user acts on an alert (updates the name or parameters or mutes/unmutes or enable/disables).

The original PR did not touch any code that triggered the Security Solutions cypress test suite so those tests were not run on the PR. Once merged into master, the cypress tests failed because they were loading alert saved objects from the esarchiver without the updatedAt field (something which would be taken care of by the migration)

This is the commit that updates the esarchive data for the security solutions tests (and unskips the test suites) c150217

This is the output of the cypress tests on this branch https://github.com/elastic/kibana/runs/1425449442

Checklist

Delete any items that are not applicable to this PR.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/development-plugin-saved-objects.html#_mappings

id before after diff
alert 30 31 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ymao1 ymao1 changed the title Alerting/updated at [Alerting] Add alert.updatedAt field to represent date of last user edit Nov 19, 2020
@ymao1 ymao1 self-assigned this Nov 19, 2020
@ymao1 ymao1 added Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.11.0 v8.0.0 labels Nov 19, 2020
@ymao1 ymao1 marked this pull request as ready for review November 19, 2020 17:58
@ymao1 ymao1 requested review from a team as code owners November 19, 2020 17:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@ymao1 ymao1 requested a review from dhurley14 November 19, 2020 17:59
Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the cypress fixes!

@pmuellr
Copy link
Member

pmuellr commented Nov 19, 2020

So the only change from the original PR is the additional security cypress test stuff?

Does that mean the original PR was reverted? I would have expected a reference to the reverted commit somehow in that PR, if so. But didn't see one.

The original PR did not touch any code that triggered the Security Solutions cypress test suite so those tests were not run on the PR

Seems like we need to get that fixed, or it'll happen again the next time we update the alert SO mappings ... fixed as in "those tests need to run if anything in alerting changes (and maybe actions and task manager and event log ...)". Not sure who we talk to about that tho ...

@ymao1
Copy link
Contributor Author

ymao1 commented Nov 19, 2020

@pmuellr Yes, I reverted the original PR.

Revert commit on master here: 6a2c415
Revert commit on 7.x here: 8a8e24b

I have talked to @dhurley14 and he believes there is an issue open already for updating the paths that will trigger the Security Solutions Cypress tests. If he's unable to find it, then I will open an issue for it.

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM

@ymao1
Copy link
Contributor Author

ymao1 commented Nov 19, 2020

Issue created here: #83851

@ymao1 ymao1 merged commit e45b76c into elastic:master Nov 19, 2020
ymao1 added a commit to ymao1/kibana that referenced this pull request Nov 19, 2020
… edit (elastic#83784)

* Adding alert.updatedAt field that only updates on user edit

* Updating unit tests

* Functional tests

* Updating alert attributes excluded from AAD

* Fixing test

* PR comments

* Unskipping tests and updating es archiver data
ymao1 added a commit that referenced this pull request Nov 19, 2020
… edit (#83784) (#83852)

* Adding alert.updatedAt field that only updates on user edit

* Updating unit tests

* Functional tests

* Updating alert attributes excluded from AAD

* Fixing test

* PR comments

* Unskipping tests and updating es archiver data
@ymao1 ymao1 deleted the alerting/updated-at branch February 4, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants