Fork me on GitHub
#pedestal
<
2019-07-30
>
souenzzo13:07:49

@ariel.silverman It's about BREAKING CHANGE: nil ::host in service map defaults to localhost now (rather than being container specific) #557. ? https://github.com/pedestal/pedestal/blob/master/CHANGELOG.md#054---june-29-2018

asilverman16:07:41

Thank you for replying @souenzzo, I don’t think this is it, I am moving from 0.5.5 to 0.5.7. I had that issue fixed back last month.

👍 4
asilverman16:07:58

#pedestal - gotta love the “pull requests welcome message” found here: http://pedestal.io/reference/jetty

asilverman17:07:18

@souenzzo - Now that I think about it maybe I addressed issue 054 incorrectly, what I did was the following: In my pedestal config I added

{ 
...
::http/host              "0.0.0.0"}

asilverman17:07:54

maybe this is not the appropriate fix for 054

jvtrigueros17:07:38

Are you running it inside a container?

souenzzo17:07:49

::http/host "0.0.0.0" should work for dev setup

asilverman17:07:11

@jvtrigueros I run in a container that is deployed to ECS (AWS)

asilverman17:07:23

this is my config for prod

jvtrigueros17:07:35

0.0.0.0 is an unsafe default but necessary if running inside a container

souenzzo17:07:49

It works on local/REPL?

asilverman17:07:27

yeah, I am only seeing a timeout of the http server when I deploy to the higher environments

asilverman17:07:39

I saw there were some changes to the container-options for jetty

asilverman17:07:00

I am setting ssl via:

{::http/container-options {:h2c?          true
                             :h2?           false
                             :keystore      "./config/keystore.p12"
                             :keystore-type "PKCS12"
                             :key-password  "qwerty"
                             :ssl-port      9302
                             :ssl?          false}}

asilverman17:07:59

honestly I am looking to get maybe some background and docs on :io.pedestal.http.jetty/http-configuration because its pretty opaque and there is no docs I could find on it

asilverman17:07:27

looks like maybe my cloud deployment was the issue, however I am starting to feel the pain with the lack of documentation in pedestal.

jvtrigueros17:07:12

I've been following this conversation, but I'm still confused as to what the issue is that you're facing. I understand the docs are limited, so perhaps once you're past this a small PR would go a long way 🙂 Anyway, what exactly are you having issues with? And is there a repo I can look at and perhaps reproduce?

asilverman16:07:53

@jvtrigueros - It turns out that we had an issue with our deployment pipeline and not with the actual code. Thanks for following up. Regarding your comments, its increasingly harder to use pedestal in a production setup when many of the configurations are missing documentation and its unclear what are the side effects of such configurations

Daouda22:07:29

Hey Folks, is there a way of a function to coerce data when entering my api with pedestal? Something that i pass de data and the schema to coerce then will try to coerce for me.

jvtrigueros02:07:10

I imagine you would do this with an interceptor. An interceptor has two stages, incoming and outgoing (don't remember proper terms from memory).

asilverman16:07:55

@quieterkali I have been doing this via a custom interceptor as a pattern

ikitommi19:07:53

e.g. using reitit + Pedestal, you can use schema or spec to define the data and have generic coercion interceptors do the transform based on the models

Daouda09:08:30

Thank you very much, you guys helped a lot 😄

asilverman16:07:53

@jvtrigueros - It turns out that we had an issue with our deployment pipeline and not with the actual code. Thanks for following up. Regarding your comments, its increasingly harder to use pedestal in a production setup when many of the configurations are missing documentation and its unclear what are the side effects of such configurations