spinnaker-plugins / aws-lambda-deployment-plugin-spinnaker

Spinnaker plugin to support deployment of AWS Lambda functions via Spinnaker pipelines
Apache License 2.0
23 stars 22 forks source link

UI Error messages are un-helpful #71

Open eyal-mor opened 3 years ago

eyal-mor commented 3 years ago

In cases where the Lambda Plugin fails (I.E. NullPointerException), the UI prints No reason provided.

image image

Reproducing

There are no clear reproduction steps currently.

jorgebee65 commented 3 years ago

Is this happen in an specific Stage? I'm trying to replicate the issue using an AWS Lambda Deployment stage forcing a pipeline to throw an error and it is showing the proper details...

lambda error details

Please provide more details to try to replicate this issue.

dkirillov commented 3 years ago

Another example: Screen_Shot_2021-08-12_at_10_56_16_AM Screen_Shot_2021-08-12_at_10_56_31_AM

In my case - after digging around logs and looking through the stage configuration - it was an incorrect account being set.

This can be done by putting a SpEL expression as the account value in the JSON representation of the stage. Like so:

{
  "account": "${parameters[\"account_name\"]}",
  "batchsize": 10,
  "cloudProvider": "aws",
  ...
}

If a correct account name is passed in, that error does not happen. If an incorrect account is passed in, that error is provided, leaving you to figure things out.

It would be nice to have the error at least point in the general direction - or better, something along the lines of "your account is wrong." (in my case) or whatever the issue may be.

eyal-mor commented 3 years ago

If a specific region isn't enabled in the expected Spinnaker account, the following error message is returned.

image