10000 Include reserved_concurrent_executions in get_function response by k-a-il · Pull Request #12654 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Include reserved_concurrent_executions in get_function response #12654

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

Merged
merged 3 commits into from
May 23, 2025

Conversation

k-a-il
Copy link
Contributor
@k-a-il k-a-il commented May 22, 2025

Motivation

This PR fixes a bug reported by a user. The issue was that when a Lambda function was created in Localstack using Terraform, the reserved_concurrent_executions value always reset to -1 in tfstate after apply.

While trying to reproduce the issue, I saw that the reserved_concurrent_executions value was saved correctly in the created lambda, but reserved_concurrent_executions wasn’t returned in the AWSLambda::GetFunction response. Because the response didn’t include the value, Terraform set the value to default -1 and saved that in the tfstate file.

Changes

Added code to return the function's reserved_concurrent_executions value if it is set

Testing

  • Added new integration test to test that after reserved_concurrent_executions value is updated it is also being returned in response of AWSLambda::GetFunction

@k-a-il k-a-il self-assigned this May 22, 2025
@k-a-il k-a-il added the semver: patch Non-breaking changes which can be included in patch releases label May 22, 2025
Copy link
github-actions bot commented May 22, 2025

Test Results - Preflight, Unit

21 601 tests  ±0   19 955 ✅ ±0   6m 3s ⏱️ -8s
     1 suites ±0    1 646 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 543f91b. ± Comparison against base commit 20c40d1.

♻️ This comment has been updated with latest results.

Copy link
github-actions bot commented May 22, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 10s ⏱️ +4s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 543f91b. ± Comparison against base commit 20c40d1.

♻️ This comment has been updated with latest results.

Copy link
github-actio 8000 ns bot commented May 22, 2025

Test Results - Alternative Providers

597 tests  ±0   419 ✅ ±0   14m 54s ⏱️ +4s
  4 suites ±0   178 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 543f91b. ± Comparison against base commit 20c40d1.

♻️ This comment has been updated with latest results.

Copy link
github-actions bot commented May 22, 2025

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   1h 18m 55s ⏱️ - 23m 14s
3 258 tests  - 1 205  2 972 ✅  - 1 102  286 💤  - 103  0 ❌ ±0 
3 260 runs   - 1 205  2 972 ✅  - 1 102  288 💤  - 103  0 ❌ ±0 

Results for commit 543f91b. ± Comparison against base commit 20c40d1.

This pull request removes 1206 and adds 1 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.lambda_.test_lambda.TestLambdaConcurrency ‑ test_lambda_concurrency_update

♻️ This comment has been updated with latest results.

Copy link
github-actions bot commented May 22, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files  ±0      5 suites  ±0   2h 23m 38s ⏱️ + 1m 28s
4 819 tests +1  4 277 ✅ +1  542 💤 ±0  0 ❌ ±0 
4 825 runs  +1  4 277 ✅ +1  548 💤 ±0  0 ❌ ±0 

Results for commit 543f91b. ± Comparison against base commit 20c40d1.

♻️ This comment has been updated with latest results.

@k-a-il k-a-il added the review: merge when ready Signals to the reviewer that a PR can be merged if accepted label May 22, 2025
@k-a-il k-a-il marked this pull request as ready for review May 22, 2025 13:30
@k-a-il k-a-il changed the title Return lambda's reserved_concurrent_executions from get_function Include reserved_concurrent_executions in get_function response May 22, 2025
Copy link
Member
@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Nice fix! I just have some minor comments :)

8000
@k-a-il k-a-il requested a review from dfangl May 22, 2025 17:51
Copy link
Member
@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments! LGTM!

@k-a-il k-a-il merged commit 893018f into master May 23, 2025
57 checks passed
@k-a-il k-a-il deleted the lambda-get-function-info-concurrency branch May 23, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review: merge when ready Signals to the reviewer that a PR can be merged if accepted semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0