Skip to content

No requirements are generated when using pipenv while Pipfile and lock are in root dir #857

Open
@alanmun

Description

@alanmun

Are you certain it's a bug?

  • Yes, it looks like a bug

Are you using the latest plugin release?

  • Yes, I'm using the latest plugin release

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Issue description

If you have this hierarchy for your project:

root/

  • src/
    • Pipfile
    • Pipfile.lock
    • serverless.yml
    • **/*.py

This package works fine. However, if your set up is:

root/

  • Pipfile
  • Pipfile.lock
  • src/
    • serverless.yml
    • **/*.py

No requirements get made, and the whole plugin silently fails. Deployments still go through but with no packages, only your source code. sls requirements install will just silently complete too, no requirements still.

Service configuration (serverless.yml) content

N/A because the same yml works when Pipfile and Pipfile.lock are kept in src code dir with it.

Command name and used flags

pipenv run sls package <- executed inside the dir containing serverless.yml and source code, one level down from root

Command output

sls package will output:


✔ Service packaged (0s)
Auto instrumenting functions with Datadog
Adding Lambda Library Layers to functions
Adding Datadog Lambda Extension Layer to functions
Adding Datadog Env Vars
Excluding development dependencies for service package
Injecting required Python packages to package
Adding Plugin Version 5.76.0 tag
Adding source code integration
Skipping enabling source code integration because encrypted credentials through KMS/Secrets Manager is not supported for this integration. Please set either DATADOG_API_KEY in your environment, or set the apiKey parameter in Serverless.
Generating custom CloudFormation resources

✔ Service packaged (7s)


But no requirements

Environment information

sls 3.38.0
sls-python-requirements 6.1.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions