serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

do not regenerate packages on every deployment

Open yeyeric opened this issue 2 years ago • 3 comments

Hello,

Using this plugin, it will regenerate packages for every deployment, meaning loss of time whereas they change not often.

How should I do to skip this and doing it only for instance when I want it to be forced (or ideally if something has changed) ?

Thanks

yeyeric avatar Feb 23 '22 13:02 yeyeric

Hello @yeyeric - it's not specific to this plugin but rather to the Framework itself - it needs to build package in order to compare with remote state if anything changed. You would have to build out your own solution that would bypass that as I'm not aware of any existing tooling that allows that.

pgrzesik avatar Feb 23 '22 14:02 pgrzesik

is there a boolean which could be sent as a parameter to deactivate the plugin ?

I'm using gitlab cicd for AWS lambda, maybe I could also cache the data to S3 if that is feasible using the

    useStaticCache: true
    useDownloadCache: true
    cacheLocation: 'PATH_TO_S3_CACHE_FOLDER'
    staticCacheMaxVersions: 10

yeyeric avatar Feb 23 '22 14:02 yeyeric

I believe you could use cache in order to not download the packages but use cache instead - disabling plugin would most likely break your deployments.

pgrzesik avatar Feb 24 '22 09:02 pgrzesik