elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.79k stars 8.19k forks source link

[Index Management] [Serverless] Error when editing data stream retention #196331

Open alisonelizabeth opened 2 hours ago

alisonelizabeth commented 2 hours ago

Describe the bug: Endless spinner shown when attempting to edit retention at the data stream level. Error in browser console.

Steps to reproduce:

  1. Create a Security serverless project
  2. Navigate to Kibana, create a data stream using Dev Tools.
PUT _index_template/ds
{
  "index_patterns": ["ds"],
  "data_stream": {}
}

POST ds/_doc
{
  "@timestamp": "2020-01-27"
}
  1. Navigate to Index Management. Find the data stream and select it --> Click "Manage" --> Click "Edit data retention"
  2. Disable the toggle "Keep data up to maximum retention period"
  3. Note endless spinner and error in browser Console.

Expected behavior: I would expect to be able to add a custom retention value as long is it does not exceed the max.

Screenshots (if relevant): Image

Errors in browser console (if relevant):

indexManagement.chunk.0.js:3 Uncaught (in promise) Error: Unknown unit: 
    at $n (indexManagement.chunk.0.js:3:409989)
    at validator (indexManagement.chunk.0.js:3:410441)
    at esUiShared.plugin.js:1:4805
    at esUiShared.plugin.js:1:4993
    at Object.validate (esUiShared.plugin.js:1:5381)
    at esUiShared.plugin.js:1:13631
    at Array.map (<anonymous>)
    at Object.validateFields (esUiShared.plugin.js:1:13621)
    at indexManagement.chunk.0.js:3:413816
    at Xc (kbn-ui-shared-deps-npm.dll.js:429:106059)
$n @ indexManagement.chunk.0.js:3
validator @ indexManagement.chunk.0.js:3
(anonymous) @ esUiShared.plugin.js:1
(anonymous) @ esUiShared.plugin.js:1
(anonymous) @ esUiShared.plugin.js:1
(anonymous) @ esUiShared.plugin.js:1
(anonymous) @ esUiShared.plugin.js:1
(anonymous) @ indexManagement.chunk.0.js:3
Xc @ kbn-ui-shared-deps-npm.dll.js:429
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:437
$o @ kbn-ui-shared-deps-npm.dll.js:429
Uc @ kbn-ui-shared-deps-npm.dll.js:429
xc @ kbn-ui-shared-deps-npm.dll.js:429
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:429
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:437
$o @ kbn-ui-shared-deps-npm.dll.js:429
Qo @ kbn-ui-shared-deps-npm.dll.js:429
Zo @ kbn-ui-shared-deps-npm.dll.js:429
Xc @ kbn-ui-shared-deps-npm.dll.js:429
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:437
$o @ kbn-ui-shared-deps-npm.dll.js:429
Uc @ kbn-ui-shared-deps-npm.dll.js:429
qe @ kbn-ui-shared-deps-npm.dll.js:429
Zt @ kbn-ui-shared-deps-npm.dll.js:429Understand this error
elasticmachine commented 2 hours ago

Pinging @elastic/kibana-management (Team:Kibana Management)

alisonelizabeth commented 2 hours ago

At first glance, it would appear we are not accounting for the fact that data stream retention could not be defined (empty string) - related code.

Related PR: https://github.com/elastic/kibana/pull/193715