Initial draft of Python PIP builder design doc - #5
Conversation
sanathkr
left a comment
There was a problem hiding this comment.
WOW! I never realized you had to do so much shenanigans to build Python for Lambda reliably!
Super excited to have such a robust, well-designed and well-documented library as part of this project 🔥
I have some minor comments about the interface.
| built for it. It is assumed that this customer code is correct and | ||
| would function if it had all of its dependencies installed alongside | ||
| it. It is assumed that the dependencies are specified in a top level | ||
| ``requirements.txt`` file. This file can be removed before deploying |
There was a problem hiding this comment.
I would assume that this method is passed a path to requirements.txt. SAM CLI will ensure the file is at top-level within the source folder but this should not be an assumption that low level build actions must make.
There was a problem hiding this comment.
Ok I can make this more in line with the params outlined in your other PR. I will still assume I have an adapter between them to make this low level builder more extractable and specific to python.
| in this directory. | ||
|
|
||
| :type config: :class:`lambda_builders.actions.python_pip.config` | ||
| :param config: A configuration object which contains additional config |
There was a problem hiding this comment.
I would call this out as optional, and not implemented, for now. This requirement exists for several build actions. So I want to standardize this as Optimizations that can turned on/off by customers - #3
There was a problem hiding this comment.
Ah yes I meant to write that, my bad. Thats what I meant by =None in the signature :)
| at the end and not interrupt the rest of the dependency building. | ||
| 2) Return None or a list of aggregated error objects that can be inspected by | ||
| the caller. | ||
| 3) Use the UI object. The builder as it is written right now has a notion of a |
There was a problem hiding this comment.
I like the idea of a UI object. This allows us to abstract functionality like "write with colors" etc within the object. We could also redirect the data to a file transparently. Feel free to make assumptions about this object for now. We can implement a real UI object separately.
There was a problem hiding this comment.
Cool. For now Whatever wrapper around this low level builder can create and inject it.
|
Checkout https://github.com/sanathkr/aws-lambda-builders/blob/builder-interfaces/lambda_builders/actions/python_pip/entrypoint.py to get a rough idea of the parameters passed to the python_pip action |
|
Let me know once you have pushed a new draft. I will approve and merge |
3ff4f9b to
45120c4
Compare
|
Accidentally deleted this file from the repo after creating the new directory structure. I will add this to my other open PR |
Original file got accidentally deleted during a refactor.
Original file got accidentally deleted during a refactor.
Original file got accidentally deleted during a refactor.
Initial draft of Python PIP builder design doc. Let me know what you think.