Skip to content

feat: Pipeline swap endpoint#28

Open
Darkheir wants to merge 2 commits intosekoiafrom
feat/pipelines_swap
Open

feat: Pipeline swap endpoint#28
Darkheir wants to merge 2 commits intosekoiafrom
feat/pipelines_swap

Conversation

@Darkheir
Copy link
Copy Markdown
Collaborator

Description

Add a new endpoint allowing to swap the pipelines of 2 indexes located on different nodes.

Both indexes must have the same number of pipelines running on the nodes.

Various check are made to ensure that the swap can't create any issues.

The ControlPlane actor processes messages strictly sequentially so swapping pipelines should not encounter any concurrency issue.

Copilot AI review requested due to automatic review settings April 10, 2026 13:57
Copy link
Copy Markdown

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

Adds a new API/RPC to swap indexing pipelines between two indexes on different indexers, with validation to prevent inconsistent swaps and an atomic plan update in the control plane.

Changes:

  • Add REST POST /api/v1/indexing/swap-pipelines handler forwarding to the control plane client.
  • Extend ControlPlaneService proto/Rust client/server with SwapIndexingPipelines RPC + RpcName.
  • Implement swap logic in IndexingScheduler (validate + apply) and add targeted unit tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
quickwit/quickwit-serve/src/rest.rs Wires the new swap endpoint into the API v1 route tree.
quickwit/quickwit-serve/src/indexing_api/rest_handler.rs Adds warp filter + endpoint function for swapping pipelines via control-plane client.
quickwit/quickwit-serve/src/indexing_api/mod.rs Re-exports the new REST handler.
quickwit/quickwit-proto/protos/quickwit/control_plane.proto Defines SwapIndexingPipelines RPC and request/response messages.
quickwit/quickwit-proto/src/codegen/quickwit/quickwit.control_plane.rs Generated Rust code for the new RPC/messages and tower/grpc plumbing.
quickwit/quickwit-proto/src/control_plane/mod.rs Registers RpcName for the new request type.
quickwit/quickwit-control-plane/src/indexing_scheduler/mod.rs Implements validated swap logic and adds tests covering success/failure/contradictions.
quickwit/quickwit-control-plane/src/control_plane.rs Adds actor handler to route swap requests into the indexing scheduler.

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

Comment thread quickwit/quickwit-control-plane/src/indexing_scheduler/mod.rs Outdated
Comment thread quickwit/quickwit-serve/src/indexing_api/rest_handler.rs
@Darkheir Darkheir force-pushed the feat/pipelines_swap branch from 46b3713 to 789ddbe Compare April 10, 2026 14:38
Signed-off-by: Darkheir <raphael.cohen@sekoia.io>
@Darkheir Darkheir force-pushed the feat/pipelines_swap branch from 789ddbe to 901d3e5 Compare April 10, 2026 15:25
@Darkheir Darkheir requested a review from rdettai-sk April 10, 2026 15:36
Comment thread quickwit/quickwit-control-plane/src/indexing_scheduler/mod.rs Outdated
Comment thread quickwit/quickwit-control-plane/src/indexing_scheduler/mod.rs Outdated
Signed-off-by: Darkheir <raphael.cohen@sekoia.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants