Skip to content

Commit

Permalink
fix: Remove whitespace from glue job sec configuration Id (#275)
Browse files Browse the repository at this point in the history
* security configuration can't handle whitespace in id

* removing explicit sec conf name
  • Loading branch information
malachi-constant committed Mar 7, 2023
1 parent a4731ef commit 3fa0ecd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
31 changes: 19 additions & 12 deletions integ/integ.glue-transform.test.ts
Expand Up @@ -18,28 +18,31 @@ interface GlueTransformStageTestStackProps extends StateMachineStageProps {
}

class GlueTransformStageTestStack extends cdk.Stack {
readonly job: glue_alpha.IJob;
constructor(scope: Construct, id: string, props: GlueTransformStageTestStackProps) {
super(scope, id, props);

new GlueTransformStage(this, "Stage", {
const stage = new GlueTransformStage(this, "Stage", {
...props,
});
this.job = stage.glueJob
}
}

const app = new cdk.App();
new integration.IntegTest(app, "Glue Tranform Stage Integration Tests", {
const stack = new GlueTransformStageTestStack(app, "GlueTransformBasic", {
jobProps: {
executable: glue_alpha.JobExecutable.pythonShell({
glueVersion: glue_alpha.GlueVersion.V1_0,
pythonVersion: glue_alpha.PythonVersion.THREE,
script: glue_alpha.Code.fromAsset(path.join(__dirname, "/src/glue_script.py")),
})
},
crawlerName: "dummy-crawler",
});
const integTest = new integration.IntegTest(app, "Glue Transform Stage Integration Tests", {
testCases: [
new GlueTransformStageTestStack(app, "GlueTransformBasic", {
jobProps: {
executable: glue_alpha.JobExecutable.pythonShell({
glueVersion: glue_alpha.GlueVersion.V1_0,
pythonVersion: glue_alpha.PythonVersion.THREE,
script: glue_alpha.Code.fromAsset(path.join(__dirname, "/src/glue_script.py")),
})
},
crawlerName: "dummy-crawler",
}),
stack
],
diffAssets: true,
stackUpdateWorkflow: true,
Expand All @@ -57,3 +60,7 @@ new integration.IntegTest(app, "Glue Tranform Stage Integration Tests", {
},
},
});

integTest.assertions.awsApiCall("Glue", "startJobRun", {
JobName: stack.job.jobName,
});
1 change: 0 additions & 1 deletion src/core/glue-defaults.ts
Expand Up @@ -10,7 +10,6 @@ export class GlueDefaults {
maxRetries: 1,
timeout: cdk.Duration.hours(10),
securityConfiguration: new glue.SecurityConfiguration(scope, id, {
securityConfigurationName: `${id}-security-config`,
s3Encryption: {
mode: glue.S3EncryptionMode.S3_MANAGED,
},
Expand Down

0 comments on commit 3fa0ecd

Please sign in to comment.