Skip to content

Add index block removal API #4684

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

Merged
merged 11 commits into from
Jul 4, 2025
Merged

Add index block removal API #4684

merged 11 commits into from
Jul 4, 2025

Conversation

nielsbauman
Copy link
Contributor

Copy link
Contributor

github-actions bot commented Jun 27, 2025

Following you can find the validation changes for the APIs you have modified.

API Status Request Response
indices.create 🔴 1291/1328 → 1294/1328 1328/1328
indices.remove_block 🟠 → 🟢 Missing type → 1/1 Missing type → 1/1

You can validate these APIs yourself by using the make validate target.

@pquentin pquentin requested review from flobernd and l-trotta and removed request for pquentin June 27, 2025 12:31
}
}

export class IndicesBlockStatus {
export class AddIndicesBlockStatus {
Copy link
Member

Choose a reason for hiding this comment

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

Thinking about future API extensions: If there is the chance for a get_index_block_status endpoint in the future, it would probably make sense to have this type in the _types namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think that's super relevant, as an API like that will always return which type of block exists on the index, rather than just a boolean.

* @rest_spec_name indices.remove_block
* @availability stack since=9.1.0 stability=stable
* @availability serverless stability=stable visibility=public
* @doc_id index-block-remove

Choose a reason for hiding this comment

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

Are there any index_privileges or cluster_privileges we need to specify? these will show up in the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I'm not familiar with privileges myself, so I'll ask around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the manage index privilege. We'll have to add it to IndicesAddBlockRequest as well, but I'll do that in a follow-up PR.

@nielsbauman
Copy link
Contributor Author

@pquentin I'm not sure how to resolve the conflicts with main. Could you take care of that, perhaps?

@nielsbauman nielsbauman requested a review from pquentin July 3, 2025 12:27
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM. Since everything in output/ is generated, I fixed the conflicts by running make contrib.

@pquentin pquentin merged commit e668a98 into main Jul 4, 2025
8 checks passed
@pquentin pquentin deleted the remove-block-api branch July 4, 2025 09:25
github-actions bot pushed a commit that referenced this pull request Jul 4, 2025
* Add index block removal API

Follow-up of elastic/elasticsearch#129128

* Fix block enum

* Add doc-id to table

* Fix lint

* Move IndicesBlockOptions and IndicesBlockStatus to indices/_types

It's breaking but avoids duplicating the type names, which is forbidden.

* Separate BlockStatus as it is different

* Rename response example file

* Fix response fields

* Add index privilege

---------

Co-authored-by: Quentin Pradet <[email protected]>
(cherry picked from commit e668a98)
pquentin added a commit that referenced this pull request Jul 4, 2025
* Add index block removal API

Follow-up of elastic/elasticsearch#129128

* Fix block enum

* Add doc-id to table

* Fix lint

* Move IndicesBlockOptions and IndicesBlockStatus to indices/_types

It's breaking but avoids duplicating the type names, which is forbidden.

* Separate BlockStatus as it is different

* Rename response example file

* Fix response fields

* Add index privilege

---------


(cherry picked from commit e668a98)

Co-authored-by: Niels Bauman <[email protected]>
Co-authored-by: Quentin Pradet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants