elastic / kibana

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

[DevTools] Support variables as substrings for index names in `_reindex` API #161833

Closed simonhearne closed 1 month ago

simonhearne commented 1 year ago

Describe the feature: Developer Tools variables are useful for standardising workflows. Unfortunately variables are not supported as partial elements of strings, e.g. in _reindex if variable name:test:

Does work:

POST _reindex
{
  "source": {
    "index": "index1"
  },
  "dest": {
    "index": "${name}"
  }
}

Resulting index: test

Does not work:

POST _reindex
{
  "source": {
    "index": "index1"
  },
  "dest": {
    "index": "prefix-${name}"
  }
}

Resulting index: prefix-${name}

Thus the following request will now fail with index_not_found_exception as the index prefix-test does not exist:

GET prefix-${name}

Ideally variables should be usable as substrings within index name definitions. It is likely that this impacts more API endpoints beyond _reindex.

simonhearne commented 1 year ago

Note that this issue is also present in the pipeline property, e.g.

POST _reindex
{
  "source": {
    "index": "index1"
  },
  "dest": {
    "index": "${name}",
    "pipeline": "prefix-${pipeline}"
  }
}

This will fail with pipeline with id [prefix-${pipeline}] does not exist

elasticmachine commented 1 year ago

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

yuliacech commented 1 month ago

Duplicate of https://github.com/elastic/kibana/issues/161833