-
Notifications
You must be signed in to change notification settings - Fork 293
"Per-function requirements" modules can not contains more than one function #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @cgrimal |
Hi guys! I created a minimal example following your serverless.yml extract: 2 modules, with 2 functions using the same module (this was my original use case by the way) and a vendor folder. It created the artefacts as expected. Since I can't reproduce, could you provide a minimal example demonstrating the bug? Many thanks, |
here is a minimal working example: https://github.com/bweigel/serverless_playground/tree/209_bug/sls_package
service: packaging_test
plugins:
- serverless-python-requirements
provider:
name: aws
runtime: python3.6
region: eu-central-1
package:
individually: true
exclude:
- '**/*'
functions:
function-one:
handler: main.handler
module: ./fn
package:
include:
- 'fn/**'
function-one-and-a-half:
handler: main.handler2
module: fn
package:
include:
- 'fn/**'
function-two:
handler: main.handler
module: fn2
package:
include:
- 'fn2/**'
However, the contents of the artifacts are vastly different and not as expected: I will try and fix this in #279 |
Looks like a caching bug that is caused by the cache-process (or rather if not using caching) using the incorrect |
upon further inspection, I guess @amitm02 's problem was with the serverless.yml...
package:
individually: true
exclude:
- '**/*'
include:
- 'fn/**'
functions:
function-one:
handler: main.handler
module: fn
vendor: ./vendor
function-two:
handler: main.handler
module: fn
vendor: ./vendor2
|
Hey 👋 I'm closing this ticket as it looks like it's heavily outdated, we can of course reopen it if needed 👍 |
If i set in serverless.yml more than one function with the same module (e.g they both need the same requirements.txt),
e.g
fun_a_2 is not treated (e.g coping vendor directory) because statement in the code:
!doneModules.includes(f.module)
is equal to false after dealing with f_a_1The text was updated successfully, but these errors were encountered: