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

Remove reference to mapping types #23650

Closed
jbudz opened this issue Oct 1, 2018 · 12 comments
Closed

Remove reference to mapping types #23650

jbudz opened this issue Oct 1, 2018 · 12 comments
Assignees
Labels
blocker Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:Monitoring Stack Monitoring team Team:Operations Team label for Operations Team Team:QA Team label for QA Team Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.0.0

Comments

@jbudz
Copy link
Member

jbudz commented Oct 1, 2018

Elasticsearch is taking the next step in working towards a world with no types. In 6.x, we enforced using a single type. In 7.0 we plan to offer APIs which do not require a type at all. Relevant APIs are indexing APIs, read APIs, and management APIs for things like index templates and mapping.

The plan is to take a two-step approach:

  • Elasticsearch will offer both a type less API and a typed API in 7.x. Usage of the later will cause deprecation warnings.
  • All our shippers and Kibana need to move to use the type less API.
@jbudz jbudz added blocker Team:Operations Team label for Operations Team v7.0.0 labels Oct 1, 2018
@jbudz jbudz mentioned this issue Oct 2, 2018
@tylersmalley

This comment has been minimized.

@tylersmalley tylersmalley changed the title Upgrade path from doc to _doc Remove reference to mapping types Nov 28, 2018
@lukeelmers
Copy link
Member

lukeelmers commented Jan 10, 2019

Awhile ago I did a full run of the functional test suite and logged every request the ES client makes to the .kibana index. This was the list of the unique routes I found that are using types in the path (obviously this only includes routes with test coverage; nothing too surprising here):

  -> GET .kibana/doc/config:{version}
  -> POST .kibana/doc/config:{version}/_create
  
  -> GET .kibana/doc/dashboard:{id}
  -> POST .kibana/doc/dashboard:{id}
  -> DELETE .kibana/doc/dashboard:{id}
  
  -> POST .kibana/doc/index-pattern:{id}
  -> POST .kibana/doc/index-pattern:{id}/_create
  -> POST .kibana/doc/index-pattern:{id}/_update
  -> DELETE .kibana/doc/index-pattern:{id}
  
  -> POST .kibana/doc/search:{id}
  -> DELETE .kibana/doc/search:{id}
  
  -> POST .kibana/doc/url:{id}/_create
  
  -> POST .kibana/doc/visualization:{id}
  -> POST .kibana/doc/visualization:{id}/_create
  -> DELETE .kibana/doc/visualization:{id}

Of course I just now saw #23654, which pretty much covers all of these already. But figured I would post this info here anyway for posterity.

@chrisdavies chrisdavies self-assigned this Jan 11, 2019
@chrisdavies
Copy link
Contributor

Got a little ways down the road on this, and am currently blocked waiting for this:

elastic/elasticsearch#37285

Currently, put mapping still expects you to provide the root-level type. That PR will fix this (and other inconsistencies).

tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 15, 2019
Due to elastic/elasticsearch#37285, we must set
include_type_name when using the type in the request.

This is a stop-gap until we complete elastic#23650

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 15, 2019
Due to elastic/elasticsearch#37285, we must set
include_type_name when using the type in the request.

This is a stop-gap until we complete elastic#23650

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 15, 2019
Due to elastic/elasticsearch#37285, we must set
include_type_name when using the type in the request.

This is a stop-gap until we complete elastic#23650

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 15, 2019
Follow-up to elastic#28497

Since elastic/elasticsearch#37285 has been merged, it's
aparent there are a couple more places we need to specify include_type_name
as a stop-gap until elastic#23650 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
chrisdavies pushed a commit that referenced this issue Jan 15, 2019
* [migrations] Fetch additional mappings with types

Follow-up to #28497

Since elastic/elasticsearch#37285 has been merged, it's
aparent there are a couple more places we need to specify include_type_name
as a stop-gap until #23650 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Updates tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
kobelb pushed a commit to kobelb/kibana that referenced this issue Jan 16, 2019
* [migrations] Fetch additional mappings with types

Follow-up to elastic#28497

Since elastic/elasticsearch#37285 has been merged, it's
aparent there are a couple more places we need to specify include_type_name
as a stop-gap until elastic#23650 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Updates tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@stacey-gammon stacey-gammon added Team:Monitoring Stack Monitoring team Feature:Metrics UI Metrics UI feature labels Jan 18, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infrastructure-ui

@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring

@stacey-gammon stacey-gammon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 18, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@stacey-gammon stacey-gammon added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Jan 18, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@stacey-gammon stacey-gammon added the Team:QA Team label for QA Team label Jan 18, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-qa

@stacey-gammon
Copy link
Contributor

Current list of failing tests, after the es archives were updated:

