Skip to content

Add Azure Storage migration control rows - #1441

Merged
sophiatev merged 1 commit into
mainfrom
stevosyan/storage-migration-control
Nov 23, 2026
Merged

sophiatev merged 1 commit into
mainfrom
stevosyan/storage-migration-control

Conversation

@sophiatev

Copy link
Copy Markdown
Contributor

Migration needs a separate control row for each attempt so source hosts can read its drain flag and access deadline without confusing it with a later attempt. Add the AzureStorageMigration helper for the task hub's MigrationCtrl table, keyed by the migration GUID. Reads retain the Storage response time and ETag; updates replace an existing row only when its ETag still matches. Missing rows are not recreated, and failures other than missing reads or stale-update conflicts reach the caller.

This is the first PR extracted from stevosyan/storage-migration. The production helper is unchanged from that branch. SAS renewal and runtime activation will be wired in later PRs, so this PR does not enable migration or change normal workload processing. It adds no performance telemetry.

Validation: 15 focused tests passed on each of net8.0 and net48 (30 total). The tests use the Table SDK with a local HTTP handler and cover the row format, Storage clock, missing fields and rows, stale renewal after drain, separate migration attempts, and error propagation.

Copilot AI balanced review requested due to automatic review settings November 21, 2026 02:44

Copilot AI left a comment

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.

🟡 Changes recommended

The migration test file is under uppercase Test/ instead of the project’s lowercase test/ path, leaving all 15 cases uncompiled and undiscovered on case-sensitive checkouts.

1 open issue
What changed in this PR

Adds an Azure Storage helper for migration-attempt control rows, without enabling migration or changing normal workload processing.

Changes:

  • Uses migration GUIDs to isolate attempts in the task hub’s MigrationCtrl table.
  • Preserves Storage response time and ETags, with conditional updates and explicit error propagation.
  • Adds focused tests for row format, missing data, stale updates, and attempt isolation.
File Description
Test/​DurableTask.AzureStorage.Tests/​AzureStorageMigrationTests.cs Adds local-transport tests for migration control reads and updates.
src/​DurableTask.AzureStorage/​AzureStorageMigration.cs Implements per-attempt control-row reads and ETag-conditional replacements.

Review effort: Balanced

@sophiatev
sophiatev marked this pull request as ready for review November 21, 2026 04:47
@sophiatev
sophiatev merged commit add1e72 into main Nov 23, 2026
48 checks passed
@sophiatev
sophiatev deleted the stevosyan/storage-migration-control branch November 23, 2026 17:47
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