-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lambda functionality #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor naming/testing comments here.
Also, I bet guys would ask for a line in the changelog
@@ -181,5 +181,7 @@ def load_exported_activities() -> List[DiscoveredActivities]: | |||
activities.extend(discover_actions("chaosaws.elbv2.actions")) | |||
activities.extend(discover_probes("chaosaws.elbv2.probes")) | |||
activities.extend(discover_probes("chaosaws.asg.probes")) | |||
activities.extend(discover_actions("chaosaws.awslambda.actions")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it better to name the package just 'lambda', not 'awslambda' to keep the consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that but lambda is a reserved word in python. We could change it to lambda_func
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point, but I think awslambda
is clearer than lambda_func
, and can see the name collision with simply lambda
, which would otherwise be preferred.
""" | ||
Throttles Lambda by setting reserved concurrency amount. | ||
""" | ||
client = aws_client("lambda", configuration, secrets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be good to check that function_name
and concurrent_executions
are passed as parameters and not null at least?
I understand that try
below is kind of guarding that, but I am afraid the error message could be sometimes misleading if you don't pass parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you get a TypeError if they aren't passed in as parameters? I added checking if the function_name
string is empty.
for my PRs I was asked to have single squashed commit |
@russmiles I see no issues having this in 0.7.0 |
6cbe194
to
259ee0e
Compare
There is an updated version of moto (1.3.5) that is currently breaking the build: |
perhaps lock to previous version? |
Should the lock to the previous version be in a new PR? |
I believe that can go as an addition to this PR. |
Signed-off-by: Kyle Solie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Kyle Solie <[email protected]>
Signed-off-by: Kyle Solie [email protected]