1431
// TODO (Shivam): remove the empty string check once canary stops flaking out
1432
if prevCurrentVersion != worker_versioning.UnversionedVersionId && prevCurrentVersion != "" {
1433
>
// Tell previous current that it's no longer current
workflow.go
1434
>
prevUpdateArgs := &deploymentspb.SyncVersionStateUpdateArgs{
1435
>
RoutingUpdateTime: updateTime,
1436
>
CurrentSinceTime: nil, // remove current
1437
>
RampingSinceTime: nil, // no change, the prev current was not ramping
1438
>
RampPercentage: 0, // no change, the prev current was not ramping
1439
>
RoutingConfig: routingConfigToSync,
1440
>
}
1441
>
if _, err := d.syncVersion(ctx, prevCurrentVersion, prevUpdateArgs); err != nil {
1442
return nil, err
1443
}
1445
// Set summary drainage status immediately to draining.
1446
// We know prevCurrentVersion cannot have been ramping, so it must now be draining