feat(aws-glue): add glue connection L2 Constructs#6948
feat(aws-glue): add glue connection L2 Constructs#6948wulfmann wants to merge 18 commits intoaws:masterfrom
Conversation
| constructor(scope: Construct, id: string, props: ConnectionProps) { | ||
| super(scope, id); | ||
|
|
||
| const subnetId = props.vpcSubnets && props.vpc ? props.vpc.selectSubnets(props.vpcSubnets).subnetIds[0] : undefined; |
There was a problem hiding this comment.
@skinny85 I wasn't entirely sure what you meant on the other PR. Is this what you intended for the subnets? I have the same question for line 106.
There was a problem hiding this comment.
It should be:
const subnetId = props.vpc ? props.vpc.selectSubnets(props.vpcSubnets).subnetIds[0] : undefined;| connectionProperties: {}, | ||
| }); | ||
|
|
||
| expect(stack).toMatch({ |
There was a problem hiding this comment.
I think you want expect(stack).toHaveResourceLike(...).... right now, these tests don't actually verify anything.
There was a problem hiding this comment.
Yea im still working on tests.
| import * as glue from '../lib'; | ||
| import * as ec2 from '@aws-cdk/aws-ec2'; | ||
|
|
||
| export = { |
There was a problem hiding this comment.
Uhm. Maybe I did a mental shortcut saying "that's all you needed". Jest tests look a tiny bit different than Nodeunit tests. So, this file would be something like:
describe('Glue Connection', () => {
test('can be created without a VPC', () => {
// ...
});
test('can be created with a VPC', () => {
// ...
});
});|
About the Jest tests - my apologies, I forgot this module already has some Nodeunit tests. In this case (because you can't mix Nodeunit and Jest in the same CDK package), just make the new tests in Nodeunit as well. Apologies for the churn! |
|
BTW, we're investigating why the build fails with We know it's from the single-value enum, but it shouldn't really be happening. Will update when we know more. |
skinny85
left a comment
There was a problem hiding this comment.
Just removing from my to-do list.
|
Once all the requested changes have been addressed, and the PR is ready for another review, remember to dismiss the review. |
TypeScript represents enums similar to union types, and single-valued enums are "simplified" to the sole member (the TypeChecker fiercely refuses to give a handle to the actual `enum` type). This resulted in `jsii` incorrectly tagging the type at usage sites. This commit adds the necessary infrastructure to detect single-valued enums and tweak the FQN generation to obtain the correct result. A new test was added to validate this whole endeavor works correctly even when the single-valued enum is within a submodule (which adds even more complexity to the mix). References: aws/aws-cdk#6712 aws/aws-cdk#6948
TypeScript represents enums similar to union types, and single-valued enums are "simplified" to the sole member (the TypeChecker fiercely refuses to give a handle to the actual `enum` type). This resulted in `jsii` incorrectly tagging the type at usage sites. This commit adds the necessary infrastructure to detect single-valued enums and tweak the FQN generation to obtain the correct result. A new test was added to validate this whole endeavor works correctly even when the single-valued enum is within a submodule (which adds even more complexity to the mix). References: aws/aws-cdk#6712 aws/aws-cdk#6948
|
@wulfmann any updates here? Are you ready for another round of reviews, or still working on it? (The single-value enum thing should be resolved now) |
|
I will check this first thing tomorrow and see if we can get this resolved! |
|
Hi everyone, |
|
Still waiting for @wulfmann on this one 🙂 |
| * The type of the connection. Currently, only JDBC is supported; | ||
| * SFTP is not supported. | ||
| */ | ||
| JDBC = 'JDBC', |
There was a problem hiding this comment.
Seems like there are more types currently supported https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-connectioninput.html
Pull request has been modified.
|
Finally back to wrapping this up. Sorry to everyone waiting on this. |
|
I've updated to the current branch of upstream and cleaned up some of the missing things. I should be able to wrap the tests up tomorrow so we can at least get the L2 connection construct merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@wulfmann any updates here? |
|
I'm closing this one due to inactivity, please comment if you want it re-opened. |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license