Skip to content

Conversation

@pinzon
Copy link
Member

@pinzon pinzon commented Feb 3, 2026

Motivation

As part of the internalization of CloudWatch Logs, this PR introduces a new AWS-validated test suite that consolidates tests from bot the existing LocalStack test suite and the Moto library test suite, organizing them by feature for better maintainability.

Changes

Metric Count
Total Moto Tests 85
Migrated 73 (~86%)
Not Yet Migrated 12 (~14%)
Additional LocalStack Tests 8

Migration Mapping by Test File

Moto File LocalStack File Status
test_logs/test_logs.py (log groups) test_logs_groups.py ✅ Migrated
test_logs/test_logs.py (streams) test_logs_streams.py ✅ Migrated
test_logs/test_logs.py (events) test_logs_events.py ✅ Migrated
test_logs/test_logs.py (destinations) test_logs_destinations.py ✅ Migrated
test_logs/test_logs.py (resource policies) test_logs_resource_policies.py ✅ Migrated
test_logs/test_logs.py (delivery) test_logs_delivery.py ✅ Migrated
test_logs/test_logs_tags.py test_logs_destinations.py, test_logs_groups.py ✅ Migrated
test_logs/test_logs_metric_filters.py test_logs_metric_filters.py ✅ Migrated
test_logs/test_logs_filter_log_events.py test_logs_filter_events.py ✅ Migrated
test_logs/test_integration.py test_logs_subscription_filters.py ✅ Mostly
test_logs/test_export_tasks.py test_logs_export_tasks.py ✅ Migrated (skipped)
test_logs/test_logs_query/test_boto3.py test_logs_queries.py ✅ Migrated
test_logs/test_logs_cloudformation.py ❌ Not Migrated
test_logs/test_models.py ❌ Not Migrated
test_logs/test_logs_query/test_query.py ❌ Not Migrated
test_logs/test_logs_query/test_query_parser.py ❌ Not Migrated

Related

Internalization PR: #13521

Notes

Assisted by AI 🤖

@pinzon pinzon changed the base branch from main to logs/experiment-sqlite February 3, 2026 21:09
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results (MA/MR) - Preflight, Unit

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit e37fae4.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results - Preflight, Unit

23 099 tests  ±0   21 237 ✅ ±0   6m 17s ⏱️ -4s
     1 suites ±0    1 862 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 589e278. ± Comparison against base commit 2046dff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   59m 36s ⏱️ - 58m 32s
2 387 tests  - 2 815  2 262 ✅  - 2 589  125 💤  - 226  0 ❌ ±0 
2 394 runs   - 2 810  2 267 ✅  - 2 584  127 💤  - 226  0 ❌ ±0 

Results for commit 76e70f6. ± Comparison against base commit d8ec7bc.

This pull request removes 2932 and adds 117 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.logs.test_logs_delivery.TestDeliveries ‑ test_create_delivery
tests.aws.services.logs.test_logs_delivery.TestDeliveries ‑ test_delete_delivery
tests.aws.services.logs.test_logs_delivery.TestDeliveries ‑ test_describe_deliveries
tests.aws.services.logs.test_logs_delivery.TestDeliveries ‑ test_get_delivery
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinationPolicies ‑ test_delete_delivery_destination_policy
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinationPolicies ‑ test_get_delivery_destination_policy
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinationPolicies ‑ test_put_delivery_destination_policy
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinations ‑ test_delete_delivery_destination
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinations ‑ test_delete_delivery_destination_not_found
tests.aws.services.logs.test_logs_delivery.TestDeliveryDestinations ‑ test_describe_delivery_destinations
…
This pull request removes 245 skipped tests and adds 19 skipped tests. Note that renamed tests count towards both.
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input4-FAILED]
tests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_deployed_infra_state
tests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_populate_data
tests.aws.scenario.mythical_mysfits.test_mythical_misfits.TestMythicalMisfitsScenario ‑ test_user_clicks_are_stored
tests.aws.services.apigateway.test_apigateway_api.TestApiGatewayApiRestApi ‑ test_get_api_case_insensitive
tests.aws.services.apigateway.test_apigateway_api.TestApiGatewayApiRestApi ‑ test_update_rest_api_concatenation_of_errors
tests.aws.services.apigateway.test_apigateway_api.TestApigatewayIntegration ‑ test_put_integration_request_parameter_bool_type
tests.aws.services.apigateway.test_apigateway_api.TestApigatewayIntegrationResponse ‑ test_integration_response_invalid_responsetemplates
tests.aws.services.apigateway.test_apigateway_basic.TestAPIGateway ‑ test_api_gateway_authorizer_crud
…
tests.aws.services.logs.test_logs_destinations.TestDestinationsTags ‑ test_destination_tags
tests.aws.services.logs.test_logs_events.TestLogsEvents ‑ test_put_log_events_too_new
tests.aws.services.logs.test_logs_events.TestLogsEvents ‑ test_put_log_events_too_old
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_cancel_export_task_not_found
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_create_export_task
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_create_export_task_bucket_not_found
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_create_export_task_log_group_not_found
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_create_export_task_with_prefix
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_describe_export_tasks
tests.aws.services.logs.test_logs_export_tasks.TestExportTasks ‑ test_describe_export_tasks_not_found
…

