Skip to content

feat(glue): Job construct does not honor SparkUIProps S3 prefix when granting S3 access#26696

Merged
mergify[bot] merged 7 commits intoaws:mainfrom
scanlonp:scanlonp/glue-prefix
Aug 10, 2023
Merged

feat(glue): Job construct does not honor SparkUIProps S3 prefix when granting S3 access#26696
mergify[bot] merged 7 commits intoaws:mainfrom
scanlonp:scanlonp/glue-prefix

Conversation

@scanlonp
Copy link
Copy Markdown
Contributor

@scanlonp scanlonp commented Aug 10, 2023

The SparkUIProps.prefix attribute of glue.Job now has a consistent format, is validated, and the bucket ReadWrite role is only given permissions to the folder of the bucket specified by the prefix if provided.

Adds a suggested format for the prefix: /foo/bar and throws and error if the prefix does not start with a / or ends without a /.

This may be a breaking change for users who configured their prefix in a style different than this enforces. However, I believe it is the correct standardization going forward.

Closes #19862.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@scanlonp scanlonp added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Aug 10, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 10, 2023 00:56
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Aug 10, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 10, 2023
@scanlonp
Copy link
Copy Markdown
Contributor Author

I did not include an integ test since Spark did not write to s3 even when enabled (for a trivial script). Non trivial scripts usually failed since we did not have the set up for them, or Spark did not write anything.

I verified that the set up in the console is correct, but could not get anything to be written by Spark through manual testing.

Since this is an alpha module (and this issue has gotten very little attention), I think it is fine to wait to add the integ test until a user either says this does not work or provides a script that shows Spark writing logs. There is already an integ test that has Spark enabled, so there is almost no value add for an additional test with the prefix set up, since it is currently functionally the same.

(If we feel strongly that we need one, I have one written and can throw it in!)

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 10, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7189ab7
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 42250f1 into aws:main Aug 10, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 10, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

glue: Job construct does not honor SparkUIProps S3 prefix when granting S3 access

3 participants