-
Notifications
You must be signed in to change notification settings - Fork 152
Fix order of scratch_dir & manifest_path parameters in python_pip workflow
#82
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 order of scratch_dir & manifest_path parameters in python_pip workflow
#82
Conversation
|
All |
|
Thanks for making this change! I remember finding this once when I was working on an unrelated problem but didn’t have the bandwidth to make this change. Good find! |
| dependency_builder=dependency_builder) | ||
| try: | ||
| package_builder.build_dependencies( | ||
| self.artifacts_dir, |
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.
While we are here, could you add kwarg mapping when calling build_dependencies here?
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.
Pushed up new commit with these changes
|
@KeltonKarboviak Looks like the rebase didn't happen correctly and the diff shows a lot of existing code from develop. Can you fix it? Will help getting a review and merging.. |
|
@sanathkr Sorry about that, I think it should be fixed now. |
sriram-mv
left a comment
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.
👍
|
@sanathkr @thesriram Is this able to be merged in now? |
Issue #, if available:
N.A.
Description of changes:
Most classes seem to follow this parameter pattern:
(artifacts_dir, scratch_dir, manifest_path)The PythonPipWorkflow class constructs the PythonPipBuildAction with this order of arguments:
(artifacts_dir, scratch_dir, manifest_path, runtime)https://github.com/awslabs/aws-lambda-builders/blob/29f254bc655c84b6ae651eee556787cb1cb5875c/aws_lambda_builders/workflows/python_pip/workflow.py#L67-L68
The PythonPipBuildAction class has the following parameter order for its constructor:
(artifacts_dir, manifest_path, scratch_dir, runtime), which flips thescratch_dir&manifest_patharguments.https://github.com/awslabs/aws-lambda-builders/blob/29f254bc655c84b6ae651eee556787cb1cb5875c/aws_lambda_builders/workflows/python_pip/actions.py#L17
The process still works because here:
https://github.com/awslabs/aws-lambda-builders/blob/29f254bc655c84b6ae651eee556787cb1cb5875c/aws_lambda_builders/workflows/python_pip/actions.py#L36-L40
the PythonPipBuildAction calls package_builder.build_dependencies(self.artifacts_dir, self.manifest_path, self.scratch_dir), even though the defined parameter order is the following:
(artifacts_dir_path, scratch_dir_path, requirements_path), which again flips thescratch_dir&manifest_patharguments from the Action class.https://github.com/awslabs/aws-lambda-builders/blob/29f254bc655c84b6ae651eee556787cb1cb5875c/aws_lambda_builders/workflows/python_pip/packager.py#L107-L108
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.