serverless-python-requirements
serverless-python-requirements copied to clipboard
Redeploy doesn't work when using docker
https://github.com/UnitedIncome/serverless-python-requirements/blob/master/lib/pip.js#L546 This skips docker-container image rebuilding process.
I will post the pull request that allows rebuild mechanism judging from modification time .
or adding rebuild force option should be good? like
custom:
pythonRequirements:
dockerRebuild: true
@misogihagi Thank for for reporting this issue and providing a PR. I just wanted to add a bit more color to the situation, and provide a work around until issue is addressed.
When dockerizePip is enabled, it really only has effect on:
- new builds
- or when python requirements are modified
This is quite counter intuitive; as, when one makes altercation to Dockerfile one expects those changes to be deployed/packaged. However serverless-python-requirements will re-use previously build container image ignoring intents of the user.
Possible work-arounds until issue is resolve via an approach such as the one suggested by @misogihagi:
- set
useStaticCache
tofalse
. While this resolved the issue it also affects build performance. - modifying requirements on build to force it to re-build container
dockerRebuild: true
doesn't seem to be working for me... :(