aspect-build / aspect-build/rules_aws
[FR]: Add support for `py_library` dependencies in `aws_py_lambda` rule
- Dominant language
- Starlark
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
### What is the current behavior?
Currently `py_library` dependencies are seemingly ignored by the implementation of the `_py_lambda_tar` rule. This presents problems for organizations which maintain internal libraries that they want their lambdas to be able to depend on.
For example:
```
aws_py_lambda(
name = "image",
entry_point = "lambda_function.py",
deps = [requirement("requests"), "//path/to/internal/lib"],
)
oci_tarball(
name = "tarball",
image = ":image",
repo_tags = ["aws_lambda_hello_world:latest"],
visibility = [":__subpackages__"],
)
```
results in no trace of the internal lib in the image that gets created when calling `bazel run :tarball`.
### Describe the feature
`py_library` dependencies should be included when creating a `aws_py_lambda` image.
Contributor guide
Research direction
Start at the _py_lambda_tar implementation used by aws_py_lambda and reproduce the example with bazel run :tarball. Trace how deps handles requirement("requests") versus the //path/to/internal/lib target; done means the resulting image contains the py_library dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100