Skip to content

Block concurrent schedule changes during V2-to-V1 migration#11081

Open
chaptersix wants to merge 3 commits into
temporalio:mainfrom
chaptersix:v2-v1-migrate-bug
Open

Block concurrent schedule changes during V2-to-V1 migration#11081
chaptersix wants to merge 3 commits into
temporalio:mainfrom
chaptersix:v2-v1-migrate-bug

Conversation

@chaptersix

@chaptersix chaptersix commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject schedule updates, patches, and deletion while a V2-to-V1 migration is pending.
  • Prevent V2 backfill and invoker tasks from creating or starting actions during migration.
  • Add regression coverage for the public mutation and task fences.

Root cause

Migration pauses automated generation, but patch-triggered/backfill actions and already-ready invoker actions could still proceed while the migration task exported V2 state to V1. Those actions could be absent from the exported snapshot.

Validation

  • go test -tags test_dep ./chasm/lib/scheduler ./service/worker/scheduler
  • make lint-code

@chaptersix chaptersix changed the title Fix scheduler migration quiescing Fix V2-to-V1 scheduler migration quiescing Jul 15, 2026
@chaptersix chaptersix changed the title Fix V2-to-V1 scheduler migration quiescing Block concurrent schedule changes during V2-to-V1 migration Jul 15, 2026
@chaptersix
chaptersix marked this pull request as ready for review July 15, 2026 22:12
@chaptersix
chaptersix requested a review from a team as a code owner July 15, 2026 22:12
_ chasm.TaskInvocation,
_ *schedulerpb.InvokerExecuteTask,
) (bool, error) {
if invoker.Scheduler.Get(ctx).WorkflowMigration != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: mind adding a log just to indicate a drop which is otherwise silent and possibly a tad confusing?

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