ingenieux / awseb-deployment-plugin

Jenkins Plugin for AWS Elastic Beanstalk
Apache License 2.0
29 stars 53 forks source link

Build marked as success when max number of health checks are run but deployment is still not complete #93

Open daddyg opened 4 years ago

daddyg commented 4 years ago

Hi,

I have recently seen an issue where our Elastic Beanstalk deployment failed, however the build reported that the deployment was successful. We are using version the latest version of the plugin, v0.3.19, with a ten second sleep between status checks, 30 attempts to check the status and we have checked "Ensure Health is Green after deploy?"

In the logs we can see that all 30 of our health status checks complete without the status going green. There is then an Environment Update timed-out. Aborting message, a clean up message and then Finished: SUCCESS

I suspect the root cause of this is that no exception is thrown when all 30 checks complete and then the line below swallows up the boolean status, and exits normally. There should probably be a check on the returned value and an exception thrown if true is returned from the perform() method. Either that or an appropriate exception is thrown on the final check.

https://github.com/ingenieux/awseb-deployment-plugin/blob/9ae5af490b54e7a8f34b16fa90e574b17635d03c/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSEBDeploymentBuilder.java#L193

Here is an extract of the logs

21:05:12 Checking health/status of environmentId xxx attempt 28/30
21:05:12 Versions reported: (current: yyy underDeployment: zzz). Should I move on? false
21:05:22 Checking health/status of environmentId xxx attempt 29/30
21:05:22 Versions reported: (current: yyy, underDeployment: zzz). Should I move on? false
21:05:32 Checking health/status of environmentId xxx attempt 30/30
21:05:32 Versions reported: (current: yyy, underDeployment: zzz. Should I move on? false
21:05:32 Environment Update timed-out. Aborting.
21:05:32 Cleaning up temporary file /tmp/awseb-4688522888339839339.zip
21:05:32 Finished: SUCCESS
Ana-Petrovic-BSI commented 2 years ago

I have same problem.

And somebody else create issue with same problem > https://github.com/ingenieux/awseb-deployment-plugin/issues/101

Is there any solution? It doesn't sounds good to have green deploy on Jenkins when that deploy actually failed.

avtaniket commented 1 year ago

I also face similar issues, any fix?

Build from Jenkins api-v232 # timeout=10 Finished: SUCCESS