logdetective 1.7.0__tar.gz → 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {logdetective-1.7.0 → logdetective-1.9.0}/PKG-INFO +2 -1
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/models/merge_request_jobs.py +1 -1
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/models/metrics.py +13 -8
- {logdetective-1.7.0 → logdetective-1.9.0}/pyproject.toml +4 -3
- {logdetective-1.7.0 → logdetective-1.9.0}/LICENSE +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/README.md +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/__init__.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/constants.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/drain3.ini +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/extractors.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/logdetective.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/models.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/prompts-summary-first.yml +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/prompts-summary-only.yml +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/prompts.yml +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/remote_log.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/__init__.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/compressors.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/config.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/__init__.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/base.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/models/__init__.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/models/exceptions.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/database/models/koji.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/emoji.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/exceptions.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/gitlab.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/koji.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/llm.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/metric.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/models.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/plot.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/server.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/templates/gitlab_full_comment.md.j2 +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/templates/gitlab_short_comment.md.j2 +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/skip_snippets.yml +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective/utils.py +0 -0
- {logdetective-1.7.0 → logdetective-1.9.0}/logdetective.1.asciidoc +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: logdetective
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Log using LLM AI to search for build/test failures and provide ideas for fixing these.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: Jiri Podivin
|
|
@@ -27,6 +27,7 @@ Requires-Dist: backoff (==2.2.1) ; extra == "server" or extra == "server-testing
|
|
|
27
27
|
Requires-Dist: drain3 (>=0.9.11,<0.10.0)
|
|
28
28
|
Requires-Dist: fastapi (>=0.111.1) ; extra == "server" or extra == "server-testing"
|
|
29
29
|
Requires-Dist: huggingface-hub (>0.23.2)
|
|
30
|
+
Requires-Dist: koji (>=1.35.0,<2.0.0) ; extra == "server" or extra == "server-testing"
|
|
30
31
|
Requires-Dist: llama-cpp-python (>0.2.56,!=0.2.86)
|
|
31
32
|
Requires-Dist: matplotlib (>=3.8.4,<4.0.0) ; extra == "server" or extra == "server-testing"
|
|
32
33
|
Requires-Dist: numpy (>=1.26.0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import io
|
|
2
2
|
import enum
|
|
3
3
|
import datetime
|
|
4
|
-
from typing import Optional, List
|
|
4
|
+
from typing import Optional, List, Self, Tuple
|
|
5
5
|
|
|
6
6
|
import backoff
|
|
7
7
|
|
|
@@ -114,7 +114,7 @@ class AnalyzeRequestMetrics(Base):
|
|
|
114
114
|
def update( # pylint: disable=too-many-arguments disable=too-many-positional-arguments
|
|
115
115
|
cls,
|
|
116
116
|
id_: int,
|
|
117
|
-
response_sent_at:
|
|
117
|
+
response_sent_at: DateTime,
|
|
118
118
|
response_length: int,
|
|
119
119
|
response_certainty: float,
|
|
120
120
|
compressed_response: bytes,
|
|
@@ -123,6 +123,8 @@ class AnalyzeRequestMetrics(Base):
|
|
|
123
123
|
with data related to the given response"""
|
|
124
124
|
with transaction(commit=True) as session:
|
|
125
125
|
metrics = session.query(AnalyzeRequestMetrics).filter_by(id=id_).first()
|
|
126
|
+
if metrics is None:
|
|
127
|
+
raise ValueError("Returned `AnalyzeRequestMetrics` table is empty.")
|
|
126
128
|
metrics.response_sent_at = response_sent_at
|
|
127
129
|
metrics.response_length = response_length
|
|
128
130
|
metrics.response_certainty = response_certainty
|
|
@@ -134,11 +136,13 @@ class AnalyzeRequestMetrics(Base):
|
|
|
134
136
|
def get_metric_by_id(
|
|
135
137
|
cls,
|
|
136
138
|
id_: int,
|
|
137
|
-
) ->
|
|
139
|
+
) -> Self:
|
|
138
140
|
"""Update a row
|
|
139
141
|
with data related to the given response"""
|
|
140
142
|
with transaction(commit=True) as session:
|
|
141
143
|
metric = session.query(AnalyzeRequestMetrics).filter_by(id=id_).first()
|
|
144
|
+
if metric is None:
|
|
145
|
+
raise ValueError("Returned `AnalyzeRequestMetrics` table is empty.")
|
|
142
146
|
return metric
|
|
143
147
|
|
|
144
148
|
def add_mr_job(
|
|
@@ -169,7 +173,7 @@ class AnalyzeRequestMetrics(Base):
|
|
|
169
173
|
project_id: int,
|
|
170
174
|
mr_iid: int,
|
|
171
175
|
job_id: int,
|
|
172
|
-
) -> List[
|
|
176
|
+
) -> List[Self]:
|
|
173
177
|
"""Search for all requests triggered by the specified merge request job.
|
|
174
178
|
|
|
175
179
|
Args:
|
|
@@ -204,11 +208,12 @@ class AnalyzeRequestMetrics(Base):
|
|
|
204
208
|
|
|
205
209
|
@classmethod
|
|
206
210
|
def get_dictionary_with_datetime_keys(
|
|
207
|
-
cls, time_format: str,
|
|
208
|
-
) -> dict[datetime.datetime,
|
|
209
|
-
"""Convert from a
|
|
211
|
+
cls, time_format: str, query_results: List[Tuple[str, int]]
|
|
212
|
+
) -> dict[datetime.datetime, int]:
|
|
213
|
+
"""Convert from a list of tuples with str as first values
|
|
214
|
+
to a dictionary with datetime keys"""
|
|
210
215
|
new_dict = {
|
|
211
|
-
datetime.datetime.strptime(
|
|
216
|
+
datetime.datetime.strptime(e[0], time_format): e[1] for e in query_results
|
|
212
217
|
}
|
|
213
218
|
return new_dict
|
|
214
219
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "logdetective"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.9.0"
|
|
4
4
|
description = "Log using LLM AI to search for build/test failures and provide ideas for fixing these."
|
|
5
5
|
authors = ["Jiri Podivin <jpodivin@gmail.com>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -53,10 +53,11 @@ matplotlib = {version = "^3.8.4", optional = true }
|
|
|
53
53
|
backoff = {version = "2.2.1", optional = true }
|
|
54
54
|
sentry-sdk = {version = "^2.17.0", optional = true, extras = ["fastapi"]}
|
|
55
55
|
openai = {version = "^1.82.1", optional = true}
|
|
56
|
+
koji = {version = "^1.35.0", optional = true}
|
|
56
57
|
|
|
57
58
|
[tool.poetry.extras]
|
|
58
|
-
server = ["fastapi", "sqlalchemy", "psycopg2", "alembic", "matplotlib", "backoff", "aiolimiter", "sentry-sdk", "openai"]
|
|
59
|
-
server-testing = ["fastapi", "sqlalchemy", "psycopg2-binary", "alembic", "matplotlib", "backoff", "pytest-asyncio", "sentry-sdk", "openai"]
|
|
59
|
+
server = ["fastapi", "sqlalchemy", "psycopg2", "alembic", "matplotlib", "backoff", "aiolimiter", "sentry-sdk", "openai", "koji"]
|
|
60
|
+
server-testing = ["fastapi", "sqlalchemy", "psycopg2-binary", "alembic", "matplotlib", "backoff", "pytest-asyncio", "sentry-sdk", "openai", "koji"]
|
|
60
61
|
|
|
61
62
|
[build-system]
|
|
62
63
|
requires = ["poetry-core"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/templates/gitlab_full_comment.md.j2
RENAMED
|
File without changes
|
{logdetective-1.7.0 → logdetective-1.9.0}/logdetective/server/templates/gitlab_short_comment.md.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|