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

Skip to content

add resource events to CFn v2 #12721

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 11 commits into from
Jun 19, 2025
Merged

add resource events to CFn v2 #12721

merged 11 commits into from
Jun 19, 2025

Conversation

pinzon
Copy link
Member

@pinzon pinzon commented Jun 5, 2025

Motivation

This PR enables the new CloudFormation engine to emit and store stack resource events, aligning its behavior more closely with AWS for parity testing and improving visibility into stack changes.

Changes

  • The new engine now emits CloudFormation resource-level events.
  • These events are stored and exposed via describe_stack_events.
  • Updated the logic to include intermediate states (e.g., IN_PROGRESS) and filter out unsupported ones (e.g., DELETE) for now.

Testing

  • Unskipped snapshot tests that were previously skipped due to missing event support.
  • Normalized event output to avoid duplicates in test comparisons.
  • Verified event ordering by timestamp to ensure consistent results across runs.

Copy link

github-actions bot commented Jun 5, 2025

Test Results - Preflight, Unit

21 635 tests  +14   19 978 ✅ +14   6m 22s ⏱️ -20s
     1 suites ± 0    1 657 💤 ± 0 
     1 files   ± 0        0 ❌ ± 0 

Results for commit 96fb2be. ± Comparison against base commit ca54051.

♻️ This comment has been updated with latest results.

@pinzon pinzon added this to the Playground milestone Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

LocalStack Community integration with Pro

    2 files  ± 0      2 suites  ±0   1h 42m 4s ⏱️ -45s
4 886 tests +12  4 112 ✅ +18  774 💤  - 3  0 ❌  - 3 
4 888 runs  +12  4 112 ✅ +18  776 💤  - 3  0 ❌  - 3 

Results for commit 96fb2be. ± Comparison against base commit ca54051.

This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum
tests.aws.services.cloudformation.v2.test_change_set_global_macros.TestChangeSetGlobalMacros ‑ test_base_global_macro
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum[COMPOSITE]
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum[FULL_OBJECT]
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_delete_metrics_configuration
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_delete_metrics_configuration_twice
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_get_bucket_metrics_configuration
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_get_bucket_metrics_configuration_not_exist
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_list_bucket_metrics_configurations
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_list_bucket_metrics_configurations_paginated
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_overwrite_bucket_metrics_configuration
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 6, 2025

Test Results (amd64) - Acceptance

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

Results for commit 96fb2be. ± Comparison against base commit ca54051.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 6, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files  ± 0      5 suites  ±0   2h 21m 48s ⏱️ -40s
5 243 tests +12  4 317 ✅ +18  926 💤  - 3  0 ❌  - 3 
5 249 runs  +12  4 317 ✅ +18  932 💤  - 3  0 ❌  - 3 

Results for commit 96fb2be. ± Comparison against base commit ca54051.

This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum
tests.aws.services.cloudformation.v2.test_change_set_global_macros.TestChangeSetGlobalMacros ‑ test_base_global_macro
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum[COMPOSITE]
tests.aws.services.s3.test_s3.TestS3MultipartUploadChecksum ‑ test_multipart_upload_part_copy_checksum[FULL_OBJECT]
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_delete_metrics_configuration
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_delete_metrics_configuration_twice
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_get_bucket_metrics_configuration
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_get_bucket_metrics_configuration_not_exist
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_list_bucket_metrics_configurations
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_list_bucket_metrics_configurations_paginated
tests.aws.services.s3.test_s3_api.TestS3MetricsConfiguration ‑ test_overwrite_bucket_metrics_configuration
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 6, 2025

Test Results - Alternative Providers

988 tests  +1   621 ✅ +32   34m 23s ⏱️ + 4m 20s
  4 suites ±0   367 💤  - 31 
  4 files   ±0     0 ❌ ± 0 

Results for commit 96fb2be. ± Comparison against base commit ca54051.

♻️ This comment has been updated with latest results.

@pinzon pinzon force-pushed the cp/cfn/v2-events branch from 8544dce to d8316dc Compare June 16, 2025 18:39
@pinzon pinzon added aws:cloudformation AWS CloudFormation semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jun 16, 2025
@pinzon pinzon marked this pull request as ready for review June 18, 2025 21:03
Copy link
Contributor

@simonrw simonrw left a comment

Choose a reason for hiding this comment

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

Nice work here, a great refactoring and enabling of our event emitting. This PR unlocks another avenue for parity testing for our engine!

Just a few questions/suggestions

@@ -21,7 +21,6 @@
)
@markers.snapshot.skip_snapshot_verify(
paths=[
"per-resource-events..*",
"delete-describe..*",
Copy link
Contributor

Choose a reason for hiding this comment

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

Woot!

@pinzon pinzon merged commit 18a4b6c into master Jun 19, 2025
40 checks passed
@pinzon pinzon deleted the cp/cfn/v2-events branch June 19, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:cloudformation AWS CloudFormation semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants