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] changes preconfigured actions config from array to object #65397

Merged
merged 2 commits into from
May 7, 2020

Conversation

pmuellr
Copy link
Member

@pmuellr pmuellr commented May 5, 2020

resolves #63171

Previously, preconfigured actions were specified as an array of action
properties. This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id. For a future PR.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

resolves elastic#63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
@pmuellr pmuellr force-pushed the alerting/preconfigured-by-id branch from d6353ca to f7a4801 Compare May 7, 2020 04:37
@pmuellr pmuellr added Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels May 7, 2020
@elasticmachine
Copy link
Contributor

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

@pmuellr pmuellr added release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v7.9.0 v8.0.0 labels May 7, 2020
@pmuellr pmuellr marked this pull request as ready for review May 7, 2020 13:14
@pmuellr pmuellr requested a review from a team as a code owner May 7, 2020 13:14
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Changes LGTM once the asciidoc are updated docs/user/alerting/pre-configured-connectors.asciidoc (not sure if there's others) cc @YulNaumenko.

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

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

LGTM

@pmuellr
Copy link
Member Author

pmuellr commented May 7, 2020

docs updated in commit 7134f4f

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@pmuellr pmuellr merged commit 39427f5 into elastic:master May 7, 2020
pmuellr added a commit to pmuellr/kibana that referenced this pull request May 7, 2020
…lastic#65397)

resolves elastic#63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
pmuellr added a commit to pmuellr/kibana that referenced this pull request May 7, 2020
…lastic#65397)

resolves elastic#63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
# Conflicts:
#	docs/user/alerting/action-types/email.asciidoc
#	docs/user/alerting/action-types/index.asciidoc
#	docs/user/alerting/action-types/pagerduty.asciidoc
#	docs/user/alerting/action-types/server-log.asciidoc
#	docs/user/alerting/action-types/slack.asciidoc
#	docs/user/alerting/action-types/webhook.asciidoc
#	docs/user/alerting/pre-configured-connectors.asciidoc
pmuellr added a commit that referenced this pull request May 7, 2020
…65397) (#65756)

resolves #63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
pmuellr added a commit that referenced this pull request May 7, 2020
…65397) (#65759)

resolves #63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
# Conflicts:
#	docs/user/alerting/action-types/email.asciidoc
#	docs/user/alerting/action-types/index.asciidoc
#	docs/user/alerting/action-types/pagerduty.asciidoc
#	docs/user/alerting/action-types/server-log.asciidoc
#	docs/user/alerting/action-types/slack.asciidoc
#	docs/user/alerting/action-types/webhook.asciidoc
#	docs/user/alerting/pre-configured-connectors.asciidoc
jloleysens added a commit to jloleysens/kibana that referenced this pull request May 8, 2020
…or-part-mvp-2

* 'master' of github.com:elastic/kibana: (259 commits)
  SavedObjects bulkCreate API should return migrationVersion and strip the type & namespace from the id (elastic#65150)
  Drilldown count tooltip (elastic#65105)
  plugins logs start with "plugins." prefix (elastic#65710)
  [ML] Fix pagination reset on search query update. (elastic#65668)
  [SIEM] Add types to the mappings objects so extra keys cannot be introduced
  [apm] Update machine learning flyout and service maps docs (elastic#65517)
  change api endpoint and throw error (elastic#65790)
  [Maps] remove SLA percentage metric (elastic#65718)
  [Reporting] APM integration for baseline performance measurements (elastic#59967)
  fix(NA): noParse regex for windows on kbn optimizer (elastic#65755)
  [ML] DFA: ensure at least one field is included in analysis before job can be created (elastic#65320)
  [Data plugin] cleanup - remove unused getRoutes / routes from indexPattern object (elastic#65683)
  Removed skip to enable test. (elastic#65575)
  [Lens] Type safe migrations (elastic#65576)
  [Canvas] Fix nav link behavior in Canvas  (elastic#65590)
  [Event log] Fix flaky test (elastic#65658)
  [Alerting] changes preconfigured actions config from array to object (elastic#65397)
  remove immediate functions from esqueue worker cycles (elastic#65375)
  [Metrics UI] Fix isAbove to only display when threshold set (elastic#65540)
  draft search profiler accessibility tests (elastic#62357)
  ...

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported 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.8.0 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-configured connectors not easy to configure in kibana.yml
5 participants