aws / aws/aws-cdk

aws-cdk-lib/aws-stepfunctions-tasks: GlueStartJobRun unsupported WAIT_FOR_TASK_TOKEN integration pattern

Open
#31,474 4 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-glue effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

I am using aws-cdk-lib/aws-stepfunctions-tasks's GlueStartJobRun to create my glue job steps for my step function. These glue jobs execute within ~15-35 seconds, which became an issue with implementing step funcitons as step functions polls glue job executions every minute to check if they completed, increasing our workflow execution time by 2x.

I am trying to use sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN so my Glue Job can return immediately when it succeeds to step functions to initiate the next step, but the GlueStartJobRun mars this as an unsupported pattern.

```
Error: Unsupported service integration pattern. Supported Patterns: REQUEST_RESPONSE,RUN_JOB. Received: WAIT_FOR_TASK_TOKEN
```

I have seen WAIT_FOR_TASK_TOKEN implemented directly through JSON, but not through GlueStartJobRun. What reason is this unsupported?

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

GlueStartJobRun should accept `sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN` as an integrationPattern

### Current Behavior

Errors with above

### Reproduction Steps

Create a GlueStartJobRun with `sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN` as the integrationPattern

### Possible Solution

Append .waitForTaskToken where you would normally append .sync

### Additional Information/Context

_No response_

### CDK CLI Version

4.x

### Framework Version

_No response_

### Node.js Version

default.587774.0

### OS

Mac

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at GlueStartJobRun's integration-pattern validation and compare it with the existing direct JSON WAIT_FOR_TASK_TOKEN behavior mentioned in the report. Add a regression test covering this pattern and verify that the construct accepts it while preserving the existing REQUEST_RESPONSE and RUN_JOB behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.