thoth-station / common

A common library for the Thoth project
https://thoth-station.github.io/
GNU General Public License v3.0
4 stars 19 forks source link

`rfc5424logging` dependency may not support python 3.8 #1232

Closed mayaCostantini closed 2 years ago

mayaCostantini commented 2 years ago

Describe the bug When trying to solve dependencies from scratch for user-api and testing locally, the rfc5424logging dependency could not be installed. The project description for rfc5424logging does not state that python versions >3.7 are supported.

Moreover, the project has a low popularity on GitHub and its last release is from May 2019. Maybe we should consider using another library for logging.

To Reproduce Run user-api locally (for stage) with the following Pipfile content:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi-org-simple"

[packages]
connexion = "*"
flask = ">=1.1.0, <2.0.0"
prometheus-flask-exporter = "*"
markupsafe = "<2.1.0"

[dev-packages]

[pipenv]
allow_prereleases = false

[requires]
python_version = "3.8"

[thoth]
disable_index_adjustment = false

[thoth.allow_prereleases]

with dependencies locked by pipenv.

Additional context Error log:

Loading .env environment variables...
[2022-03-10 10:34:18 +0100] [85415] [INFO] Starting gunicorn 20.1.0
[2022-03-10 10:34:18 +0100] [85415] [INFO] Listening at: http://127.0.0.1:8000 (85415)
[2022-03-10 10:34:18 +0100] [85415] [INFO] Using worker: sync
[2022-03-10 10:34:18 +0100] [85423] [INFO] Booting worker with pid: 85423
[2022-03-10 10:34:18 +0100] [85423] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mcostant/Documents/Repositories/ThothStation/UserAPI/user-api/thoth/user_api/openapi_server.py", line 37, in <module>
    from thoth.common import __version__ as __common__version__
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/thoth/common/__init__.py", line 36, in <module>
    from .logging import init_logging
  File "/home/mcostant/.local/share/virtualenvs/user-api-jr1tbTCB/lib/python3.8/site-packages/thoth/common/logging.py", line 37, in <module>
    from rfc5424logging import Rfc5424SysLogHandler
ModuleNotFoundError: No module named 'rfc5424logging'
[2022-03-10 10:34:18 +0100] [85423] [INFO] Worker exiting (pid: 85423)
[2022-03-10 10:34:18 +0100] [85415] [INFO] Shutting down: Master
[2022-03-10 10:34:18 +0100] [85415] [INFO] Reason: Worker failed to boot.
fridex commented 2 years ago

We could drop completely rfc5424 logging - it is not set up in deployments anyway and we no longer use syslog. CC @goern @harshad16 are there any objections?

harshad16 commented 2 years ago

no objections on the removal. i m not aware of any scenario where this is being used.

mayaCostantini commented 2 years ago

/assign @mayaCostantini /priority critical-urgent /lifecycle active

mayaCostantini commented 2 years ago

/close Fixed by #1235

sesheta commented 2 years ago

@mayaCostantini: Closing this issue.

In response to [this](https://github.com/thoth-station/common/issues/1232#issuecomment-1064234390): >/close >Fixed by #1235 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.