aws / aws-codedeploy-agent

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

Feature request: show info when agent is not responding instead of generic ApplicationStop error #307

Closed antoniustefan closed 2 years ago

antoniustefan commented 3 years ago

When CodeDeploy attempts a deployment, if the agent is not responding (crashed, not started, etc.) the deployment fails with a generic ApplicationStop error. It would be much better if the CodeDeploy actually checks if the agent is live and reports if it's not responding instead of incorrectly stating the the ApplicationStop step had some issue. It would prevent useless debugging of the app scripts when it's actually an agent health issue.

kaiwensun commented 2 years ago

Hi @antoniustefan ,

Thanks for your advice. It is CodeDeploy agents initiating requests to poll instructions from CodeDeploy server. When agent is not able to connect to server, it cannot report agent-side problems.

But that doesn't mean we can't fix this bad customer experience! Recently we've backfilled the following lifecycle's error message in the UI and API output when we notice that agent did not pick up the instruction before it times out.

CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server.