Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(glue): timeout and worker type validation for Ray jobs (#32119)
### Issue # (if applicable) Closes #29612. ### Reason for this change AWS Glue Ray job has some restriction. - must use Z.2X worker type ```sh CREATE_FAILED [...] Worker type cannot be null and only [Z.2X] worker types are supported for glueray jobs ``` - must not specify timeout ```sh UPDATE_FAILED [...] Timeout not supported for Ray jobs ``` ### Description of changes Add validation for above restriction. ```ts if (executable.type.name === JobType.RAY.name) { if (props.workerType !== WorkerType.Z_2X) { throw new Error(`WorkerType must be Z_2X for Ray jobs, got: ${props.workerType}`); } if (props.timeout !== undefined) { throw new Error('Timeout cannot be set for Ray jobs'); } } ``` ### Description of how you validated changes Add unit test. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information