Skip to content
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

(aws-glue-alpha): PythonRayExecutableProps are inaccurate #28570

Closed
haljarrett opened this issue Jan 4, 2024 · 3 comments · Fixed by #28625
Closed

(aws-glue-alpha): PythonRayExecutableProps are inaccurate #28570

haljarrett opened this issue Jan 4, 2024 · 3 comments · Fixed by #28625
Labels
@aws-cdk/aws-glue Related to AWS Glue bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@haljarrett
Copy link

Describe the bug

The options provided in PythonRayExecutableProps are not all useful for the Ray job type - for instance, the extraPythonFiles and extraFiles keys correspond to parameters on spark and plain python jobs, but not ray jobs.

This could be a source of confusion (as was for me) for people looking to make use of the ray job --s3-py-modules parameter, which currently needs to be provided under defaultArguments.

Expected Behavior

I would expect that any Ray specific arguments would be exposed under PythonRayExecutableProps and that non-ray parameters would not be.

Current Behavior

The extraPythonFiles key has no effect

Reproduction Steps

new Job(this, 'job', {
      role: myRole,
      jobName: myJobName,
      timeout: Duration.minutes(1),
      workerType: WorkerType.Z_2X,
      workerCount: 2,
      maxConcurrentRuns: 1,
      executionClass: ExecutionClass.STANDARD,
      executable: JobExecutable.pythonRay({
        glueVersion: GlueVersion.V4_0,
        pythonVersion: PythonVersion.THREE_NINE,
        runtime: Runtime.RAY_TWO_FOUR,
        script: Code.fromBucket("<bucketPath>", "<scriptPath>"),
        // does not work
        // extraPythonFiles: [Code.fromBucket("<bucketPath>", "<dependenciesPath>")],
      }),
      defaultArguments: {
       // does work
        '--s3-py-modules': `s3://${props.assetsBucket.bucketName}/${props.dependenciesPath}`,
      }
    });

Possible Solution

https://github.com/aws/aws-cdk/blob/v2.118.0/packages/@aws-cdk/aws-glue-alpha/lib/job-executable.ts#L256 - PythonRayExecutableProps is just an alias over the generic python job props and is not differentiated for Ray, which is a misleading experience. Fix would look like refactoring this to omit irrelevant props and include those missing.

Additional Information/Context

No response

CDK CLI Version

2.113.0

Framework Version

No response

Node.js Version

v18.19.0

OS

macOS

Language

TypeScript

Language Version

5

Other information

No response

@haljarrett haljarrett added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 4, 2024
@github-actions github-actions bot added the @aws-cdk/aws-glue Related to AWS Glue label Jan 4, 2024
@pahud
Copy link
Contributor

pahud commented Jan 4, 2024

Thanks for the feedback. We probably need more inputs from @moomindani and the community and discuss what we can do for the improvement.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 4, 2024
@moomindani
Copy link
Contributor

PR ready. Waiting for review.

@mergify mergify bot closed this as completed in #28625 Mar 8, 2024
mergify bot pushed a commit that referenced this issue Mar 8, 2024
)

Closes #28570.

- Added RayExecutableProps which supports s3PythonModules
- Added check to block extraPythonFiles usage for Ray jobs
- Added unit tests and integ tests
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Mar 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-glue Related to AWS Glue bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants