-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(glue): Job construct #12506
feat(glue): Job construct #12506
Conversation
This is still a
|
Hi @iliapolo, any hopes of actioning this any time soon? |
closes #12443 - Add GlueVersion, WorkerType, JobCommandName enum-like classes for future-proofing these values - Add PythonVersion as a normal enum as it's less likely to change - Add Job construct - CloudFormation base resource is a complex resource with almost all properties being optional and allowed in specific combinations based on command, glue version and worker types - It supports multiple job types e.g. ETL, Streaming and Python Shell and languages e.g. Scala and Python. This requires different combinations of props - One possibility is to try to create different constructs for the different types but I've opted to do just one base on resembling CloudFormation which does not prevent us from introducing more specialized types later - Documentation is not accurate, based on integ test deployments which led me to not having any assertions on valid props combinations - https://docs.aws.amazon.com/glue/latest/dg/add-job.html - https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html - Not exposing some CloudFormation props - allocatedCapacity as it's deprecated in favour of maxCapacity - logUri which is not used and is reserved for future use
- glue job does not emit success or failure metrics to cloudwatch metrics. Instead, it emits events to cloudwatch events - add JobEventState enum for known job states in https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types - add utility methods to create event rules and cloudwatch metrics based on those roles supporting the most common use cases; success, failure and timeout
Apologies for not noticing the review earlier. I am OOTO at the moment but will attempt to progress this soon. |
- introduce JobBase to contain common logic between Job and Import - JobBase now handles CloudWatch Event Rules and Rule-based metrics methods - address the rename comments - use the private constructor + static of() pattern where relevant - Make JobProps.glueVersion required
I've addressed the majority of the comments, @iliapolo
|
Hi @BenChaimberg, I feel like we're getting close, one final push (of effort) to get this PR over the line :) |
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.
love these tests. I think we're at the finish line now
- update README - use const instead of let and beforeEach where relevant - assert on stack assets metadata - add test case of 2 jobs reusing asset - other minor things
Pull request has been modified.
- fix bug with code bucket permissions - Glue role did not have permissions to read from the code bucket which manifested as DeniedAccess exceptions when attempting to run jobs - Update Code.bind to take a Job instead of Construct so it can grant it the necessary read permissions - Python shell failed saying Glue 2.0 is not supported - Console UI for adding a new Python shell jobs shows Glue 1.0 as the only supported version - Modified tests to reject using Glue 0.9 but didn't exclude Glue 2.0 or 3.0 for any future support by the new versions
And now, ready for another review, @BenChaimberg |
Pull request has been modified.
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.
one outstanding comment above
Pull request has been modified.
🏁 ? 😄 |
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.
YAY! A fabulous job and thank you for putting up with my high standards!
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Closes #12443
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license