The Wayback Machine - https://web.archive.org/web/20210915110435/https://github.com/localstack/localstack/pull/4310
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

Local execution of Go lambda functions (clone) #4310

Merged
merged 47 commits into from Sep 8, 2021
Merged

Conversation

@pinzon
Copy link
Contributor

@pinzon pinzon commented Jul 15, 2021

Clone of #4309

@pinzon pinzon force-pushed the feature-local_go_lambda branch from 4c7b622 to 7bda194 Jul 15, 2021
@pinzon pinzon requested review from thrau and whummer Jul 15, 2021
@coveralls
Copy link

@coveralls coveralls commented Jul 16, 2021

Coverage Status

Coverage increased (+0.05%) to 80.341% when pulling 7a92938 on feature-local_go_lambda into d01b5ab on master.

@pinzon pinzon changed the title Feature local go lambda Local execution of Go lambda functions (clone) Jul 16, 2021
@whummer whummer force-pushed the feature-local_go_lambda branch from 15ee215 to 4ea3788 Jul 17, 2021
@whummer
Copy link
Member

@whummer whummer commented Jul 22, 2021

Thanks for the updated PR @pinzon ! 👍 Looks like there are a few commits from other authors in the commit history on your branch. Can we please rebase your branch onto latest master? (hopefully that's not going to create too much headache with merge conflicts - otherwise please let me know..) Thanks!

@pinzon pinzon force-pushed the feature-local_go_lambda branch from a8405b5 to 3fd7efc Jul 22, 2021
Copy link
Member

@whummer whummer left a comment

Nice changes, would be great to get this PR merged @pinzon ! 👍 Can we please rebase onto latest master to resolve the merge conflicts? Thanks!

localstack/services/install.py Outdated Show resolved Hide resolved
localstack/services/install.py Outdated Show resolved Hide resolved
localstack/services/install.py Outdated Show resolved Hide resolved
@pinzon pinzon force-pushed the feature-local_go_lambda branch from 3fd7efc to c8e3d5f Sep 6, 2021
@whummer whummer force-pushed the master branch from dbba3f3 to 118139d Sep 6, 2021
@pinzon pinzon force-pushed the feature-local_go_lambda branch from 1f54c09 to 39a084f Sep 6, 2021
@pinzon pinzon force-pushed the feature-local_go_lambda branch from 39a084f to 7a92938 Sep 7, 2021
@@ -1190,6 +1190,17 @@ def reset_default_env_variables(env_vars_before):
if env_value_before is None:
os.environ.pop(env_name, None)

def execute_go_lambda(self, event, context, main_file, func_details=None):
event_json_string = "%s" % (json.dumps(event) if event else "{}")
cmd = "AWS_LAMBDA_FUNCTION_HANDLER=%s AWS_LAMBDA_EVENT_BODY='%s' %s" % (

This comment has been minimized.

@whummer

whummer Sep 8, 2021
Member

@pinzon We probably want to pass in the event body as an environment variables dict, rather than in serialized string form (to avoid escaping issues). Not super critical for this PR, though - we can pick this up in a follow-up change.. Thanks

@whummer whummer merged commit 5fba0b2 into master Sep 8, 2021
7 checks passed
7 checks passed
ci/circleci: docker-build Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: itest-elasticmq Your tests passed on CircleCI!
Details
ci/circleci: itest-lambda-docker Your tests passed on CircleCI!
Details
ci/circleci: preflight Your tests passed on CircleCI!
Details
ci/circleci: report Your tests passed on CircleCI!
Details
coverage/coveralls Coverage increased (+0.05%) to 80.341%
Details
@whummer whummer deleted the feature-local_go_lambda branch Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants