-
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
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE #66838
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE #66838
Conversation
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
…rls-to-kibana-styleguide # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
@elasticmachine merge upstream |
(jenkins upgrade required killing all jobs) |
…m:YulNaumenko/kibana into alerting-change-urls-to-kibana-styleguide
…rls-to-kibana-styleguide # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
@elastic/kibana-alerting-services I want to get the team thoughts about renaming |
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.
SIEM changes LGTM -- thanks! 🙂👍
I'm +1 on renaming the plugin to |
…rls-to-kibana-styleguide # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
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.
LGTM for stack monitoring
@jarpy
This is based on the way that the Elasticsearch team has designed their APIs. There isn't a formal convention for this but I've seen a few teams in Kibana follow it whenever an API doesn't fit cleanly within the common interpretation of a RESTful HTTP API, a |
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.
In Uptime I'm seeing an error when I try to open our alert flyouts. When the flyout opens the plugin crashes.
Primary error message:
TypeError: alertTypesIndex[alertTypeRegistryItem.id] is undefined
Looking briefly at the code changes for Uptime I am not seeing exactly where the error was. I tried moving the alert registration out of mount
(which is something we're implementing right now anyway) but that didn't seem to be the cause.
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.
APM changes look good.
@justinkambic thank you for catching this issue, I will fix it. |
…rls-to-kibana-styleguide # Conflicts: # x-pack/plugins/siem/server/lib/detection_engine/signals/search_after_bulk_create.ts
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.
code LGTM
@@ -4,6 +4,6 @@ | |||
"kibanaVersion": "kibana", |
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.
should we also change the directory name alerting_example
to alerts_example
. I'd suggest opening a separate issue for that, 307 files already now, this one isn't critical
@@ -1,7 +1,7 @@ | |||
# alerting_builtins plugin |
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.
same as with the alerting example, we probably want this renamed as well, to alerts_builtins
, but it's not critical ATM - I don't think anything should be referencing this plugin anyway
Noticed there are a lot of functional test failures. Just starting to look at it, on the server side I see a lot of these:
There must be some basic security thing going on here, I guess with the URL path change. |
…rls-to-kibana-styleguide # Conflicts: # x-pack/plugins/alerts/server/alerts_client.test.ts # x-pack/plugins/alerts/server/alerts_client_factory.test.ts
…rls-to-kibana-styleguide # Conflicts: # x-pack/plugins/siem/server/lib/detection_engine/routes/rules/validate.test.ts
…na STYLEGUIDE (elastic#66838) * Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE * Changed alerting REST API to keep the pattern 'alerts/alert/{id}' * fixed tests * fixed tests * Fixed jest tests * Renamed plugin from alerting to alerts * fixed tests * fixed tests * Fixed alert type check error * Fixed find api * fixed type checks * fixed tests security issues * Fixed view in app * - Co-authored-by: Elastic Machine <[email protected]> # Conflicts: # .github/CODEOWNERS # rfcs/text/0003_handler_interface.md
…na STYLEGUIDE (#66838) (#67919) * Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE * Changed alerting REST API to keep the pattern 'alerts/alert/{id}' * fixed tests * fixed tests * Fixed jest tests * Renamed plugin from alerting to alerts * fixed tests * fixed tests * Fixed alert type check error * Fixed find api * fixed type checks * fixed tests security issues * Fixed view in app * - Co-authored-by: Elastic Machine <[email protected]> # Conflicts: # .github/CODEOWNERS # rfcs/text/0003_handler_interface.md
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_date_nanos·js.context app context view for date_nanos displays predessors - anchor - successors in right orderStandard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_date_nanos·js.context app context view for date_nanos displays predessors - anchor - successors in right orderStandard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/dashboard/dashboard_filter_bar·js.dashboard app using current data dashboard filter bar filter editor field list shows index pattern of vis when one is addedStandard Out
Stack Trace
and 6 more failures, only showing the first 3. History
To update your PR or re-run it, just comment with: |
Resolve #59799
Dev Docs
Renamed
alerting
plugin toalerts
.API changes:
BASE_ALERT_API_PATH
to'/api/alerts'
- according to styleguide it should keep structure/api/plugin_id
/api/alert/_find
just to/api/alerts/_find
/types
to/list_alert_types
/api/alert
to POST/api/alerts/alert
/api/alert/{id}
to GET/api/alerts/alert/{id}
/api/alert/{id}
PUT/api/alerts/alert/{id}
/api/alert/{id}
to DELETE/api/alerts/alert/{id}
/api/alert/{id}/state
to GET/api/alerts/alert/{id}/state
/api/alert/{id}/_enable
to POST/api/alerts/alert/{id}/_enable
/api/alert/{id}/_disable
to POST/api/alerts/alert/{id}/_disable
/api/alert/{id}/_mute_all
to POST/api/alerts/alert/{id}/_mute_all
/api/alert/{alertId}/alert_instance/{alertInstanceId}/_mute
to POST/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute
/api/alert/{id}/_unmute_all
to POST/api/alerts/alert/{id}/_unmute_all
/api/alert/{id}/_update_api_key
to POST/api/alerts/alert/{id}/_update_api_key
/api/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute
to POST/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute