Skip to content
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

Merged
merged 1 commit into from
Aug 31, 2018
Merged

Conversation

ksolie
Copy link
Contributor

@ksolie ksolie commented Aug 22, 2018

Signed-off-by: Kyle Solie [email protected]

Copy link
Contributor

@0rc 0rc left a 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"))
Copy link
Contributor

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?

Copy link
Contributor Author

@ksolie ksolie Aug 23, 2018

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?

Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor Author

@ksolie ksolie Aug 23, 2018

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.

@0rc
Copy link
Contributor

0rc commented Aug 23, 2018

for my PRs I was asked to have single squashed commit

@russmiles
Copy link
Contributor

@ksolie and @0rc , are we ready to merge this now? I could make it part of the 0.7.0 release if we can amend all changes this afternoon. Oh and resolve the small conflict with the CHANGELOG.md

@russmiles russmiles self-assigned this Aug 29, 2018
@0rc
Copy link
Contributor

0rc commented Aug 29, 2018

@russmiles I see no issues having this in 0.7.0

@ksolie ksolie force-pushed the master branch 12 times, most recently from 6cbe194 to 259ee0e Compare August 29, 2018 16:37
@ksolie
Copy link
Contributor Author

ksolie commented Aug 29, 2018

There is an updated version of moto (1.3.5) that is currently breaking the build:
getmoto/moto#1800

@0rc
Copy link
Contributor

0rc commented Aug 30, 2018

perhaps lock to previous version?

@ksolie
Copy link
Contributor Author

ksolie commented Aug 30, 2018

Should the lock to the previous version be in a new PR?

@russmiles
Copy link
Contributor

I believe that can go as an addition to this PR.

Signed-off-by: Kyle Solie <[email protected]>
Copy link
Contributor

@russmiles russmiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@russmiles russmiles merged commit 181fd0f into chaostoolkit-incubator:master Aug 31, 2018
ksolie added a commit to ksolie/chaostoolkit-aws that referenced this pull request Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants