abundant-analyst-12845
11/22/2022, 10:26 AMrefined-addition-53644
11/22/2022, 12:26 PMpython_awslambdapython_awslambdahappy-kitchen-89482
11/22/2022, 1:23 PMpoetry_requirementsabundant-analyst-12845
11/22/2022, 1:38 PMabundant-analyst-12845
11/22/2022, 1:38 PMabundant-analyst-12845
11/22/2022, 1:40 PMabundant-analyst-12845
11/22/2022, 1:41 PMabundant-analyst-12845
11/23/2022, 8:38 AMrefined-addition-53644
11/23/2022, 10:15 AM# my pants.toml
[python.resolves]
common = "3rdparty/python/common.lock"
# BUILD with poetry_requirements (should be where pyproject.toml is)
poetry_requirements(resolve="common")
# generate lockfile first by running
./pants generate-lockfiles --resolve=commonabundant-analyst-12845
11/23/2022, 10:20 AMrefined-addition-53644
11/23/2022, 10:24 AMpython_sourcespython_testpython_awslambdacommonpython_sources(resolve="common")___defaults___# define a default resolve for the all the targets below
__defaults__(all=dict(resolve="common"))refined-addition-53644
11/23/2022, 10:27 AMcommonrefined-addition-53644
11/23/2022, 10:34 AMpython_testsabundant-analyst-12845
11/23/2022, 11:03 AMabundant-analyst-12845
11/23/2022, 3:03 PMabundant-analyst-12845
11/23/2022, 3:04 PMabundant-analyst-12845
11/23/2022, 3:11 PM__defaults__(all=dict(resolve="common"))
poetry_requirements(
    name="poetry",
    resolve="common",
)
# The default `sources` field will include our handler file.
python_sources(name="lib")
python_awslambda(
    name="lambda-one",
    runtime="python3.9",
    # Pants will convert this to `project.lambda_example:example_handler`.
    handler="lambda_handler.py:lambda_handler",
)./pants roots.
lambda-one
lambda-two
shared-code8:49.71 [ERROR] 1 Exception encountered:
  Exception: Unmatched glob from CLI arguments: "lambda-one/lambda-one/lambda_handler.py"
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <https://www.pantsbuild.org/v2.14/docs/troubleshooting#pants-cannot-find-a-file-in-your-project>../pants package lambda-one/lambda_handler.py
14:58:33.04 [ERROR] 1 Exception encountered:                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                    
  Exception: Unmatched glob from CLI arguments: "lambda-one/lambda_handler.py"                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                    
Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <https://www.pantsbuild.org/v2.14/docs/troubleshooting#pants-cannot-find-a-file-in-your-project>.abundant-analyst-12845
11/23/2022, 3:11 PMrefined-addition-53644
11/23/2022, 4:13 PMlambda-one/lambda_one./pants package lambda-one/lambda_one:<lambda_target_name>
# So in this case it should be
./pants package lambda-one/lambda_one:lambda-onehappy-kitchen-89482
11/23/2022, 4:28 PM/pants package lambda-one/lambda-one/lambda_handler.pyhappy-kitchen-89482
11/23/2022, 4:29 PM./pants package lambda-one/lambda_handler.py