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

[APM] Deprecate apm_oss.indexPattern config option #111133

Merged

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Sep 3, 2021

Closes #110733

This PR removes the need for apm_oss.indexPattern by constructing it by concatenating the specified indicies.

This test illustrates it pretty well:
https://github.com/elastic/kibana/blob/47c10042787238661527e46a6cf9dde684b61cd6/x-pack/plugins/apm/server/lib/index_pattern/get_apm_index_pattern_title.test.ts

Having apm_oss.indexPattern was problematic because it forced end users to keep this value in sync with their specified indicies. A user wanted to enable CCS and updated their index settings via the ui but forgot to update apm_oss.indexPattern which caused the search bar and Discover to not work as expected. Without a hardcoded value this won't happen.

@sorenlouv sorenlouv marked this pull request as ready for review September 3, 2021 17:10
@sorenlouv sorenlouv requested a review from a team as a code owner September 3, 2021 17:10
const deprecations: ConfigDeprecationProvider = ({ unused }) => [
unused('fleetMode'),
unused('indexPattern'),
];
Copy link
Member Author

@sorenlouv sorenlouv Sep 3, 2021

Choose a reason for hiding this comment

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

I think this is how the option should be deprecated.

@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Sep 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv sorenlouv added auto-backport Deprecated - use backport:version if exact versions are needed release_note:enhancement v7.16.0 labels Sep 3, 2021
@sorenlouv
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/get·ts.alerting api integration security and spaces enabled Alerts alerts get "after each" hook for "shouldn't get alert from another space"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook in "alerting api integration security and spaces enabled"
[00:03:59]           └-: Alerts
[00:03:59]             └-> "before all" hook in "Alerts"
[00:05:25]             └-: alerts
[00:05:25]               └-> "before all" hook in "alerts"
[00:05:25]               └-> "before all" hook in "alerts"
[00:05:25]                 │ debg creating space
[00:05:26]                 │ debg created space
[00:05:26]                 │ debg creating space
[00:05:27]                 │ debg created space
[00:05:27]                 │ debg creating space
[00:05:28]                 │ debg created space
[00:05:28]                 │ debg creating user no_kibana_privileges
[00:05:28]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [no_kibana_privileges]
[00:05:28]                 │ debg created user no_kibana_privileges
[00:05:28]                 │ debg creating role no_kibana_privileges
[00:05:28]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [no_kibana_privileges]
[00:05:28]                 │ debg creating user superuser
[00:05:28]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [superuser]
[00:05:28]                 │ debg created user superuser
[00:05:28]                 │ debg creating user global_read
[00:05:28]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [global_read]
[00:05:28]                 │ debg created user global_read
[00:05:28]                 │ debg creating role global_read_role
[00:05:28]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [global_read_role]
[00:05:28]                 │ debg creating user space_1_all
[00:05:29]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all]
[00:05:29]                 │ debg created user space_1_all
[00:05:29]                 │ debg creating role space_1_all_role
[00:05:29]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_role]
[00:05:29]                 │ debg creating user space_1_all_with_restricted_fixture
[00:05:29]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all_with_restricted_fixture]
[00:05:29]                 │ debg created user space_1_all_with_restricted_fixture
[00:05:29]                 │ debg creating role space_1_all_with_restricted_fixture_role
[00:05:29]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_with_restricted_fixture_role]
[00:05:29]                 │ debg creating user space_1_all_alerts_none_actions
[00:05:29]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all_alerts_none_actions]
[00:05:29]                 │ debg created user space_1_all_alerts_none_actions
[00:05:29]                 │ debg creating role space_1_all_alerts_none_actions_role
[00:05:29]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_alerts_none_actions_role]
[00:10:11]               └-: get
[00:10:11]                 └-> "before all" hook in "get"

Stack Trace

Error: expected 204 "No Content", got 409 "Conflict"
    at Test._assertStatus (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/parallel/19/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
    at /dev/shm/workspace/parallel/19/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
    at IncomingMessage.<anonymous> (/dev/shm/workspace/parallel/19/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Metrics [docs]

✅ unchanged

History

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

@sorenlouv sorenlouv merged commit 2cda9a9 into elastic:master Sep 7, 2021
@sorenlouv sorenlouv deleted the deprecate-index-pattern-config-option branch September 7, 2021 11:26
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 7, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Sep 7, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:enhancement Team:APM All issues that need APM UI Team support v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] apm_oss.indexPattern should be deprecated
4 participants