-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Description
I'm trying to tell SLSPR to not package up parts of botocore because I don't need to make calls to the services. I tried:
pythonRequirements:
dockerizePip: false
slim: true
slimPatterns:
# we don't need to call these services so let's not include the botocore metadata
# it takes up a lot of space
- "**/botocore/data/ec2/**"
- "data/cloudfront/**"
- "**/data/rds/**"
But ec2, cloudfront, and rds are all present in the package. What am I doing wrong?
Using latest plugin/serverless.
hjander and chehodgins
Activity
bsamuel-ui commentedon Feb 18, 2020
Yeah, unfortunately, file globs in SPR are as horribly broken as every other tool I've seen that uses globs. I always have to hunt down the code running the glob and put print statements in.
Looking at my slim patterns file... You should drop the trailing
/**
because it will match directories correctly.You shouldn't need to match
**/botocore
either, botocore should be at the root of your package. My slim patterns simply have entires like:- botocore/data/ec2
**/*.ext
works, though, as doespath/*/dir
.(FWIW, I stuck them in a separate file because I banned a ton of crap. A lot of python modules carry tests with them, for instance.)
revmischa commentedon Feb 19, 2020
I have exactly this
but I still see all of them except ec2 in the package :(
chehodgins commentedon Nov 4, 2021
This also wasn't working for me until I added
useStaticCache: false
so that the dependencies could be rebuilt: