Skip to content
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

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

Open
3 tasks done
alanmun opened this issue Mar 12, 2025 · 0 comments
Open
3 tasks done

Comments

@alanmun
Copy link

alanmun commented Mar 12, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant