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

Failing of alll database metrics. #641

Closed
harshad16 opened this issue Mar 16, 2021 · 1 comment
Closed

Failing of alll database metrics. #641

harshad16 opened this issue Mar 16, 2021 · 1 comment

Comments

@harshad16
Copy link
Member

Describe the bug
All graph metrics are failing due to connection errors.

{"name": "thoth.metrics_exporter", "levelname": "ERROR", "module": "wsgi", "lineno": 89, "funcname": "func_wrapper", "created": 1615921004.0016477, "asctime": "2021-03-16 18:56:44,001", "msecs": 1.6477108001708984, "relative_created": 4819.690942764282, "process": 23, "message": "Failed to run metrics gathering job DBMetrics.set_script_head_revision\nTraceback (most recent call last):\n  File \"/opt/app-root/src/thoth/metrics_exporter/jobs/base.py\", line 91, in graph\n    cls._GRAPH.connect()\n  File \"/opt/app-root/lib64/python3.8/site-packages/thoth/storages/graph/postgres.py\", line 299, in connect\n    if not database_exists(self._engine.url):\n  File \"/opt/app-root/lib64/python3.8/site-packages/thoth/storages/graph/postgres_utils.py\", line 79, in database_exists\n    database, url.database = url.database, os.getenv('KNOWLEDGE_GRAPH_DATABASE')\nAttributeError: can't set attribute\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/opt/app-root/src/wsgi.py\", line 87, in func_wrapper\n    job()\n  File \"<decorator-gen-10>\", line 2, in set_script_head_revision\n  File \"/opt/app-root/src/thoth/metrics_exporter/jobs/base.py\", line 42, in register_metric_job\n    method(*args, **kwargs)\n  File \"/opt/app-root/src/thoth/metrics_exporter/jobs/db.py\", line 124, in set_script_head_revision\n    \"metrics-exporter\", cls.graph().get_script_alembic_version_head(), Configuration.DEPLOYMENT_NAME\n  File \"/opt/app-root/src/thoth/metrics_exporter/jobs/base.py\", line 94, in graph\n    raise Exception(\"Raise a flag if there is an error connecting to database. %r\", e)\nException: ('Raise a flag if there is an error connecting to database. %r', AttributeError(\"can't set attribute\"))"}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/storages/graph/postgres.py", line 299, in connect
    if not database_exists(self._engine.url):
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/storages/graph/postgres_utils.py", line 79, in database_exists
    database, url.database = url.database, os.getenv('KNOWLEDGE_GRAPH_DATABASE')
AttributeError: can't set attribute
@harshad16
Copy link
Member Author

fixed by the v0.14.1
this was caused by the issue of sqlalchemy.
pinning it has fixed this.

@harshad16 harshad16 moved this to Completed in SIG-DevSecOps Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant