Improve AWS service integration support (pattern) #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some AWS service integration are not supported by the sdk, for instance ECS/Fargate with callback pattern : https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html.
This PR improve service integration and support callback pattern for ECS/Fargate.
2 options has been removed : 'wait_for_callback' and 'wait_for_completion' and a new one has been added : 'integration_pattern'.
As we have 3 choices Request, Sync and Callback boolean option does not suit well this is why this PR adds an enum to manage the service integration pattern. So we now need to pass the wanted pattern as :
step = BatchSubmitJobStep('Batch Job', integration_pattern=IntegrationPattern.RequestResponse)
where integration_pattern can take following values :
I have used documentation terminology. It is a breaking change but IMHO, the 2 options wait_for_* should not be kept.
I also refactored a bit Task class to check if pattern if supported by a given service, and to automatize
Field.Resource.value
generation.All unit tests are OK, I am not able to perform integ test right now but it should have no impact.
I am not sure how to test the documentation generation, what should I do to check that documentation is OK ?
Let me know if some part are not clear or if we could do better, I am not sure about the "name" and "action" Task class attribute but it helps simplifying
Field.Resource.value
value generation and error management, what do you think ?By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.