-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
added: cli option --dump-config prints loaded config and exits #1678
Conversation
bf7393c
to
b0ca84c
Compare
Lot's of haskell again, @steve-chavez. Looking forward to your feedback! I already learned a bit from |
b0ca84c
to
ddb0d5d
Compare
Cirrus seems to be hitting a build timeout of 15 minutes now, saw that for a couple of commits in different PRs now. @steve-chavez you added a timeout of 30 minutes a little time ago. Did they lower the timeout or what's happening? |
@wolfgangwalther Hmm.. are you sure it's a timeout? It looks like it's failing because of low memory: haskell/cabal#5505. I saw https://cirrus-ci.com/task/6377627252424704, that shows:
Maybe we should try adding (I'll try fixing this on another PR) Edit: The |
Absolutely, the low memory makes sense. I did not look carefully - I just figured it was not a real build error. I had 3 cirrus builds failing at 15 minutes, so I was a bit too quick to assume it was a timeout thing.
Sweet, so I won't look at this here and just see green where red is :) |
ddb0d5d
to
46e320e
Compare
I thought this would mean I could do |
I think we're missing 3 things to be able to do that:
Maybe we can do that a bit different - what if we split the output of |
That sounds good! Seems like a simpler implementation. |
This is most useful for automated tests for upcoming configuration features. Can also be used for debugging.
46e320e
to
d1328bf
Compare
Had a look at that.. and the implementation is not as easy as thought. The whole thing is dumped by Implementation-wise we could just do the following:
I think that's also better to use. WDYT? Anyway, this would be something for a different PR. I addressed the other comments, CI is passing -> merge time! |
As discussed in #1659 (comment), this adds the CLI option
--dump-config
, which prints the config after loading and then exits. The printed config is itself a valid postgrest config file.This is mostly useful as a base for future improvements. When adding aliases for some config options (#1668 (comment)) or reading options directly from environment variables (#1624, #1572), this can be used as the base to write proper tests.
Also added colors to our io-tests. They are all nice and green now. Much easier to spot the occasional red one...