Commit be33610
authored
chore(glue): timeout and worker type validation for Ray jobs (aws#32119)
### Issue # (if applicable)
Closes aws#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*1 parent c768554 commit be33610
2 files changed
+43
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
741 | 752 | | |
742 | 753 | | |
743 | 754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
899 | 931 | | |
900 | 932 | | |
901 | 933 | | |
| |||
0 commit comments