Skip to content

Add yaml tests for reindex cancellation#140894

Merged
szybia merged 5 commits intoelastic:mainfrom
szybia:reindex-cancel-yaml-tests
Jan 22, 2026
Merged

Add yaml tests for reindex cancellation#140894
szybia merged 5 commits intoelastic:mainfrom
szybia:reindex-cancel-yaml-tests

Conversation

@szybia
Copy link
Copy Markdown
Contributor

@szybia szybia commented Jan 19, 2026

  • Add yaml rest tests for reindex cancellation to better assert format, test REST layer, and bake in format for BwC
  • This should wrap up reindex cancellation implementation. do let me know if i missed something...

Closes elastic/elasticsearch-team#2086

@szybia szybia marked this pull request as ready for review January 19, 2026 12:50
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jan 19, 2026
@szybia szybia added >non-issue :Distributed/Reindex Issues relating to reindex that are not caused by issues further down and removed needs:triage Requires assignment of a team area label labels Jan 19, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing (obsolete) Meta label for Distributed Indexing team. Obsolete. Please do not use. label Jan 19, 2026
@szybia szybia requested a review from Copilot January 19, 2026 12:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds YAML REST tests for the reindex cancellation feature to ensure proper format validation, test the REST layer, and establish backward compatibility format expectations.

Changes:

  • Added comprehensive YAML REST tests covering successful cancellation, error scenarios, and task type validation
  • Implemented capability support in the REST handler for feature detection
  • Removed redundant Java integration tests that are now covered by YAML tests

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
modules/reindex-management/src/yamlRestTest/resources/rest-api-spec/test/reindex/30_cancel_reindex.yml New YAML test file with three test scenarios for reindex cancellation
modules/reindex-management/src/main/java/org/elasticsearch/reindex/management/RestCancelReindexAction.java Added capability support method to REST handler
modules/reindex-management/src/internalClusterTest/java/org/elasticsearch/reindex/management/ReindexCancelIT.java Removed Java tests now covered by YAML tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@PeteGillinElastic PeteGillinElastic left a comment

Choose a reason for hiding this comment

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

Thanks. Just one small suggestion.

…-tests

* upstream/main: (104 commits)
  Partition time-series source (elastic#140475)
  Mute org.elasticsearch.xpack.esql.heap_attack.HeapAttackSubqueryIT testManyRandomKeywordFieldsInSubqueryIntermediateResultsWithSortManyFields elastic#141083
  Reindex relocation: skip nodes marked for shutdown (elastic#141044)
  Make fails on fixture caching not fail image building (elastic#140959)
  Add multi-project tests for get and list reindex (elastic#140980)
  Painless docs overhaul (reference) (elastic#137211)
  Panama vector implementation of codePointCount (elastic#140693)
  Enable PromQL in release builds (elastic#140808)
  Update rest-api-spec for Jina embedding task (elastic#140696)
  [CI] ShardSearchPhaseAPMMetricsTests testUniformCanMatchMetricAttributesWhenPlentyOfDocumentsInIndex failed (elastic#140848)
  Combine hash computation with bloom filter writes/reads (elastic#140969)
  Refactor posting iterators to provide more information (elastic#141058)
  Wait for cluster to recover to yellow before checking index health (elastic#141057) (elastic#141065)
  Fix repo analysis read count assertions (elastic#140994)
  Fixed a bug in logsdb rolling upgrade sereverless tests involving par… (elastic#141022)
  Fix readiness edge case on startup (elastic#140791)
  PromQL: fix quantile function (elastic#141033)
  ignore `mmr` command for check (in development) (elastic#140981)
  Use Double.compare to compare doubles in tdigest.Sort (elastic#141049)
  Migrate third party module tests using legacy test clusters framework (elastic#140991)
  ...
@szybia szybia enabled auto-merge (squash) January 21, 2026 22:11
@szybia szybia merged commit bdeba1d into elastic:main Jan 22, 2026
34 of 35 checks passed
@szybia szybia deleted the reindex-cancel-yaml-tests branch January 22, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Reindex Issues relating to reindex that are not caused by issues further down >non-issue Team:Distributed Indexing (obsolete) Meta label for Distributed Indexing team. Obsolete. Please do not use. v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants