You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I tried upgrading from serverless-haskell from 0.12.5 to 0.12.6
With 0.12.5 my lambdas are building fine.
But after upgrade to 0.12.6 I started getting failures like this:
...
postgresql-libpq > Configuring postgresql-libpq-0.9.4.2...
postgresql-libpq > setup: The program 'pg_config' is required but it could not be found.
...
...
-- While building package postgresql-libpq-0.9.4.2 (scroll up to its section to see the error) using:
...
Error ---------------------------------------------------
...
Error: Error when running Stack: exit code: 1
Stack command: stack --docker --docker-image haskell:stretch --no-nix build
at new ProcessError (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless-haskell/dist/index.js:76:28)
at ServerlessPlugin.runStack (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless-haskell/dist/index.js:158:19)
at /home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless-haskell/dist/index.js:276:19
at Array.forEach (<anonymous>)
at ServerlessPlugin.buildHandlers (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless-haskell/dist/index.js:254:34)
at PluginManager.invoke (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless/lib/classes/PluginManager.js:576:20)
at async PluginManager.run (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless/lib/classes/PluginManager.js:634:7)
at async Serverless.run (/home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless/lib/Serverless.js:427:5)
at async /home/jhrcek/Devel/github.com/Holmusk/PI/backend/node_modules/serverless/scripts/serverless.js:650:9
I suspect the reason might be this:
My application depends on postgresql-simple, which in turn depends on libpq-devel C library.
This dependency was probably present in the fpco/stack-build:lts-13.30, but is no longer provided by the new haskell:stretch image:
haskell:stretch is an image with old enough glibc that is compatible with AWS Lambda environment, but new enough to run new GHC in stackage LTS 17.
An easy way forward is to add an option to provide your own Docker image in the configuration, and use it when building.
Another option to explore is utilizing Lambda Docker support and building complete Docker images by the plugin (though that would also need a base image, and possibly more configuration).
Let me know if you're interested in adding any of the above!
Let me know if you're interested in adding any of the above!
you mean if I'm interested in implementing it or if I'm interested in you implementing it? 😄
I'm not really confident enough in TS/JS to implement it, but making the builder image configurable sounds like good enough for our purposes.
Either, but thanks for the reply :) I can't promise any timelines for this, but a workaround for you can be to run the whole build in a Docker image of your choice and disable Docker in the plugin.
Today I tried upgrading from serverless-haskell from 0.12.5 to 0.12.6
With 0.12.5 my lambdas are building fine.
But after upgrade to 0.12.6 I started getting failures like this:
I suspect the reason might be this:
My application depends on
postgresql-simple
, which in turn depends onlibpq-devel
C library.This dependency was probably present in the
fpco/stack-build:lts-13.30
, but is no longer provided by the newhaskell:stretch
image:The text was updated successfully, but these errors were encountered: