aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
328 stars 188 forks source link

file_exists_behavior appspec.yml definition vs console selection/non-selection #305

Open ekeyser opened 3 years ago

ekeyser commented 3 years ago

This is perhaps edge case but I was confused why this appspec directive (file_exists_behavior) was not being adhered to. It was because when initiating a deployment from the console even though I had made no selection (Additional Deployment Behavior -> Content Options) and was initially even unaware there was an option to select. This resulted in default behavior (fail the deployment) resulting in, well, failed deployment even though clearly I had defined the directive in appspec.yml.

I have read issue #14 . I see that file_exists_behavior was added in v1.3.2 (which I'm running). From reading through that detailed issue there seems to have been some past buggy behavior although from what I could determine the actual directive itself (file_exists_behavior) wasn't introduced until 1.3.2. Not sure where the buggy behavior was prior (cli maybe?). In the issue it is even indicated that appspec will override cli. Wondering why this isn't the same for console. At any rate, to me the current behavior is non-intuitive behavior especially in non-selection scenarios through the console.

In other words Expected behavior: console: no selection -> abide by appspec.yml directive console: selection -> ignore appspec.yml directive OR fail on directive collision

Much appreciated