-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use KibbleConfigParser in setup script #83
Use KibbleConfigParser in setup script #83
Conversation
try: | ||
return bool(self.get(section, key)) | ||
except Exception: | ||
raise TypeError("Unable to convert value to bool") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skekre98 unfortunately I had to remove those method as it seems that ConfigParser
already implements getint
and getboolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I'm sure they have a better implementation anyways 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skekre98 would you mind reviewing those changes? 😉
Before this commit I got this error when running Kibble locally: ``` kibble_1 | [2020-12-12 19:42:01 +0000] [7] [ERROR] Exception in worker process kibble_1 | Traceback (most recent call last): kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker kibble_1 | worker.init_process() kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process kibble_1 | self.load_wsgi() kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi kibble_1 | self.wsgi = self.app.wsgi() kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi kibble_1 | self.callable = self.load() kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load kibble_1 | return self.load_wsgiapp() kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp kibble_1 | return util.import_app(self.app_uri) kibble_1 | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app kibble_1 | mod = importlib.import_module(module) kibble_1 | File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module kibble_1 | return _bootstrap._gcd_import(name[level:], package, level) kibble_1 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import kibble_1 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load kibble_1 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked kibble_1 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked kibble_1 | File "<frozen importlib._bootstrap_external>", line 783, in exec_module kibble_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed kibble_1 | File "/kibble/kibble/api/handler.py", line 49, in <module> kibble_1 | with open(KIBBLE_YAML, "r") as f: kibble_1 | FileNotFoundError: [Errno 2] No such file or directory: '/kibble/kibble/api/yaml/kibble.yaml' kibble_1 | [2020-12-12 19:42:01 +0000] [7] [INFO] Worker exiting (pid: 7) ``` This was because https://github.com/apache/kibble/pull/83 replaced kibble.yaml with kibble.ini This PR reads the config from `kibble.ini`. This also adds a network to docker-compose file without which I was getting host not found error.
Before this commit I got this error when running Kibble locally: This was because https://github.com/apache/kibble/pull/83 replaced kibble.yaml with kibble.ini This PR reads the config from `kibble.ini`. This also adds a network to docker-compose file without which I was getting host not found error.
Follow up after #74
We still need to remove the using of
kibble.yaml
in few places but I wanted to limit a scope of this changes (for example it would be good to refactor connecting to es database - currently we implement same class two times #84 ).