feat(aws-glue): add glue job and connection constructs#5171
feat(aws-glue): add glue job and connection constructs#5171wulfmann wants to merge 6 commits intoaws:masterfrom wulfmann:glue
Conversation
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
This will likely turn into a very large PR and i'm happy to split this if you wish @skinny85 |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Yes please! I'm a big believer in small diffs, and the review will be much quicker that way as well :) |
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
5 similar comments
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
| readonly securityGroupIds?: ec2.ISecurityGroup[]; | ||
|
|
||
| /** | ||
| * @attribute |
There was a problem hiding this comment.
@attribute is only for properties on the construct (Connection in this case), not on its creation props. Please remove them from everywhere here.
| /** | ||
| * @attribute | ||
| */ | ||
| readonly subnet?: ec2.ISubnet; |
There was a problem hiding this comment.
I believe what you want here is a standard couple of properties we use in these cases:
readonly vpc: ec2.Vpc;
readonly vpcSubnets?: ec2.SubnetSelection;This should be instead of the subnet property.
| readonly subnet?: ec2.ISubnet; | ||
| } | ||
|
|
||
| export interface IConnectionInput { |
There was a problem hiding this comment.
The ergonomics of this interface leave a few things to be desired (for example, type requires you to specify an enum that has a single value).
| } | ||
|
|
||
|
|
||
| export interface ConnectionProps { |
There was a problem hiding this comment.
We generally prefer to "flatten" creation properties of constructs. Right now, these are pretty much 1:1 with CloudFormation.
I would get rid of both IConnectionInput and IPhysicalRequirements, and add those properties to ConnectionProps.
|
|
||
|
|
||
| export interface ConnectionProps { | ||
| readonly catalogId?: string; |
There was a problem hiding this comment.
Is it actually possible to provide this? Because in the docs below, it says this always has to be account ID.
| /** | ||
| * @attribute | ||
| */ | ||
| readonly connectionInput: IConnectionInput; |
There was a problem hiding this comment.
I don't see a reason why these 2 properties should be exposed on IConnection, I would leave them out for now.
|
|
||
| this.connectionName = this.getResourceNameAttribute(connectionResource.ref); | ||
|
|
||
| this.node.defaultChild = connectionResource; |
There was a problem hiding this comment.
Give CfnConnection the ID 'Resource', and you'll be able to get rid of this line.
| public addConnection(connection: Connection) { | ||
| this.connections.push(connection); | ||
| } | ||
| } |
There was a problem hiding this comment.
Pretty much the same comments here as in the connection.ts file:
@attributein the wrong places.- Wrong ID of the child L1 (should be 'Resource').
- Creation properties are 1:1 with their CloudFormation equivalents - they should be flattened instead.
- Too much exposed properties on the
IJobinterface. - Too many
objectproperties.
| /** | ||
| * @attribute | ||
| */ | ||
| readonly properties: object; |
There was a problem hiding this comment.
object is a little vague here... Can we make it more precise? Is it a key-value dictionary of strings, for example? ({ [key: string]: string })
|
Getting back to this, haven’t touched it in awhile. I plan on scoping this smaller to make it easier to review and will review the changes you suggested. |
Love this attitude 👍 |
|
@wulfmann Wondering about the status of this PR. Are you still maintaining it? |
|
this is replaced by #6948 as i inadvertently deleted this fork. |
WIP
This is currently a work in progress. Feedback is appreciated.
Rationale
In order to expand the aws-glue construct package, i've begun work on the Job and Connection constructs. I have based my implementation off of the aws-glue Table and Database implementations, as well as other packages in aws-cdk.
Issues
Fixes #5172
Testing
TODO
Documentation
TODO
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license