Documentation
¶
Index ¶
- func CHASMToLegacyStartScheduleArgs(scheduler *schedulerpb.SchedulerState, generator *schedulerpb.GeneratorState, ...) *schedulespb.StartScheduleArgs
- func LegacyToCreateFromMigrationStateRequest(schedule *schedulepb.Schedule, info *schedulepb.ScheduleInfo, ...) *schedulerpb.CreateFromMigrationStateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CHASMToLegacyStartScheduleArgs ¶
func CHASMToLegacyStartScheduleArgs( scheduler *schedulerpb.SchedulerState, generator *schedulerpb.GeneratorState, invoker *schedulerpb.InvokerState, backfillers map[string]*schedulerpb.BackfillerState, lastCompletionResult *schedulerpb.LastCompletionResult, searchAttributes map[string]*commonpb.Payload, memo map[string]*commonpb.Payload, migrationTime time.Time, ) *schedulespb.StartScheduleArgs
CHASMToLegacyStartScheduleArgs converts CHASM scheduler state to V1 StartScheduleArgs. This is the primary V2-to-V1 migration function. The migrationTime parameter is used to initialize missing timestamps.
func LegacyToCreateFromMigrationStateRequest ¶
func LegacyToCreateFromMigrationStateRequest( schedule *schedulepb.Schedule, info *schedulepb.ScheduleInfo, state *schedulespb.InternalState, searchAttributes *commonpb.SearchAttributes, memo *commonpb.Memo, migrationTime time.Time, ) *schedulerpb.CreateFromMigrationStateRequest
LegacyToCreateFromMigrationStateRequest converts legacy (workflow-backed) scheduler state to a CreateFromMigrationStateRequest proto. This is the primary V1-to-V2 migration function.
The migrationTime parameter is used for initializing timestamps that don't have a direct mapping from V1 state (e.g., StartTime for running workflows).
State preserved during migration:
- Schedule spec, action, policies, and state
- ScheduleInfo metadata (action counts, create/update times)
- ConflictToken (for optimistic concurrency control)
- Buffered starts (with V2-specific fields like RequestId, WorkflowId populated)
- Running workflows (converted to BufferedStarts with RunId/StartTime set)
- Recent actions (converted to BufferedStarts with Completed field set)
- Ongoing backfills (converted to Backfiller components)
- Last completion result and continued failure
- High water mark (becomes Generator.LastProcessedTime)
- Search attributes and memo
Note: In V2, RunningWorkflows and RecentActions are computed on-demand from BufferedStarts by the Invoker, rather than being stored separately in ScheduleInfo.
Types ¶
This section is empty.