openapi(dm): support task timezone - #12782
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThe change adds an optional task timezone to the OpenAPI model, validates timezone values, propagates timezones during task conversion, returns them in API responses, and rejects timezone changes during configuration updates. ChangesTask timezone support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant API Client
participant Task.Adjust
participant OpenAPITaskToSubTaskConfigs
participant Scheduler
API Client->>Task.Adjust: Submit task with timezone
Task.Adjust-->>API Client: Accept valid timezone or return ErrConfigInvalidTimezone
Task.Adjust->>OpenAPITaskToSubTaskConfigs: Adjusted task
OpenAPITaskToSubTaskConfigs->>Scheduler: Subtask configuration with timezone
Scheduler-->>API Client: Task response with timezone
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What problem does this PR solve?
Issue Number: ref #12756
DM task configuration supports
timezone, but this option is not availablethrough OpenAPI.
What is changed and how it works?
timezonefield to the OpenAPI task schema.omitted or empty.
The DST fall-back repeated-hour behavior observed during testing is an existing
DM runtime limitation, not introduced by OpenAPI. This PR only aligns the
OpenAPI capability, and changing the runtime behavior is out of scope.
Check List
Tests
Manual testing with DM, MySQL 8.4, and TiDB covered valid, invalid, and omitted
time zones, create and readback, update rejection, downstream-default behavior,
and full and incremental replication.
Questions
Will it cause performance regression or break compatibility?
No. The field is optional, and omitted or empty values preserve the existing
behavior.
Do you need to update user documentation, design documentation or monitoring documentation?
No additional documentation update is needed.
Release note
Summary by CodeRabbit
New Features
Documentation