Description
Update AWS Glue Databrew service integration to useintegration_pattern input instead orwait_for_completion flag.
Fixes #(issue) (N/A)
Why is the change necessary?
This change is necessary for consistency with the new service integration implementation pattern introduced incommit (Add support for Nested Step Functions) that uses theintegration_pattern arg in the step constructor to build the resource.
Support for AWS Glue Databrew service integration was added in thiscommit, but notreleased yet.
A latercommit (Add support for Nested Step Functions) introduced a new implementation pattern using theIntegrationPattern enum as input to construct the step instead of thewait_for_completion flag. (SeePR for more detail on rationale behind the implementation).
Solution
Replace thewait_for_completion flag withintegration_pattern arg inStartJobRun step construction.
TheIntegrationPattern is used to build theResource arn as follow:
| IntegrationPattern | Resource | Doc |
|---|
| WaitForCompletion | "arn:aws:states:::states:databrew:startJobRun.sync" | Run A job |
| CallAndContinue | "arn:aws:states:::states:databrew:startJobRun" | Request Response |
SeeService Integration Patterns for more details
Normally, replacing a constructor argument would be a breaking change, but since we have not released support for AWS Glue Databrew service integration yet, it is acceptable to do so. After next release, it making such changes will be considered as not being backward compatible.
Testing
- Updated unit tests for all resources
- No integ tests added as external resources were required for testing (Databrew Job)
- Manual test done for all resources
Manual Tests
Create aDatabrew job for manual tests (<databrew_job_name>).
For each test, create a workflow and execute as follow:
workflow = Workflow( name=<state_machine_name>, definition=<step>, role=<workflow_execution_role>)workflow.create()workflow.execute()
# Create a workflow with the following steps & executestep_call_and_continue = GlueDataBrewStartJobRunStep( 'Start Glue DataBrew Job Run - CallAndContinue', integration_pattern=IntegrationPattern.CallAndContinue, parameters={ "Name": <databrew_job_name> })step_default = GlueDataBrewStartJobRunStep('Start Glue DataBrew Job Run - Default', parameters={ "Name": <databrew_job_name> })# Validate that the workflows end after starting the <databrew_job_name> job
# Create a workflow with the following step & executestep_wait_for_completion = GlueDataBrewStartJobRunStep( 'Start Glue DataBrew Job Run - WaitForCompletion', integration_pattern=IntegrationPattern.WaitForCompletion, parameters={ "Name": <databrew_job_name> })# Validate that the workflow only ends after the <databrew_job_name> job completes
Pull Request Checklist
Please check all boxes (including N/A items)
Testing
Documentation
Title and description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.
Description
Update AWS Glue Databrew service integration to use
integration_patterninput instead orwait_for_completionflag.Fixes #(issue) (N/A)
Why is the change necessary?
This change is necessary for consistency with the new service integration implementation pattern introduced incommit (Add support for Nested Step Functions) that uses the
integration_patternarg in the step constructor to build the resource.Support for AWS Glue Databrew service integration was added in thiscommit, but notreleased yet.
A latercommit (Add support for Nested Step Functions) introduced a new implementation pattern using the
IntegrationPatternenum as input to construct the step instead of thewait_for_completionflag. (SeePR for more detail on rationale behind the implementation).Solution
Replace the
wait_for_completionflag withintegration_patternarg inStartJobRun step construction.The
IntegrationPatternis used to build theResourcearn as follow:SeeService Integration Patterns for more details
Normally, replacing a constructor argument would be a breaking change, but since we have not released support for AWS Glue Databrew service integration yet, it is acceptable to do so. After next release, it making such changes will be considered as not being backward compatible.
Testing
Manual Tests
Create a
Databrewjob for manual tests (<databrew_job_name>).For each test, create a workflow and execute as follow:
Pull Request Checklist
Please check all boxes (including N/A items)
Testing
Documentation
Title and description
Fixes #xxx-N/ABy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.