Métricas do repositório
- Stars
- (46.915 stars)
- Métricas de merge de PR
- (Mesclagem média 1d 15h) (34 fundiu PRs em 30d)
Description
/cc @juanjoDiaz
Folow up to https://github.com/serverless/serverless/pull/8602, where layer packaging issue was put to light
Related bugs: #5583, #5892 and #7837
Currently layers are packaged taking into package include and exclude patterns as defined on service level package property and on layer layers[].package property.
Still glob patterns are resolved against layer path, so service level patterns in a bad way influence what's being packaged for layer, and that often leads to bugs and unexpected results
Proposed fix
I believe we should either:
- Ignore service level patterns when packaging the layer (respect purely layer level patterns). Downside is that we may break packaging for users, which by chance rely on current behavior (still I hope that'll be rare)
- Package against service folder, but prepand patterns with
['!**', layerPath]and map layer level pattenrs to${layerPath}/**/${layerPattern}. Still I'm not 100% sure weather it's fully safe
At this point I'm leaning towards (1), as it will make configuration less confusing (it's more intuitive to assume that include and exclude patterns as set in layer context will be applied against layer directory and not service directory).