API Integration Tests.test/api_integration/apis/index_patterns/es_errors/errors·js.apis index_patterns index_patterns/service/lib index_patterns/* error handler "before all" hook
UI Functional Tests.test/functional/apps/context/index·js.context app "before all" hook
UI Functional Tests.test/functional/apps/dashboard/index·js.dashboard app using current data "before all" hook: loadCurrentData
UI Functional Tests.test/functional/apps/dashboard/index·js.dashboard app using current data "before all" hook: loadCurrentData
UI Functional Tests.test/functional/apps/dashboard/_dashboard_time_picker·js.dashboard app using legacy data dashboard time picker "before all" hook
UI Functional Tests.test/functional/apps/dashboard/_dashboard_save·js.dashboard app using legacy data dashboard save "before all" hook
UI Functional Tests.test/functional/apps/getting_started/_shakespeare·js.Getting Started Shakespeare "before all" hook
UI Functional Tests.test/functional/apps/getting_started/_shakespeare·js.Getting Started Shakespeare "after all" hook
UI Functional Tests.test/functional/apps/getting_started/index·js.Getting Started "after all" hook
UI Functional Tests.test/functional/apps/management/index·js.management "before all" hook
UI Functional Tests.test/functional/apps/management/index·js.management "after all" hook
UI Functional Tests.test/functional/apps/management/index·js.management "before all" hook
UI Functional Tests.test/functional/apps/management/index·js.management "after all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "before all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "after all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "before all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "after all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "before all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "after all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "before all" hook
UI Functional Tests.test/functional/apps/visualize/index·js.visualize app "after all" hook
X-Pack Functional Tests.test/functional/apps/monitoring/cluster/list·js.Monitoring app Cluster listing with trial license clusters "before all" hook
X-Pack Functional Tests.test/functional/apps/monitoring/cluster/list·js.Monitoring app Cluster listing with trial license clusters "after all" hook
X-Pack Functional Tests.test/functional/apps/monitoring/cluster/list·js.Monitoring app Cluster listing "after all" hook
X-Pack Functional Tests.test/functional/apps/monitoring.Monitoring app "after all" hook
X-Pack Chromium API Reporting Tests.x-pack/test/reporting/api/chromium_tests·js.chromium "before all" hook
X-Pack Functional Tests.test/functional/apps/dashboard_mode/dashboard_view_mode·js.dashboard mode Dashboard View Mode "before all" hook: initialize tests
X-Pack Functional Tests.test/functional/apps/dashboard_mode/dashboard_view_mode·js.dashboard mode Dashboard View Mode "after all" hook
X-Pack Functional Tests.test/functional/apps/dashboard_mode.dashboard mode "after all" hook
X-Pack Functional Tests.test/functional/apps/security/security·js.security app Security Login Page "before all" hook
X-Pack Functional Tests.test/functional/apps/security/security·js.security app Security Login Page "after all" hook
X-Pack Functional Tests.test/functional/apps/security/security·js.security app Security "after all" hook
X-Pack Functional Tests.test/functional/apps/security.security app "after all" hook
X-Pack API Integration Tests.x-pack/test/api_integration/apis/monitoring/apm/overview·js.apis Monitoring APM overview "before all" hook: load archive
X-Pack Chromium Functional Reporting Tests.x-pack/test/reporting/functional/reporting·js.reporting app Reporting "before all" hook: initialize tests
X-Pack Chromium Functional Reporting Tests.x-pack/test/reporting/functional/reporting·js.reporting app Reporting "after all" hook
X-Pack Chromium Functional Reporting Tests.x-pack/test/reporting/functional/index·js.reporting app "after all" hook
X-Pack Functional Tests.test/functional/apps/infra/home_page·ts.InfraOps app Home page "before all" hook
X-Pack Functional Tests.test/functional/apps/infra/home_page·ts.InfraOps app Home page "after all" hook
X-Pack Functional Tests.test/functional/apps/infra.InfraOps app "after all" hook

Pull that updates the archives: #28862
Branch that should be worked on to resolve this: https://github.com/elastic/kibana/tree/upgrade/elasticsearch-7-0

@chrisdavies
Copy link
Contributor

The context for this issue is in an email thread, but the TL;DR; is: I had a PR open that updated all es_archives, but I closed the PR after talking to some other teams who were independently working on fixing their own tests. It seems best to let each team fix their own slice of the app, including their es_archvies so that there wasn't a big nasty merge involved.

@chrisdavies
Copy link
Contributor

We've moved forward with this, but are currently blocked by this issue:

elastic/elasticsearch#37773

Elasticsearch is loading up index templates which create mappings with the wrong root types (e.g. 'doc' or whatever), so our tests fail when we attempt to create indices / load archives with _doc or undefined as the root type.

@chrisronline is currently working around this by deleting all index templates prior to running the test suite.

@tylersmalley
Copy link
Contributor

To expand on this a bit, Kibana is probably only affected by a subset of the templates listed in elastic/elasticsearch#37773. Due to the templates existing, we need to create hacks to delete the templates in our functional testing to proceed (monitoring example)

@alvarolobato alvarolobato added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:Monitoring Stack Monitoring team Team:Operations Team label for Operations Team Team:QA Team label for QA Team Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.0.0
Projects
None yet
Development

No branches or pull requests

7 participants