Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

invalidateCaches not working #523

@andriy-pankiv-lemberg

Description

@andriy-pankiv-lemberg

Hi, I am using your npm package and get into issue that serverless-python-requirements is still using cached requirements even if invalidateCaches is set to true.
I am trying to install custom python library that is pulled with gitsubmodules.
Here is part of my serverless.yml

service: image-processor

plugins:
  - serverless-offline-python
  - serverless-python-requirements

custom:
  pythonRequirements:
    invalidateCaches: true
    dockerizePip: non-linux

serverless deploy output

Serverless: Generated requirements from /home/andriy/PycharmProjects/backend-interface-aws-lambda/requirements.txt in /home/andriy/PycharmProjects/backend-interface-aws-lambda/.serverless/requirements.txt...
Serverless: Using static cache of requirements found at /home/andriy/.cache/serverless-python-requirements/bd11ca0a44be0485a0d88746542673de7055ebebb613ce84951378a3cb2771c5_slspyc ...
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...
Serverless: Installing dependencies for custom CloudFormation resources...
Serverless: WARNING: Function resize has timeout of 120 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service image-processor.zip file to S3 (18.23 KB)...
Serverless: Uploading custom CloudFormation resources...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...

As you can see it is still using cached requirements - "Using static cache of requirements found at...." despite that invalidateCaches is set to true.

AWS Lambdas are deployed with next command:

sls deploy -s dev

Maybe I am doing something wrong? Or maybe use case is not valid?

P.S. This is my first ever issue submission, if there is lack of provided information or format is incorrect - feel free to ask for issue content update

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