@@ -1104,33 +1104,37 @@ async def test_schedule_backfill(
1104
1104
state = ScheduleState (paused = True ),
1105
1105
),
1106
1106
backfill = [
1107
+ # 2 actions on Server >= 1.24, 1 action on Server < 1.24. Older
1108
+ # servers backfill workflows in the interval [start_at, end_at), but
1109
+ # newer servers backfill the interval [start_at, end_at].
1107
1110
ScheduleBackfill (
1108
1111
start_at = begin - timedelta (minutes = 30 ),
1109
1112
end_at = begin - timedelta (minutes = 29 ),
1110
1113
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1111
1114
)
1112
1115
],
1113
1116
)
1114
- # The number of items backfilled on a schedule boundary changed in 1.24, so
1115
- # we check for either
1116
- assert (await handle .describe ()).info .num_actions in [2 , 3 ]
1117
+ # We accept both 1.24 and pre-1.24 action counts
1118
+ assert (await handle .describe ()).info .num_actions in [1 , 2 ]
1117
1119
1118
1120
# Add two more backfills and and -2m will be deduped
1119
1121
await handle .backfill (
1122
+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24
1120
1123
ScheduleBackfill (
1121
1124
start_at = begin - timedelta (minutes = 4 ),
1122
1125
end_at = begin - timedelta (minutes = 2 ),
1123
1126
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1124
1127
),
1128
+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24, except on
1129
+ # Server >= 1.24, there is overlap with the prior backfill, so this is
1130
+ # only net +2 actions, regardless of Server version.
1125
1131
ScheduleBackfill (
1126
1132
start_at = begin - timedelta (minutes = 2 ),
1127
1133
end_at = begin ,
1128
1134
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1129
1135
),
1130
1136
)
1131
- # The number of items backfilled on a schedule boundary changed in 1.24, so
1132
- # we check for either
1133
- assert (await handle .describe ()).info .num_actions in [6 , 8 ]
1137
+ assert (await handle .describe ()).info .num_actions in [5 , 7 ]
1134
1138
1135
1139
await handle .delete ()
1136
1140
await assert_no_schedules (client )
0 commit comments