Skip to content

Remove existing indices/datastreams/aliases before simulating index template#84675

Merged
dakrone merged 4 commits intoelastic:masterfrom
dakrone:fix-simulate-index-for-preexisting
Mar 8, 2022
Merged

Remove existing indices/datastreams/aliases before simulating index template#84675
dakrone merged 4 commits intoelastic:masterfrom
dakrone:fix-simulate-index-for-preexisting

Conversation

@dakrone
Copy link
Copy Markdown
Member

@dakrone dakrone commented Mar 4, 2022

Previously when constructing the "fake" response when simulating an index
template (/_index_template/_simulate_index/<myindexname>) an error would be thrown if there was an
index, alias, or data stream already existing with the provided index name. This commit makes it so
that simulating an index that may already exist treats it as though it was a new creation of the
index.

Resolves #84256

…emplate

Previously when constructing the "fake" response when simulating an index
template (`/_index_template/_simulate_index/<myindexname>`) an error would be thrown if there was an
index, alias, or data stream already existing with the provided index name. This commit makes it so
that simulating an index that may already exist treats it as though it was a new creation of the
index.

Resolves elastic#84256
@dakrone dakrone added >bug :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.2.0 v8.1.1 v8.0.2 v7.17.2 labels Mar 4, 2022
@dakrone dakrone requested a review from andreidan March 4, 2022 18:04
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Mar 4, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @dakrone, I've created a changelog YAML for you.

Copy link
Copy Markdown
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this Lee

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Mar 8, 2022

@elasticmachine update branch

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

Status Branch Result
8.1
8.0 Commit could not be cherrypicked due to conflicts
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 84675

dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 8, 2022
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 8, 2022
…emplate (elastic#84675)

# Conflicts:
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/180_simulate_existing_data_stream.yml
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 8, 2022
…emplate (elastic#84675)

# Conflicts:
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.simulate_index_template/10_basic.yml
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/180_simulate_existing_data_stream.yml
elasticsearchmachine pushed a commit that referenced this pull request Mar 8, 2022
…emplate (#84675) (#84768)

# Conflicts:
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/180_simulate_existing_data_stream.yml
elasticsearchmachine pushed a commit that referenced this pull request Mar 8, 2022
…index template (#84675) (#84769)

* Remove existing indices/datastreams/aliases before simulating index template (#84675)

# Conflicts:
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.simulate_index_template/10_basic.yml
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/180_simulate_existing_data_stream.yml

* Fix backport typo issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.17.2 v8.0.2 v8.1.1 v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulate index fails when index name already exists and has an alias

4 participants