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

Add button for adding `index.query.default_field` setting to metricbeat indices #32829

Merged
merged 5 commits into from Mar 12, 2019

Conversation

Projects
None yet
4 participants
@joshdover
Copy link
Member

joshdover commented Mar 8, 2019

Summary

Closes #32769

This adds a button to the index table for the newly added deprecation message: "Number of fields exceeds automatic field expansion limit." The button will only be shown if the index is a known Metricbeat index (matching metricbeat-*) that is missing the index.query.default_field setting.

When the button is pressed, Kibana will generate a list of default fields to set for this setting. The list of fields is generated by determining all fields in the mapping of type keyword, text, or ip. This is the same logic that Beats uses internally to set this setting on new indices.

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Mar 8, 2019

@joshdover joshdover force-pushed the joshdover:ua-metricbeat-default-field branch from e7c991f to e9face2 Mar 8, 2019

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 8, 2019

@jbudz

This comment has been minimized.

Copy link
Contributor

jbudz commented Mar 11, 2019

@joshdover joshdover force-pushed the joshdover:ua-metricbeat-default-field branch from e9face2 to 372ec4a Mar 11, 2019

@joshdover joshdover changed the base branch from 7.x to 6.7 Mar 11, 2019

@joshdover joshdover force-pushed the joshdover:ua-metricbeat-default-field branch from 372ec4a to ddf1050 Mar 11, 2019

@joshdover joshdover marked this pull request as ready for review Mar 11, 2019

@joshdover

This comment has been minimized.

Copy link
Member Author

joshdover commented Mar 11, 2019

This is ready for review, but the functional tests that were added will not pass until the Elasticsearch PR is either merged or moved to a branch on the root repo.

@joshdover joshdover requested a review from elastic/kibana-operations Mar 11, 2019

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 11, 2019

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 11, 2019

@joshdover joshdover force-pushed the joshdover:ua-metricbeat-default-field branch from ddf1050 to 3ce44d6 Mar 11, 2019

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 11, 2019

@joshdover

This comment was marked as outdated.

Copy link
Member Author

joshdover commented Mar 12, 2019

retest

1 similar comment
@joshdover

This comment was marked as outdated.

Copy link
Member Author

joshdover commented Mar 12, 2019

retest

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 12, 2019

@joshdover

This comment was marked as outdated.

Copy link
Member Author

joshdover commented Mar 12, 2019

retest

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 12, 2019

@joshdover

This comment has been minimized.

Copy link
Member Author

joshdover commented Mar 12, 2019

Flaky CI is killing me today....

retest

@joshdover

This comment was marked as outdated.

Copy link
Member Author

joshdover commented Mar 12, 2019

retest

@elasticmachine

This comment was marked as outdated.

Copy link

elasticmachine commented Mar 12, 2019

@tylersmalley
Copy link
Member

tylersmalley left a comment

LGTM - reviewed code and functionally tested indices which require default fields in addition to some of the standard re-indexing behavior which was touched slightly on in this PR

@tylersmalley

This comment has been minimized.

Copy link
Member

tylersmalley commented Mar 12, 2019

Incoming failure looks related to the changes:

11:23:38              └- ✖ fail: "upgrade assistant metricbeat default_field setting returns true for metricbeat index"
11:23:38              │      Error: expected 200 "OK", got 404 "Not Found"
11:23:38              │       at Test._assertStatus (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/supertest/lib/test.js:268:12)
11:23:38              │       at Test._assertFunction (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/supertest/lib/test.js:283:11)
11:23:38              │       at Test.assert (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/supertest/lib/test.js:173:18)
11:23:38              │       at assert (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/supertest/lib/test.js:131:12)
11:23:38              │       at /var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/supertest/lib/test.js:128:5
11:23:38              │       at Test.Request.callback (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/superagent/lib/node/index.js:718:3)
11:23:38              │       at parser (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/superagent/lib/node/index.js:906:18)
11:23:38              │       at IncomingMessage.res.on (/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-ciGroup5/node/immutable/kibana/node_modules/superagent/lib/node/parsers/json.js:19:7)
11:23:38              │       at endReadableNT (_stream_readable.js:1103:12)
11:23:38              │       at process._tickCallback (internal/process/next_tick.js:63:19)
expect(depMessage).to.not.be(undefined);

// Upgrade assistant should correctly recognize this as a metricbeat index
const { body: metricbeatBody } = await supertest.get(`/api/upgrade_assistant/metricbeat/${indexName}`).expect(200);

This comment has been minimized.

@tylersmalley

tylersmalley Mar 12, 2019

Member

Looks like the tests need updated here to use the new endpoint.

This comment has been minimized.

@joshdover

joshdover Mar 12, 2019

Author Member

Ah forgot about updating the functional tests

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Mar 12, 2019

@elasticmachine

This comment has been minimized.

Copy link

elasticmachine commented Mar 12, 2019

@joshdover joshdover merged commit c97eff3 into elastic:6.7 Mar 12, 2019

2 checks passed

CLA All commits in pull request signed
Details
kibana-ci Build finished.
Details

@joshdover joshdover deleted the joshdover:ua-metricbeat-default-field branch Mar 12, 2019

joshdover added a commit to joshdover/kibana that referenced this pull request Mar 12, 2019

Add button for adding `index.query.default_field` setting to metricbe…
…at indices (elastic#32829)

* Add button for adding `index.query.default_field` setting to metricbeat indices

* Add button to 'group by index' view

* Refactor to more generic API

* Remove comment

* Update functional tests

joshdover added a commit to joshdover/kibana that referenced this pull request Mar 12, 2019

Add button for adding `index.query.default_field` setting to metricbe…
…at indices (elastic#32829)

* Add button for adding `index.query.default_field` setting to metricbeat indices

* Add button to 'group by index' view

* Refactor to more generic API

* Remove comment

* Update functional tests

joshdover added a commit that referenced this pull request Mar 12, 2019

joshdover added a commit that referenced this pull request Mar 12, 2019

[7.0] Add button for adding `index.query.default_field` setting to me…
…tricbeat indices #32829 (#33057)

* Add button for adding `index.query.default_field` setting to metricbeat indices (#32829)

* Add button for adding `index.query.default_field` setting to metricbeat indices

* Add button to 'group by index' view

* Refactor to more generic API

* Remove comment

* Update functional tests

* Use typeless API in 7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.