aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

@aws-cdk/aws-glue-alpha: pythonShell should not require glueVersion #32148

Open urkle opened 16 hours ago

urkle commented 16 hours ago

Describe the bug

When creating a pythongshell job type the GlueVersion should not be required (as it is not used for this mode).

All examples of creating python shell jobs do not specify the GlueVersion at all, just the python version

Regression Issue

Last Known Working CDK Version

No response

Expected Behavior

I should be able to omit the glueVersion parameter to JobExecution.pythonShell.

Current Behavior

It throws an error stating that the glue_version parameter is required.

Reproduction Steps

glue.Job( self, 'ShellJob', job_name='myShellJob', role=glue_role, default_arguments={ "--additional-python-modules": "awswrangler,fastparquet,google-api-python-client,google-auth-oauthlib,google-auth-httplib2", }, timeout=Duration.minutes(30), max_concurrent_runs=1, executable=glue.JobExecutable.python_shell( python_version=glue.PythonVersion.THREE_NINE, script=glue.Code.from_asset(glue_script_path('my-shell-job.py')), ) )

Possible Solution

make it optional for PythonShellExecutableProps

Additional Information/Context

No response

CDK CLI Version

2.166.0

Framework Version

No response

Node.js Version

18.16.1

OS

macOS 12.7.6

Language

Python

Language Version

3.9

Other information

@aws-cdk/aws-glue-alpha = 2.166.0a0