-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(glue): PythonRayExecutableProps
has innaccurate properties
#28625
Changes from 1 commit
cde94af
ff41e85
91ab22e
8b3a29a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,6 +177,22 @@ interface PythonExecutableProps { | |
readonly extraPythonFiles?: Code[]; | ||
} | ||
|
||
interface RayExecutableProps { | ||
/** | ||
* The Python version to use. | ||
*/ | ||
readonly pythonVersion: PythonVersion; | ||
|
||
/** | ||
* Additional Python modules that AWS Glue adds to the Python path before executing your script. | ||
* | ||
* @default - no extra python files and argument is not set | ||
* | ||
* @see `--s3-py-modules` in https://docs.aws.amazon.com/glue/latest/dg/author-job-ray-job-parameters.html | ||
*/ | ||
readonly s3PythonModules?: Code[]; | ||
} | ||
|
||
interface SharedJobExecutableProps { | ||
/** | ||
* Runtime. It is required for Ray jobs. | ||
|
@@ -253,7 +269,7 @@ export interface PythonShellExecutableProps extends SharedJobExecutableProps, Py | |
/** | ||
* Props for creating a Python Ray job executable | ||
*/ | ||
export interface PythonRayExecutableProps extends SharedJobExecutableProps, PythonExecutableProps {} | ||
export interface PythonRayExecutableProps extends SharedJobExecutableProps, RayExecutableProps {} | ||
|
||
/** | ||
* The executable properties related to the Glue job's GlueVersion, JobType and code | ||
|
@@ -377,14 +393,17 @@ export class JobExecutable { | |
if (JobLanguage.PYTHON !== config.language && config.extraPythonFiles) { | ||
throw new Error('extraPythonFiles is not supported for languages other than JobLanguage.PYTHON'); | ||
} | ||
if (config.extraPythonFiles && type === JobType.RAY.name) { | ||
throw new Error('extraPythonFiles is not supported for Ray jobs'); | ||
} | ||
if (config.pythonVersion === PythonVersion.THREE_NINE && type !== JobType.PYTHON_SHELL.name && type !== JobType.RAY.name) { | ||
throw new Error('Specified PythonVersion PythonVersion.THREE_NINE is only supported for JobType Python Shell and Ray'); | ||
} | ||
if (config.pythonVersion === PythonVersion.THREE && type === JobType.RAY.name) { | ||
throw new Error('Specified PythonVersion PythonVersion.THREE is not supported for Ray'); | ||
} | ||
if (config.runtime === undefined && type === JobType.RAY.name) { | ||
throw new Error('Runtime is required for Ray jobs.'); | ||
throw new Error('Runtime is required for Ray jobs'); | ||
} | ||
this.config = config; | ||
} | ||
|
@@ -466,6 +485,15 @@ export interface JobExecutableConfig { | |
*/ | ||
readonly extraPythonFiles?: Code[]; | ||
|
||
/** | ||
* Additional Python modules that AWS Glue adds to the Python path before executing your script. | ||
* | ||
* @default - no extra python files specified. | ||
* | ||
* @see `--s3-py-modules` in https://docs.aws.amazon.com/glue/latest/dg/author-job-ray-job-parameters.html | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @see expects a url after the tag, and nothing else There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
*/ | ||
readonly s3PythonModules?: Code[]; | ||
|
||
/** | ||
* Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it. | ||
* | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens to
PythonExecutableProps
? a) is it used elsewhere and b) we are not dropping support for any properties right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are dropping support for properties (as the attached issue suggests) it should have been called out in PR description as a
BREAKING CHANGE
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a) is it used elsewhere
Yes. There are three job types; Spark, Python shell, and Ray. PythonExecutableProps is used for the first two.
b) we are not dropping support for any properties right?
Right. We are not dropping any or working properties.
Only the property we are dropping is
extraPythonFiles
which was not working for Ray job. This is not breaking change.