aws-cloudformation / aws-cloudformation-resource-providers-stepfunctions

The CloudFormation Resource Provider Package For AWS Step Functions
https://aws.amazon.com/step-functions/
Apache License 2.0
6 stars 4 forks source link

Add static stabilization to Activity Delete handler #52

Closed hongkuntian closed 7 months ago

hongkuntian commented 8 months ago

Issue #, if available: N/A

Description of changes:

Add static stabilization to AWS::StepFunctions::Activity resource's Delete handler

DescribeActivity operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes. This results in the Read handler not always retrieving the correct state after the deletion of an activity. (e.g. Invoke Delete handler, and the immediately invoking Read handler may return the activity details despite the activity having been deleted)

This change follows CloudFormation's best practices in how to develop resource handlers:

DO NOT delegate the response of the model, check existence, or stabilization in CREATE, UPDATE and DELETE handler to the READ handler

This change adds the following logic to stabilize the deletion:

Testing:

mvn test succeeds, and ran pre-commit run --all-files

Ran contract tests locally and all runs have succeeded.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.