-
Notifications
You must be signed in to change notification settings - Fork 398
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
lambda_info - refactor to fix bug when querying all lambdas #1152
lambda_info - refactor to fix bug when querying all lambdas #1152
Conversation
cc @jillr @markuman @pjodouin @s-hertel @steynovich @tremble |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
async causing the problem:
|
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.
Depending on how many lambdas people have, this is potentially going to massively increase the default runtime when listing all lambdas.
I agree that only supporting the minimal query is definitely wrong (unless we make name and query mutually exclusive), however, based on my experience with other APIs, flipping the switch so that it defaults to making almost an order of magnitude more queries is likely to have a significant negative effect for anyone with a larger setup.
If this is to be backported I'd want to see the current behaviour preserved:
- default to "query=config" when the function isn't specified
- default to "query=all" when the function is specified
BUT, if query is explicitly set (currently 'all' is a default, so be careful), then that should override the default behaviour.
I'm approving for 4.0.0, but want to be clear I do not think the current PR should be backported.
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.
Switching to a "Request changes" because I don't think the current change fragment is 'right'
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 think this looks reasonable, with @tremble's comments noted
Co-authored-by: Jill R <[email protected]>
recheck |
This change depends on a change that failed to merge. |
recheck |
recheck |
@tremble can we backport this now with the updated changes? |
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #1188 🤖 @patchback |
lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes #1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> (cherry picked from commit 0c76aed)
…1188) [PR #1152/0c76aedd backport][stable-3] lambda_info - refactor to fix bug when querying all lambdas This is a backport of PR #1152 as merged into main (0c76aed). Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes #1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None>
…collections#1152) lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes ansible-collections#1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@0c76aed
Use missing_required_lib more consistently SUMMARY The developer docs recomment using missing_required_lib rather than a custom error message: https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#importing-and-using-shared-code ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/inventory/aws_ec2.py plugins/inventory/aws_rds.py plugins/lookup/aws_account_attribute.py plugins/lookup/aws_secret.py plugins/lookup/aws_ssm.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None>
Depends-On: ansible/ansible-zuul-jobs#1558
SUMMARY
query: config
when getting info for all lambdas. Refactored to return the expected infoFixes #1151
ISSUE TYPE
COMPONENT NAME
lambda_info
ADDITIONAL INFORMATION
This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug.