Skip to content

Commit 320a33f

Browse files
committed
Revert "Added force remove application cmdlet in case of failure of remove ap… (#6431)"
This reverts commit 34d5dde.
1 parent 34d5dde commit 320a33f

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Tasks/ServiceFabricDeploy/ServiceFabricSDK/Publish-NewServiceFabricApplication.ps1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,17 @@
209209
Write-Host (Get-VstsLocString -Key SFSDK_AppAlreadyExistsInfo -ArgumentList @($ApplicationName, $app.ApplicationTypeName, $app.ApplicationTypeVersion))
210210

211211
try
212+
{
213+
$app | Remove-ServiceFabricApplication -Force
214+
}
215+
catch [System.TimeoutException]
216+
{
217+
# Catch operation timeout and continue with force remove replica.
218+
}
219+
220+
foreach ($node in Get-ServiceFabricNode)
212221
{
213-
$app | Remove-ServiceFabricApplication -Force
214-
}
215-
catch [System.TimeoutException]
216-
{
217-
$app | Remove-ServiceFabricApplication -Force -ForceRemove
222+
[void](Get-ServiceFabricDeployedReplica -NodeName $node.NodeName -ApplicationName $ApplicationName | Remove-ServiceFabricReplica -NodeName $node.NodeName -ForceRemove)
218223
}
219224

220225
if($OverwriteBehavior.Equals("Always"))

Tasks/ServiceFabricDeploy/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 1,
1919
"Minor": 6,
20-
"Patch": 1
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"Cmd"

Tasks/ServiceFabricDeploy/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 1,
1919
"Minor": 6,
20-
"Patch": 1
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"Cmd"

0 commit comments

Comments
 (0)