♻️ This comment has been updated with latest results.

@pinzon pinzon force-pushed the logs/internalize-test-suit branch from 308c858 to 84cc8b9 Compare February 4, 2026 18:56
@pinzon pinzon requested a review from a team February 6, 2026 21:11
@pinzon pinzon added aws:logs AWS CloudWatch Logs semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Feb 6, 2026
@pinzon pinzon force-pushed the logs/experiment-sqlite branch from d6d17ca to 2a52f91 Compare February 6, 2026 21:13
@pinzon pinzon force-pushed the logs/internalize-test-suit branch from bc34e9a to bd83044 Compare February 6, 2026 21:13
@pinzon pinzon force-pushed the logs/experiment-sqlite branch from 2a52f91 to c597fa9 Compare February 9, 2026 15:26
@pinzon pinzon force-pushed the logs/internalize-test-suit branch from bd83044 to 1449515 Compare February 9, 2026 15:26
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   2m 59s ⏱️ -2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 589e278. ± Comparison against base commit 2046dff.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 39m 34s ⏱️
5 718 tests 5 193 ✅ 524 💤 1 ❌
5 724 runs  5 193 ✅ 530 💤 1 ❌

For more details on these failures, see this check.

Results for commit 589e278.

♻️ This comment has been updated with latest results.

@pinzon pinzon force-pushed the logs/internalize-test-suit branch from 5fd158c to b403b67 Compare February 10, 2026 17:07
@pinzon pinzon changed the base branch from logs/experiment-sqlite to main February 10, 2026 17:08
@pinzon pinzon force-pushed the logs/internalize-test-suit branch from b403b67 to 9915490 Compare February 10, 2026 17:11
@pinzon pinzon marked this pull request as ready for review February 10, 2026 18:16
@pinzon pinzon requested a review from steffyP as a code owner February 10, 2026 18:16
Copy link
Member

@steffyP steffyP left a comment

Choose a reason for hiding this comment

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

Great initiative, @pinzon 🥳 🙌

I have a couple of remarks:

  1. in several test classes the fixtures for creating log-group and log-stream are duplicated. Could you consolidate and ideally put them into the fixtures.py?
  2. I spotted a couple of tests (or classes) marked with @pytest.mark.skip(reason="not supported") - could you please elaborate why this is not supported? given that the tests have been ported from moto they should work, shouldn't they?
  3. just my personal opinion (feel free to ignore): i would love to get more hard facts into the PR description, e.g. how many tests have been added/ported from moto?

Copy link
Member

Choose a reason for hiding this comment

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

This file should be deleted if it's now empty :)
also please make sure to get the upstream changes from main, as formatting rules slightly changed (that's causing the merge-conflict).

"""Tests for metric filter integration with CloudWatch metrics."""

@markers.aws.validated
@pytest.mark.skip(reason="not implemented correctly")
Copy link
Member

Choose a reason for hiding this comment

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

NIT: originally we had this skip note:

@pytest.mark.skip("TODO: failing against community - filters are only in pro -> move test?")

It would be great to add a similar comment here, as it should be implemented in pro.

@pinzon pinzon force-pushed the logs/internalize-test-suit branch from 5cfcdc4 to 589e278 Compare February 11, 2026 21:27
@pinzon
Copy link
Member Author

pinzon commented Feb 11, 2026

Thanks @steffyP. I added the report. Removed the extra file and added more details in the skips. I have some theories on why some of them fail but nothing concrete. For example:

  • The test related with exports fail with a "bucket not found". That happens because logs service searches in memory.
  • Tests that are related to tags could be failing because some resources are handled by moto and others by LocalStack.

Still, this new test suite made me learn that the new internalized service provider is (#13521) greatly incomplete.

Copy link
Member

@steffyP steffyP 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 all suggestions 👍 🙌

Once the pipeline is green (there are currently issues with pro) it should be good to merge :)

@steffyP
Copy link
Member

steffyP commented Feb 12, 2026

Still, this new test suite made me learn that the new internalized service provider is (#13521) greatly incomplete.

@pinzon: yes, that is true. :)
Regarding #13521: I would highly suggest to prepare a realistic scenario for simultaneous logs writing as well, so we are confident that the new provider is able to handle the amount of incoming write requests. I am a bit worried that sqlite may not be the best choice as it only allows one write at a time. I think this was good enough for cloudwatch metrics, but for logs it may slow down the use cases.
Anyhow, thank you so much for tackling this and driving this forward 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws:logs AWS CloudWatch Logs docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes 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