community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

Added functionality to Lambda module for Container based Lambdas

Open gen2fish opened this issue 2 years ago • 10 comments

SUMMARY

This PR adds functionality to the existing lambda module to create and manage container based lambdas

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lambda

gen2fish avatar Oct 21 '21 00:10 gen2fish

cc @jillr @markuman @s-hertel @steynovich @tremble @wimnat click here for bot help

ansibullbot avatar Oct 21 '21 00:10 ansibullbot

@gen2fish Thank you for the PR.

The sanity checks are failing

ERROR: Found 2 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/lambda.py:0:0: doc-missing-type: Argument 'image_uri' in argument_spec uses default type ('str') but documentation doesn't define type
ERROR: plugins/modules/lambda.py:0:0: undocumented-parameter: Argument 'image_uri' is listed in the argument_spec, but not documented in the module documentation

Therefore the integrationtests are not running.
You need to expand the documentation section. It would be also helpful if you complete the example section with the usage of the new parameters. And the same for the integrationtest. And at least you'll need a changelog fragment :)

markuman avatar Oct 21 '21 06:10 markuman

Thanks for your PR.

Tests will currently fail due to missing permissions in CI. A matching PR on https://github.com/mattclay/aws-terminator/tree/master/aws/policy will also be needed.

tremble avatar Oct 24 '21 15:10 tremble

Thanks @tremble, I got unit tests to pass, but the errors in the CI for integration test seem to be around loading an outside collection.

ERROR! couldn't resolve module/action 'community.docker.docker_login'. This often indicates a misspelling, missing collection, or incorrect module path.

I'm failing pretty hard at getting it loaded, is there someplace other than tests/requirements.yml to get that collection loaded?

I'll start working on the pr for ECR stuffs in the terminator, though.

gen2fish avatar Oct 24 '21 16:10 gen2fish

It doesn't appear that the integration tests are loading all the collections from tests/requirements.yml into the test environment. I'm not certain where that is set or how to move forward. Any pointers would be appreciated.

I can remove those sections of the integration test if a maintainer would like, but I'm not certain that is the desired outcome.

gen2fish avatar Oct 29 '21 04:10 gen2fish

blocked waiting on https://github.com/mattclay/aws-terminator/pull/178

gen2fish avatar Oct 31 '21 17:10 gen2fish

recheck

jillr avatar Nov 11 '21 21:11 jillr

recheck

gen2fish avatar Nov 22 '21 15:11 gen2fish

@gen2fish It seems sanity of falling because of:

ERROR: Found 1 pep8 issue(s) which need to be resolved: 2275 | 2021-11-22 16:05:06.273885 \| fedora-34 \| ERROR: plugins/modules/lambda.py:438:5: E303: too many blank lines (3)

Could you please address it? Thank you.

alinabuzachis avatar Nov 22 '21 16:11 alinabuzachis

@gen2fish Since the lambda* modules has been migrated to https://github.com/ansible-collections/amazon.aws, could you please re-open this PR against https://github.com/ansible-collections/amazon.aws? Thank you.

alinabuzachis avatar Sep 28 '22 10:09 alinabuzachis