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

[#340] Assert correct env vars in production #341

Merged
merged 2 commits into from Aug 26, 2016

Conversation

jonase
Copy link
Contributor

@jonase jonase commented Aug 26, 2016

  • Test plan | Unit test | Integration test
  • Copyright header
  • Code formatting
  • Documentation

(defn- error-msg [env-var]
(format "Failed to setup binding: %s environment variable missing" env-var))

(defn assert-bindings []
Copy link
Contributor

@kardan kardan Aug 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the assert error messages does not match the actual assertions they are a source to confusion :-)

@kardan kardan merged commit b515b8d into develop Aug 26, 2016
@kardan kardan deleted the issue/340-assert-env-vars branch August 26, 2016 08:46
jonase pushed a commit that referenced this pull request Aug 26, 2016
* [#227] Pull request template (#228)

* Issue/188 keycloak (#268)

* [#188] Preconfigured Keycloak with Akvo realm

* [#188] Add small readme instructions

* [#188] Fix typo

* [#188] Use a local running Keycloak server for auth

* Change references from Keycloak server to localhost:8080
* Adds a script to build|run|stop a Keycloak server via Docker
* TODO: Move the hardcoded URLs to config file

* [#188] Update README

* [#188] Delete stopped container

- This will allow us to reuse the container name

* [#188] Attempt to build and run a keycloak service

* [#188] Fix build

- "Clojure projects on Travis CI assume you use Leiningen 2.4.x
  by default" https://docs.travis-ci.com/user/languages/clojure/

* [#261] Make keycloak url a config (#269)

* [#261] Make keycloak url a config

* [#261] Config Keyclock as env var

This applies to both frontend and backend.

* [#261] Disabled wrap-jwt-test

This tests gets certs from an external keycloak (which now is a
config), hence this breaks at the moment. We should review how to deal
with this when rethinking the testing strategy.

* [#261] Removed unused import

* [#261] Add require again

* [#261] Removed broken test

* [#261] Removed pprint in favour of printStackTrace

* #252 backend update (#298)

* [#252] Non jdbc library updates

Excluded logback-classic from immutant scheduling because of
duplications.

* [#252] First cut on jdbc upgrade

API changed, hence changes.

* [#252] Updated backend json lib

* [#252] Fixed typo

* [#258] [#303] Lumen now pass correct issuer to wrap-jwt-claims (#304)

* [#258] [#303] Lumen now pass correct issuer to wrap-jwt-claims

Also renamed middleware namespace to auth.

* [#258] Don't let Lumen start without openid-connect certs

When Lumen starts it will try and grab public certs from the provided
openid-connect issuer (Keycloak) to use in the auth middleware. If
Lumen is unsuccessful with getting certs we will print an error message
and propagate error message.

* Issue/58 update client deps (#305)

* [#58] Update client deps

* Finally react v.15
* react-select onChange now recieves the full option object, and not only the label
* react-select is now a controlled component. So there is no need to forceUpdate.

* [#58] Update LibraryCreateButton to not forceUpdate

* [#58] Force DashSelect to take strings rather than strings or numbers

* [#58] Add missing radix parameter

* [#307] Enabled Travis build notifications in Slack (#308)

* [#307] Enabled Travis build notifications in Slack

* [#307] Removed HipChat notifications

* [#263] Use redux-actions (#306)

* [#263] Use redux-actions

* Less boilerplate with createAction and handleActions
* No need need the constants modules
* redux-promise (or redux-rx) relies on "standardized" actions provided by redux-actions

* [#309] Fix label input in visualisation editor

* [#310] Fix race condition in dashboard editor

* [#311] Prevent multiple API requests for the same dataset or dashboard (#313)

* Issue/262 immutable js and domain modules (#312)

* [#262] Add entity and dataset domain modules

* In preparation for dataset move to immutable.js

* [#262] wip datasets as immutable.js objects

* Can now render the dataset table

* [#262] Fix column context menu

* [#262] change data type transforms with immutable.js

* [#262] Fix text transform tests

* [#262] Resolve eslint error

* [#262] transformations wip

* [#262] more dataset refactorings

* [#262] Make imports work

* [#262] Make text transforms work

* [#262] Fix sorting transform

* [#262] Fix filter transform

* [#262] Fix transformation log ui

* [#262] Visualisations rendering with immutablejs datasets

* [#262] Minor cleanup

* [#262] Resolve issues found by @gabemart's review

* [#262] Resolve additional issues found by @gabemart's review

* [#300] Initial code-splitting for containers (#319)

* [#300] Initial code-splitting for containers

* [#300] Fix inverse bool for haveSecondDataColumn

* [#300] Remove console statement

* [#300] Extract common chart utility dependency

* [#300] Convert datasets to immutable objects in index

* [#58] Update client deps (#320)

* [#58] Update client deps

* Biggest change is that eslint now warns on string refs which we've been
  using quite a lot.
* https://facebook.github.io/react/docs/more-about-refs.html#the-ref-string-attribute

* [#58] fix collections test

* [#323] Remove custom Postgres 9.5 install (#324)

Since Travis now supports 9.5.

* #252 backend update (#325)

* [#252] Non jdbc library updates

Excluded logback-classic from immutant scheduling because of
duplications.

* [#252] First cut on jdbc upgrade

API changed, hence changes.

* [#252] Updated backend json lib

* [#252] Fixed typo

* [#252] Updated deps

Also switched back to old db-fixture

* [#259] Migrate to use new Duct template

- Env var configs (dev/prod)
- Added middleware for auth
- Migrations and setup scripts
- Ported components to new template
- Ported endpoints to new template

* [#259] First cut on tests with new Duct template

* [#259] Added profile template

* [#259] Remove seed to debug CI

* [#259] Disable migrate for CI debug

* [#259] Print db uri

* [#259] Debugging CI by printing system sources

* [#259] Looks like Travis don't support 9.1 anymore

* [#259] Remove custom Postgres 9.5

* [#259] Hide local.edn config

* [#259] Remove another local.edn

* [#259] Add test resources in dev profile

To make Eastwood happy.

* [#259] Cleaned up migration code

* [#259] Updated Readme

Documenting that we now need to call the dev function to load the dev
namespace before any lifecycle method is used.

* [#259] Code clean up

* [#259] Empty profile

* [#259] Added Postgres 9.5 Travis addon

* [#259] Added proper library endpoint

A temporary endpoint was present and now the proper one is back.

* [#259] Fixed authentication in production mode

Order of auth middlewares was wrong.

* [#259] Add rollbacks

Within the dev namespace:
(rollback) will rollback tenants
(rollback 1 will rollback 1 migration on all tenants)
(rollback :tenant-manager) ;; will rollback tenant manager migrations"

* [#259] Remove core.match include

Since it’s not used.

* [#259] Remove duplicate rollback definition

* [#259] Added codex setup

lein codox will generate documentation in backend/doc/

* [#321] Only rerender dashboard items when dimensions changed (#322)

* [#321] Only rerender dashboard items when dimensions changed

* [#321] Fix rerender logic for text entities

* [#321] Prevent attempts to access dimensions when layout is null

* [#321] Remove confusing double negation

* Issue/264 unit testing components (#328)

* [#264] First cut at component unit testing using enzyme

* [#264] Add babel-register

* [#264] columns should be a Immutable.js object

* [#264] Bump react versions

* [#329] Make sure correct env vars are used (#330)

* [#329] Make sure correct env vars are used

It should be LUMEN_FILE_UPLOAD_PATH

* [#329] Bump backend version

* [#331] Remove react-preset-production and list the necessary plugins explicitly instead (#332)

* Disable hide-errors middleware

To troubleshoot deployment.

* Enable stacktrace middleware

To troubleshoot deploy

* [#337] Migrate on init (#338)

We should run migrations on app init to make sure we progress the db on
deployments. Bindings had to be moved to a separate namespace to
circumvent circular dependencies.

* [#336] Update webpack proxy regex (#339)

* [#340] Assert correct env vars in production (#341)

* [#340] Assert correct env vars in production

* [#340] Fix env vars missing error messages
kardan pushed a commit that referenced this pull request Aug 28, 2016
* [#227] Pull request template (#228)

* Issue/188 keycloak (#268)

* [#188] Preconfigured Keycloak with Akvo realm

* [#188] Add small readme instructions

* [#188] Fix typo

* [#188] Use a local running Keycloak server for auth

* Change references from Keycloak server to localhost:8080
* Adds a script to build|run|stop a Keycloak server via Docker
* TODO: Move the hardcoded URLs to config file

* [#188] Update README

* [#188] Delete stopped container

- This will allow us to reuse the container name

* [#188] Attempt to build and run a keycloak service

* [#188] Fix build

- "Clojure projects on Travis CI assume you use Leiningen 2.4.x
  by default" https://docs.travis-ci.com/user/languages/clojure/

* [#261] Make keycloak url a config (#269)

* [#261] Make keycloak url a config

* [#261] Config Keyclock as env var

This applies to both frontend and backend.

* [#261] Disabled wrap-jwt-test

This tests gets certs from an external keycloak (which now is a
config), hence this breaks at the moment. We should review how to deal
with this when rethinking the testing strategy.

* [#261] Removed unused import

* [#261] Add require again

* [#261] Removed broken test

* [#261] Removed pprint in favour of printStackTrace

* #252 backend update (#298)

* [#252] Non jdbc library updates

Excluded logback-classic from immutant scheduling because of
duplications.

* [#252] First cut on jdbc upgrade

API changed, hence changes.

* [#252] Updated backend json lib

* [#252] Fixed typo

* [#258] [#303] Lumen now pass correct issuer to wrap-jwt-claims (#304)

* [#258] [#303] Lumen now pass correct issuer to wrap-jwt-claims

Also renamed middleware namespace to auth.

* [#258] Don't let Lumen start without openid-connect certs

When Lumen starts it will try and grab public certs from the provided
openid-connect issuer (Keycloak) to use in the auth middleware. If
Lumen is unsuccessful with getting certs we will print an error message
and propagate error message.

* Issue/58 update client deps (#305)

* [#58] Update client deps

* Finally react v.15
* react-select onChange now recieves the full option object, and not only the label
* react-select is now a controlled component. So there is no need to forceUpdate.

* [#58] Update LibraryCreateButton to not forceUpdate

* [#58] Force DashSelect to take strings rather than strings or numbers

* [#58] Add missing radix parameter

* [#307] Enabled Travis build notifications in Slack (#308)

* [#307] Enabled Travis build notifications in Slack

* [#307] Removed HipChat notifications

* [#263] Use redux-actions (#306)

* [#263] Use redux-actions

* Less boilerplate with createAction and handleActions
* No need need the constants modules
* redux-promise (or redux-rx) relies on "standardized" actions provided by redux-actions

* [#309] Fix label input in visualisation editor

* [#310] Fix race condition in dashboard editor

* [#311] Prevent multiple API requests for the same dataset or dashboard (#313)

* Issue/262 immutable js and domain modules (#312)

* [#262] Add entity and dataset domain modules

* In preparation for dataset move to immutable.js

* [#262] wip datasets as immutable.js objects

* Can now render the dataset table

* [#262] Fix column context menu

* [#262] change data type transforms with immutable.js

* [#262] Fix text transform tests

* [#262] Resolve eslint error

* [#262] transformations wip

* [#262] more dataset refactorings

* [#262] Make imports work

* [#262] Make text transforms work

* [#262] Fix sorting transform

* [#262] Fix filter transform

* [#262] Fix transformation log ui

* [#262] Visualisations rendering with immutablejs datasets

* [#262] Minor cleanup

* [#262] Resolve issues found by @gabemart's review

* [#262] Resolve additional issues found by @gabemart's review

* [#300] Initial code-splitting for containers (#319)

* [#300] Initial code-splitting for containers

* [#300] Fix inverse bool for haveSecondDataColumn

* [#300] Remove console statement

* [#300] Extract common chart utility dependency

* [#300] Convert datasets to immutable objects in index

* [#58] Update client deps (#320)

* [#58] Update client deps

* Biggest change is that eslint now warns on string refs which we've been
  using quite a lot.
* https://facebook.github.io/react/docs/more-about-refs.html#the-ref-string-attribute

* [#58] fix collections test

* [#323] Remove custom Postgres 9.5 install (#324)

Since Travis now supports 9.5.

* #252 backend update (#325)

* [#252] Non jdbc library updates

Excluded logback-classic from immutant scheduling because of
duplications.

* [#252] First cut on jdbc upgrade

API changed, hence changes.

* [#252] Updated backend json lib

* [#252] Fixed typo

* [#252] Updated deps

Also switched back to old db-fixture

* [#259] Migrate to use new Duct template

- Env var configs (dev/prod)
- Added middleware for auth
- Migrations and setup scripts
- Ported components to new template
- Ported endpoints to new template

* [#259] First cut on tests with new Duct template

* [#259] Added profile template

* [#259] Remove seed to debug CI

* [#259] Disable migrate for CI debug

* [#259] Print db uri

* [#259] Debugging CI by printing system sources

* [#259] Looks like Travis don't support 9.1 anymore

* [#259] Remove custom Postgres 9.5

* [#259] Hide local.edn config

* [#259] Remove another local.edn

* [#259] Add test resources in dev profile

To make Eastwood happy.

* [#259] Cleaned up migration code

* [#259] Updated Readme

Documenting that we now need to call the dev function to load the dev
namespace before any lifecycle method is used.

* [#259] Code clean up

* [#259] Empty profile

* [#259] Added Postgres 9.5 Travis addon

* [#259] Added proper library endpoint

A temporary endpoint was present and now the proper one is back.

* [#259] Fixed authentication in production mode

Order of auth middlewares was wrong.

* [#259] Add rollbacks

Within the dev namespace:
(rollback) will rollback tenants
(rollback 1 will rollback 1 migration on all tenants)
(rollback :tenant-manager) ;; will rollback tenant manager migrations"

* [#259] Remove core.match include

Since it’s not used.

* [#259] Remove duplicate rollback definition

* [#259] Added codex setup

lein codox will generate documentation in backend/doc/

* [#321] Only rerender dashboard items when dimensions changed (#322)

* [#321] Only rerender dashboard items when dimensions changed

* [#321] Fix rerender logic for text entities

* [#321] Prevent attempts to access dimensions when layout is null

* [#321] Remove confusing double negation

* Issue/264 unit testing components (#328)

* [#264] First cut at component unit testing using enzyme

* [#264] Add babel-register

* [#264] columns should be a Immutable.js object

* [#264] Bump react versions

* [#329] Make sure correct env vars are used (#330)

* [#329] Make sure correct env vars are used

It should be LUMEN_FILE_UPLOAD_PATH

* [#329] Bump backend version

* [#331] Remove react-preset-production and list the necessary plugins explicitly instead (#332)

* Disable hide-errors middleware

To troubleshoot deployment.

* Enable stacktrace middleware

To troubleshoot deploy

* [#337] Migrate on init (#338)

We should run migrations on app init to make sure we progress the db on
deployments. Bindings had to be moved to a separate namespace to
circumvent circular dependencies.

* [#336] Update webpack proxy regex (#339)

* [#340] Assert correct env vars in production (#341)

* [#340] Assert correct env vars in production

* [#340] Fix env vars missing error messages

* [#343] Resolve flow import regression (#344)

* Recent update to react-select made a change to the callback api. Instead of the selected value, we get an object with both the label and the value now.
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.

None yet

2 participants