Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix issue with CloudWatch after state reset #12755

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 1 commit into from
Jun 17, 2025

Conversation

pinzon
Copy link
Member

@pinzon pinzon commented Jun 13, 2025

Motivation

This PR fixes an issue that occurs when the CW Provider is restared and the user tries to write some metrics into the service with the "clean" state.

The cause of this issue is that the reset operation removes the directory /tmp/localstack/state/cloudwatch and the DB files inside it. After the reset operation, the provider doesn't start a new DB file. So any operation that comes after failes.

Changes

  • Make sure that a Database is started after a reset operation

Testing (Not)

  • the persistence feature is not available in this repository so a test cannot be added.

Copy link

Test Results - Preflight, Unit

21 613 tests  ±0   19 958 ✅ ±0   6m 15s ⏱️ -26s
     1 suites ±0    1 655 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 3de4977. ± Comparison against base commit 715d118.

Copy link

Test Results (amd64) - Acceptance

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

Results for commit 3de4977. ± Comparison against base commit 715d118.

Copy link

LocalStack Community integration with Pro

    2 files  ±    0    2 suites  ±0   42m 5s ⏱️ - 1h 1m 14s
1 041 tests  - 3 832  979 ✅  - 3 117  62 💤  - 715  0 ❌ ±0 
1 043 runs   - 3 832  979 ✅  - 3 117  64 💤  - 715  0 ❌ ±0 

Results for commit 3de4977. ± Comparison against base commit 715d118.

This pull request removes 3832 tests.
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]
…

Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   57m 37s ⏱️
1 065 tests 1 005 ✅ 60 💤 0 ❌
1 071 runs  1 005 ✅ 66 💤 0 ❌

Results for commit 3de4977.

Copy link

Test Results - Alternative Providers

987 tests   589 ✅  30m 9s ⏱️
  4 suites  398 💤
  4 files      0 ❌

Results for commit 3de4977.

@pinzon pinzon added the semver: patch Non-breaking changes which can be included in patch releases label Jun 13, 2025
@pinzon pinzon requested a review from giograno June 16, 2025 13:47
@pinzon pinzon marked this pull request as ready for review June 16, 2025 13:47
@pinzon pinzon requested a review from steffyP as a code owner June 16, 2025 13:47
Copy link
Member

@giograno giograno left a comment

Choose a reason for hiding this comment

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

LGTM ✔️

@pinzon pinzon merged commit ea6c7a2 into master Jun 17, 2025
42 of 43 checks passed
@pinzon pinzon deleted the cp/clouwdwatch/fix/after-state-reset branch June 17, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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