Skip to content
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

Flip order for env vs flag for server attributes #971

Closed
wants to merge 1 commit into from

Conversation

jisantuc
Copy link
Contributor

Overview

This PR resolves configuration from env variables first for server with transactions and with tiles. The orFalse on the flag was necessary to turn it into an Opt[Bool], but it was also making it so that the CLI

Checklist

  • New tests have been added or existing tests have been modified not super straightforward to test configuration options 😢 maybe continuous configuration testing will help with some ideas

Testing Instructions

  • fire up sbt with the env var config: API_WITH_TRANSACTIONS=true ./sbt
  • start the server: application/run serve --db-host=localhost
  • check the api spec -- http :9090/open-api/spec.yaml | grep delete -- you should get a hit
  • stop the server
  • start again with the tile flag -- application/run serve --db-host=localhost --with-tiles
  • check the api spec -- http :9090/open-api/spec.yaml | grep tiles -- you should get a hit
  • make sure transactions are still there as well -- http :9090/open-api/spec.yaml | grep delete -- you should get a hit
  • stop sbt
  • start it again, this time with the tiles env var: API_WITH_TILES=true ./sbt
  • check for tiles in the spec, then add --with-transactions and check for both -- you should expect hits

Closes #969

@jisantuc jisantuc requested a review from pomadchin September 24, 2021 22:20
@JN-Hernandez
Copy link

2 years stale with no movement, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API_WITH_TRANSACTIONS and API_WITH_TILES environment variables don't work
2 participants