Miserlou/Zappa

Attempt to Import Event Sources - Warn if Function Does Not Exist

Open

#721 创建于 2017年3月15日

在 GitHub 查看
 (3 评论) (2 反应) (0 负责人)Python (11,903 star) (1,286 fork)batch import
help wanted

描述

Context

Feature Request to warn about typos.

In the zappa settings for events, If there are typos in event source function names, such as my recent use of a dash instead of an underscore, the error isn't apparent until zappa responds to the event and is unable to import the function used in response to the event.

Expected Behavior

For each event source in the stage, import the function to ensure it is reachable. Do this prior to uploading the zip. If the function is not reachable, raise an exception and message for the user.

"You have an event setup to call {{ function_name }}, but that that function cannot be imported. Please check for typos and ensure that the function is reachable."

Actual Behavior

Assumes function names are reachable.

贡献者指南