Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 committed Jan 29, 2024
1 parent bf4ddf4 commit 544bd26
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions adapter/internal/operator/synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ func deployMultipleAPIsInGateway(event *APIEvent, successChannel *chan SuccessEv
for label := range updatedLabels {
updatedLabelsMap[label] = struct{}{}
}
} else {
adapterInternalAPIHolderMapKey := xds.PrepareAdapterInternalAPIHolderKey(string(apiState.APIDefinition.GetObjectMeta().GetUID()), constants.Production)
// It will delete the adapterInternalMap related to the production env if exists
xds.DeleteAPIFromInternalMap(adapterInternalAPIHolderMapKey)
}

if apiState.SandHTTPRoute != nil {
Expand All @@ -178,6 +182,10 @@ func deployMultipleAPIsInGateway(event *APIEvent, successChannel *chan SuccessEv
for label := range updatedLabels {
updatedLabelsMap[label] = struct{}{}
}
} else {
adapterInternalAPIHolderMapKey := xds.PrepareAdapterInternalAPIHolderKey(string(apiState.APIDefinition.GetObjectMeta().GetUID()), constants.Sandbox)
// It will delete the adapterInternalMap related to the sandbox env if exists
xds.DeleteAPIFromInternalMap(adapterInternalAPIHolderMapKey)
}
}

Expand All @@ -204,6 +212,10 @@ func deployMultipleAPIsInGateway(event *APIEvent, successChannel *chan SuccessEv
for label := range updatedLabels {
updatedLabelsMap[label] = struct{}{}
}
} else {
adapterInternalAPIHolderMapKey := xds.PrepareAdapterInternalAPIHolderKey(string(apiState.APIDefinition.GetObjectMeta().GetUID()), constants.Production)
// It will delete the adapterInternalMap related to the production env if exists
xds.DeleteAPIFromInternalMap(adapterInternalAPIHolderMapKey)
}
if apiState.SandGQLRoute != nil {
_, updatedLabels, err := generateGQLAdapterInternalAPI(apiState, apiState.SandGQLRoute, constants.Sandbox)
Expand All @@ -217,6 +229,10 @@ func deployMultipleAPIsInGateway(event *APIEvent, successChannel *chan SuccessEv
for label := range updatedLabels {
updatedLabelsMap[label] = struct{}{}
}
} else {
adapterInternalAPIHolderMapKey := xds.PrepareAdapterInternalAPIHolderKey(string(apiState.APIDefinition.GetObjectMeta().GetUID()), constants.Sandbox)
// It will delete the adapterInternalMap related to the sandbox env if exists
xds.DeleteAPIFromInternalMap(adapterInternalAPIHolderMapKey)
}
}
updatedAPIs = append(updatedAPIs, utils.NamespacedName(apiState.APIDefinition))
Expand Down

0 comments on commit 544bd26

Please sign in to comment.