Skip to content

Conversation

@mynameborat
Copy link
Contributor

Problem Statement

Currently, users can send migration requests to child controllers by mistake which causes the store and its metadata in a weird state resulting in unusable state.

Code changes

Add isParent() guards to migrateStore, completeMigration, abortMigration, and autoMigrateStore route handlers in StoresRoutes so that migration requests sent directly to child controllers are rejected with BAD_REQUEST. Internal admin message consumption (via AdminExecutionTask) is unaffected since it does not go through these HTTP routes.

How was this PR tested?

  • New unit tests added.
  • Modified or extended existing tests.

Does this PR introduce any user-facing or breaking changes?

  • No. You can skip the rest of this section.
  • Yes. Clearly explain the behavior change and its impact.

Add isParent() guards to migrateStore, completeMigration, abortMigration,
and autoMigrateStore route handlers in StoresRoutes so that migration
requests sent directly to child controllers are rejected with BAD_REQUEST.
Internal admin message consumption (via AdminExecutionTask) is unaffected
since it does not go through these HTTP routes.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Contributor

@sushantmane sushantmane left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants