Repository navigation
feat(glue-alpha): add extraPythonFiles support to PythonShellJob - #37130
Conversation
Add `extraPythonFiles` property to `PythonShellJobProps` to allow specifying additional Python files (.py, .egg, .whl) for Python Shell jobs via the `--extra-py-files` Glue argument. Closes aws#34448
|
|
||||||||||||||
|
|
||||||||||||||
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
leonmk-aws
left a comment
There was a problem hiding this comment.
Thank you for your contribution, LGTM, just a small comment regarding an additional unit test.
| }); | ||
| }); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Can we add a small unit test for the empty array edge case ?
There was a problem hiding this comment.
Thanks. I've added a test.
Addresses review feedback on aws#37130 to verify that --extra-py-files is not added to DefaultArguments when an empty array is provided.
Pull request has been modified.
…/github.com/mazyu36/aws-cdk into fix/issue-34448-python-shell-extra-py-files
leonmk-aws
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
This pull request spent 13 seconds in the queue, including 2 seconds running CI. Required conditions to merge
ReasonPull request #37130 has been dequeued The pull request could not be merged. This could be related to an activated branch protection or ruleset rule that prevents us from merging. Required status check "validate-pr" is in progress. HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
|
@Mergifyio refresh |
✅ Pull request refreshed |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
This pull request spent 13 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
|
Comments on closed issues and PRs are hard for our team to see. |
Issue
Closes #34448.
Reason for this change
PythonShellJobdoes not expose anextraPythonFilesproperty, preventing users from specifying additional Python dependencies (.py,.egg,.whl) in a type-safe way. The--extra-py-filesargument is officially supported by AWS Glue for Python Shell jobs, and other job types likePySparkEtlJobalready support this through theSparkJobbase class.Description of changes
extraPythonFiles?: Code[]property toPythonShellJobPropsPythonShellJobconstructor to convertextraPythonFilesentries to S3 URLs and set the--extra-py-filesdefault argumentPythonShellJobrather than changing the class hierarchy, becauseSparkJobcarries unrelated properties (extraJars,sparkUI, etc.) that are not applicable to Python Shell jobsDescribe any new or updated permissions being added
No new IAM permissions are required. The existing role already has access to S3 for the script location.
Description of how you validated changes
extraPythonFilesentriesShellJobWithExtraPyFiles) usingCode.fromAssetand deployed successfullyyarn integ --update-on-failedto deploy and update snapshotsChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license