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

fix(aws-lambda): wait a little longer for the lambda when using a VPC #2778

Merged
merged 1 commit into from
May 23, 2024

Conversation

bbeesley
Copy link
Contributor

Description

When using the aws-lambda platform for running tests and using a VPC, it often takes a little longer for the function to become ready that it does when creating the lambda without a VPC. When the lambda doesn't get created in time that leaves things in an inconsistent state, as the lambda is also never cleaned up. To avoid changing the behaviour when not using a VPC, this change adds a check before starting the wait for lambda flow. If the lambda is going to be connected to a VPC it sets the wait timeout to 4 minutes, otherwise it sets it to the current value of 2 minutes.

This issue happens fairly regularly, the effect being a failed test run:
image

and an orphaned lambda floating in the aws account:
image

I'm afraid I didn't open an issue first (or write tests) since the change is extremely trivial, but lmk if you think it warrants writing tests.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
bbeesley Bill Beesley
When using the aws-lambda platform for running tests and using a VPC, it often takes a little longer
for the function to become ready that it does when creating the lambda without a VPC. When the
lambda doesn't get created in time that leaves things in an inconsistent state, as the lambda is
also never cleaned up. To avoid changing the behaviour when not using a VPC, this change adds a
check before starting the wait for lambda flow. If the lambda is going to be connected to a VPC it
sets the wait timeout to 4 minutes, otherwise it sets it to the current value of 2 minutes.
@CLAassistant
Copy link

CLAassistant commented May 22, 2024

CLA assistant check
All committers have signed the CLA.

@hassy
Copy link
Member

hassy commented May 22, 2024

Looks good @bbeesley! We can merge once you've had a chance to sign the CLA. Btw we just added container Lambda support in v2.0.12 in case you haven't seen it - should make test startup times on Lambda much faster.

@bbeesley
Copy link
Contributor Author

Looks good @bbeesley! We can merge once you've had a chance to sign the CLA. Btw we just added container Lambda support in v2.0.12 in case you haven't seen it - should make test startup times on Lambda much faster.

Ah nice, I'll check it out. We haven't been running as part of ci up until now to keep things fast, just been letting people run them via github actions on demand, but maybe now is a good time to revisit that.

@hassy hassy merged commit c8adbb7 into artilleryio:main May 23, 2024
15 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants