-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: allow kms encryption upload for processing #1897
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: allow kms encryption upload for processing #1897
Conversation
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 |
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 |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…into processing-output-path
…cessing-output-path
…aker-python-sdk into processing-output-path
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 |
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 |
src/sagemaker/processing.py
Outdated
@@ -170,7 +174,9 @@ def _extend_processing_args(self, inputs, outputs, **kwargs): # pylint: disable | |||
"""Extend inputs and outputs based on extra parameters""" | |||
return inputs, outputs | |||
|
|||
def _normalize_args(self, job_name=None, arguments=None, inputs=None, outputs=None, code=None): | |||
def _normalize_args( | |||
self, job_name=None, arguments=None, inputs=None, kms_key=None, outputs=None, code=None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the code
and kms_key
as adjacent args, preferably after code
, since they are the args that are associated?
self, job_name=None, arguments=None, inputs=None, kms_key=None, outputs=None, code=None | |
self, job_name=None, arguments=None, inputs=None, outputs=None, code=None, kms_key=None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it makes more sense to put relevant args together.
src/sagemaker/processing.py
Outdated
@@ -439,6 +453,7 @@ def run( | |||
job_name=job_name, | |||
arguments=arguments, | |||
inputs=inputs, | |||
kms_key=kms_key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push this to after code
?
src/sagemaker/processing.py
Outdated
@@ -113,6 +113,7 @@ def __init__( | |||
def run( | |||
self, | |||
inputs=None, | |||
kms_key=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe later in the arg list. if a customer is relying on ordinal position rather naming args on invocation, then this would be a breaking change.
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 |
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 |
* fix: allow kms encryption upload for processing * update spark processing with kms keys= * move kms_key to end of arg list Co-authored-by: Chuyang Deng <[email protected]>
Somehow the kms key fix aws#1897 that was recently merged is not propagate throughout all the methods that require itt when uploading customer code for example, in _upload_code() #L581 which is called in _handle_user_code_url() #L554, which in turn is referenced in _include_code_in_inputs() #L496. _include_code_in_inputs() is then called by _normalize_args() #L208 . This pull request address this issue.
Issue #, if available:
#1892
Description of changes:
outputs
customized paths has already been resolved.This PR is to implement
kms_key
for the processing job input upload, it setsServerSideEncryption
toaws:kms
ifkms_key
is present.Testing done:
unit test
integ test
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.