Configuration for new Dashboard functionality#8
Configuration for new Dashboard functionality#8mircealungu merged 5 commits intozeeguu:masterfrom kloostert:master
Conversation
| LOG_DIR=./ | ||
| N=5 | ||
| SUBMIT_RESULTS_URL=https://zeeguu.unibe.ch/api/dashboard/submit-test-results | ||
|
|
There was a problem hiding this comment.
i'm happy that this is not hardcoded anymore :)
but how come is it not needed?
There was a problem hiding this comment.
It's still needed, but for testing purposes, I turned the uploading of unit test results off.
This way, the live deployment of the Dashboard would not receive many Travis test results for the same Zeeguu-API version while I was testing the Travis configuration.
But this can easily be turned back on again by adding the submit-results-url to the config file whenever necessary.
| @@ -16,6 +16,7 @@ | |||
| dependency_links=[ | |||
| "git+https://github.com/mircealungu/zeeguu-core.git#egg=zeeguu", | |||
There was a problem hiding this comment.
can update this too to: https://github.com/zeeguu-ecosystem/Zeeguu-Core
| @@ -16,6 +16,7 @@ | |||
| dependency_links=[ | |||
| "git+https://github.com/mircealungu/zeeguu-core.git#egg=zeeguu", | |||
| "git+https://github.com/mircealungu/python-translators.git#egg=python_translators", | |||
There was a problem hiding this comment.
| try: | ||
| import dashboard | ||
| dashboard.config.from_file('/home/mircea/zee/http/api/dashboard.cfg') | ||
| dashboard.config.from_file('/home/travis/build/zeeguu-ecosystem/Zeeguu-API/dashboard_test.cfg') |
There was a problem hiding this comment.
hmm. instead of fighting for this string, maybe it's good to use an envvar for the location of the dashboard.cfg? e.g. DASHBOARD_CFG ?
There was a problem hiding this comment.
Yes, this would be better. I can implement this such that the Dashboard will take the envvar value when specified, and otherwise takes the dashboard.config.from_file().
| try: | ||
| import dashboard | ||
| dashboard.config.from_file('/home/travis/build/zeeguu-ecosystem/Zeeguu-API/dashboard_test.cfg') | ||
| dashboard.config.from_file('/home/mircea/zee/http/api/dashboard.cfg') |
There was a problem hiding this comment.
@kloostert -- this seems to still be hardcoded, and not using the envvar, right ? :)
There was a problem hiding this comment.
Right, I reverted that line back to what it was before.
But specifying envvar DASHBOARD_CONFIG will override this location string.
Thus, whenever the envvar is specified, it will use that one, else the location string provided in the from_file() call.
There was a problem hiding this comment.
coool! but if we use the envvar then i think we should drop completely this hardcoded string... its's security paranoia... but, we are giving away info about the state of our server :)
There was a problem hiding this comment.
Also, a note should be added here about the envvar: https://github.com/flask-dashboard/Flask-Monitoring-Dashboard
There was a problem hiding this comment.
Ok, added some info about it in the setup section of the readme (on the dev branch).
The line which configures the dashboard can be set to dashboard.config.from_file(None).
This will take the envvar instead of the location string.
This should enable the new unit-test-grouping-by-endpoint functionality of the Dashboard to be used in the Zeeguu-API Travis integration.
The
dashboard_test.cfgfile in this PR does not contain the SUBMIT_RESULTS_URL option, which means that the test results will not be uploaded to the live deployment of the Dashboard.This way, unwanted Travis test results will not be displayed on the live Dashboard.
If the results should be uploaded to the live Dashboard again, simply adding the following line to the config file will do the trick:
SUBMIT_RESULTS_URL=https://zeeguu.unibe.ch/api/dashboard/submit-test-results