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

fix(glue): s3 path specified in --spark-event-logs-path needs to end with slash #29357

Merged
merged 10 commits into from
Mar 19, 2024
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/lib/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ export class Job extends JobBase {
bucket.grantReadWrite(role, this.cleanPrefixForGrant(props.prefix));
const args = {
'--enable-spark-ui': 'true',
'--spark-event-logs-path': bucket.s3UrlForObject(props.prefix),
'--spark-event-logs-path': bucket.s3UrlForObject(props.prefix).replace(/\/?$/, '/'),
scanlonp marked this conversation as resolved.
Show resolved Hide resolved
};

return {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@
"s3://",
{
"Ref": "EtlJob20SparkUIBucketFD07FBD8"
}
},
"/"
]
]
},
Expand Down Expand Up @@ -520,7 +521,8 @@
"s3://",
{
"Ref": "EtlJob30SparkUIBucket9D789346"
}
},
"/"
]
]
},
Expand Down Expand Up @@ -878,7 +880,8 @@
"s3://",
{
"Ref": "EtlJob40SparkUIBucket02F50B0D"
}
},
"/"
]
]
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-glue-alpha/test/job.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ describe('Job', () => {
{
Ref: 'JobSparkUIBucket8E6A0139',
},
'/',
],
],
},
Expand Down Expand Up @@ -625,7 +626,7 @@ describe('Job', () => {
Template.fromStack(stack).hasResourceProperties('AWS::Glue::Job', {
DefaultArguments: {
'--enable-spark-ui': 'true',
'--spark-event-logs-path': `s3://${sparkUIBucketName}`,
'--spark-event-logs-path': `s3://${sparkUIBucketName}/`,
},
});
});
Expand Down