994
// Find new current and ramping and pass information in DeploymentVersionData when returning to the caller to
995
// preserve backwards compatibility.
997
>
var routingConfigLatestRampingVersion *deploymentpb.RoutingConfig
998
>
999
>
// Track the latest "versioned and TQ is a member" and "unversioned" routing configs
1000
>
// separately so a versioned current/ramping always wins over an unversioned-but-newer
1001
>
// entry in another deployment bucket, independent of map iteration order.
1002
>
//
1003
>
// Only chose those RoutingConfigs which pass the HasDeploymentVersion check due to the following example case:
1004
>
// t0: TQ "foo" is in current version A with other TQ's
1005
>
// t1: All other TQ's are moved to new version B except for "foo".
1006
>
// t2: New version B is set as the current version.
1007
>
//
1008
>
// When this happens, we sync to "foo" that A is no longer the current version by passing in the new routing config. However,
1009
>
// version B should not be considered as the current version for "foo" because the task-queue is not part of version B.
1010
>
var latestVersionedCurrent, latestUnversionedCurrent *deploymentpb.RoutingConfig
1011
>
var latestVersionedRamping, latestUnversionedRamping *deploymentpb.RoutingConfig
1012
>
1013
>
for _, deploymentInfo := range deployments.GetDeploymentsData() {
1014
rc := deploymentInfo.GetRoutingConfig()
1015