logdetective 2.0.1__py3-none-any.whl → 2.1.0__py3-none-any.whl
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/server/models.py +0 -2
- logdetective/server/server.py +10 -8
- {logdetective-2.0.1.dist-info → logdetective-2.1.0.dist-info}/METADATA +12 -5
- {logdetective-2.0.1.dist-info → logdetective-2.1.0.dist-info}/RECORD +7 -7
- {logdetective-2.0.1.dist-info → logdetective-2.1.0.dist-info}/LICENSE +0 -0
- {logdetective-2.0.1.dist-info → logdetective-2.1.0.dist-info}/WHEEL +0 -0
- {logdetective-2.0.1.dist-info → logdetective-2.1.0.dist-info}/entry_points.txt +0 -0
logdetective/server/models.py
CHANGED
|
@@ -244,7 +244,6 @@ class InferenceConfig(BaseModel): # pylint: disable=too-many-instance-attribute
|
|
|
244
244
|
class ExtractorConfig(BaseModel):
|
|
245
245
|
"""Model for extractor configuration of logdetective server."""
|
|
246
246
|
|
|
247
|
-
context: bool = True
|
|
248
247
|
max_clusters: int = 8
|
|
249
248
|
verbose: bool = False
|
|
250
249
|
max_snippet_len: int = 2000
|
|
@@ -254,7 +253,6 @@ class ExtractorConfig(BaseModel):
|
|
|
254
253
|
if data is None:
|
|
255
254
|
return
|
|
256
255
|
|
|
257
|
-
self.context = data.get("context", True)
|
|
258
256
|
self.max_clusters = data.get("max_clusters", 8)
|
|
259
257
|
self.verbose = data.get("verbose", False)
|
|
260
258
|
self.max_snippet_len = data.get("max_snippet_len", 2000)
|
logdetective/server/server.py
CHANGED
|
@@ -117,23 +117,25 @@ def requires_token_when_set(authentication: Annotated[str | None, Header()] = No
|
|
|
117
117
|
LOG.info("LOGDETECTIVE_TOKEN env var not set, authentication disabled")
|
|
118
118
|
# no token required, means local dev environment
|
|
119
119
|
return
|
|
120
|
-
token = None
|
|
121
120
|
if authentication:
|
|
122
121
|
try:
|
|
123
122
|
token = authentication.split(" ", 1)[1]
|
|
124
|
-
except (ValueError, IndexError):
|
|
123
|
+
except (ValueError, IndexError) as ex:
|
|
125
124
|
LOG.warning(
|
|
126
|
-
"Authentication header has invalid structure
|
|
125
|
+
"Authentication header has invalid structure '%s', it should be 'Bearer TOKEN'",
|
|
127
126
|
authentication,
|
|
128
127
|
)
|
|
129
128
|
# eat the exception and raise 401 below
|
|
130
|
-
|
|
129
|
+
raise HTTPException(
|
|
130
|
+
status_code=401,
|
|
131
|
+
detail=f"Invalid authentication, HEADER '{authentication}' not valid.",
|
|
132
|
+
) from ex
|
|
131
133
|
if token == API_TOKEN:
|
|
132
134
|
return
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
)
|
|
136
|
-
raise HTTPException(status_code=401, detail=
|
|
135
|
+
LOG.info("Provided token '%s' does not match expected value.", token)
|
|
136
|
+
raise HTTPException(status_code=401, detail=f"Token '{token}' not valid.")
|
|
137
|
+
LOG.error("No authentication header provided but LOGDETECTIVE_TOKEN env var is set")
|
|
138
|
+
raise HTTPException(status_code=401, detail="No token provided.")
|
|
137
139
|
|
|
138
140
|
|
|
139
141
|
app = FastAPI(dependencies=[Depends(requires_token_when_set)], lifespan=lifespan)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: logdetective
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.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
|
|
@@ -20,23 +20,30 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
20
20
|
Classifier: Topic :: Software Development :: Debuggers
|
|
21
21
|
Provides-Extra: server
|
|
22
22
|
Provides-Extra: server-testing
|
|
23
|
-
|
|
23
|
+
Provides-Extra: testing
|
|
24
|
+
Requires-Dist: aiohttp (>=3.7.4,<4.0.0)
|
|
24
25
|
Requires-Dist: aiolimiter (>=1.0.0,<2.0.0) ; extra == "server"
|
|
26
|
+
Requires-Dist: aioresponses (>=0.7.8,<0.8.0) ; extra == "testing"
|
|
25
27
|
Requires-Dist: alembic (>=1.13.3,<2.0.0) ; extra == "server" or extra == "server-testing"
|
|
26
28
|
Requires-Dist: backoff (==2.2.1) ; extra == "server" or extra == "server-testing"
|
|
27
29
|
Requires-Dist: drain3 (>=0.9.11,<0.10.0)
|
|
28
|
-
Requires-Dist: fastapi (>=0.111.1) ; extra == "server" or extra == "server-testing"
|
|
29
|
-
Requires-Dist:
|
|
30
|
+
Requires-Dist: fastapi (>=0.111.1,<1.0.0) ; extra == "server" or extra == "server-testing"
|
|
31
|
+
Requires-Dist: flexmock (>=0.12.2,<0.13.0) ; extra == "testing"
|
|
32
|
+
Requires-Dist: huggingface-hub (>0.23.2,<0.35.0)
|
|
30
33
|
Requires-Dist: koji (>=1.35.0,<2.0.0) ; extra == "server" or extra == "server-testing"
|
|
31
|
-
Requires-Dist: llama-cpp-python (>0.2.56,!=0.2.86)
|
|
34
|
+
Requires-Dist: llama-cpp-python (>0.2.56,!=0.2.86,<1.0.0)
|
|
32
35
|
Requires-Dist: matplotlib (>=3.8.4,<4.0.0) ; extra == "server" or extra == "server-testing"
|
|
33
36
|
Requires-Dist: numpy (>=1.26.0)
|
|
34
37
|
Requires-Dist: openai (>=1.82.1,<2.0.0) ; extra == "server" or extra == "server-testing"
|
|
35
38
|
Requires-Dist: psycopg2 (>=2.9.9,<3.0.0) ; extra == "server"
|
|
36
39
|
Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0) ; extra == "server-testing"
|
|
37
40
|
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
|
|
41
|
+
Requires-Dist: pytest (>=8.4.1,<9.0.0) ; extra == "testing"
|
|
42
|
+
Requires-Dist: pytest-asyncio (>=1.1.0,<2.0.0) ; extra == "testing"
|
|
43
|
+
Requires-Dist: pytest-mock (>=3.14.1,<4.0.0) ; extra == "server-testing"
|
|
38
44
|
Requires-Dist: python-gitlab (>=4.4.0)
|
|
39
45
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
46
|
+
Requires-Dist: responses (>=0.25.7,<0.26.0) ; extra == "server-testing"
|
|
40
47
|
Requires-Dist: sentry-sdk[fastapi] (>=2.17.0,<3.0.0) ; extra == "server" or extra == "server-testing"
|
|
41
48
|
Requires-Dist: sqlalchemy (>=2.0.36,<3.0.0) ; extra == "server" or extra == "server-testing"
|
|
42
49
|
Project-URL: homepage, https://github.com/fedora-copr/logdetective
|
|
@@ -24,16 +24,16 @@ logdetective/server/gitlab.py,sha256=MrAprXLTN6Q15qBC_Y2y42iKdtmIfed_pfjEt0gABvc
|
|
|
24
24
|
logdetective/server/koji.py,sha256=LG1pRiKUFvYFRKzgQoUG3pUHfcEwMoaMNjUSMKw_pBA,5640
|
|
25
25
|
logdetective/server/llm.py,sha256=_JRbEpNHzXWy0BuwjFhhuwLdPzFi4yKikZHwoibWiek,9736
|
|
26
26
|
logdetective/server/metric.py,sha256=QrrX1FmMa7sc57av0P9UFOiCIFYVLs1opOWV3ObYo0s,4086
|
|
27
|
-
logdetective/server/models.py,sha256=
|
|
27
|
+
logdetective/server/models.py,sha256=SY3wdYgyNcggdCcslDX6QM-aMTTtI4OAG5UQtWrSIWM,19267
|
|
28
28
|
logdetective/server/plot.py,sha256=C98U9prGoPkp8_t4v2dovdZuwOhSbxXSeB_K9Q2r3NE,14607
|
|
29
|
-
logdetective/server/server.py,sha256=
|
|
29
|
+
logdetective/server/server.py,sha256=zap8Mz3NTFvaDJMNQDATbPYk6MhQ9o1J9gJECnGWvuQ,24694
|
|
30
30
|
logdetective/server/templates/gitlab_full_comment.md.j2,sha256=H4NPjm3l8X5d0TNtfyZZZj_gHY1Y7hWEqY6RaVA8qt0,1947
|
|
31
31
|
logdetective/server/templates/gitlab_short_comment.md.j2,sha256=vPisU1c98LPKEwlKtMrtlqnEOlbykPZK96MpHAf-o88,1758
|
|
32
32
|
logdetective/server/utils.py,sha256=ixEXSc93Zdwy94YkExdNJ1vRCe90dNP7DQpy8XlFYRU,4288
|
|
33
33
|
logdetective/skip_snippets.yml,sha256=reGlhPPCo06nNUJWiC2LY-OJOoPdcyOB7QBTSMeh0eg,487
|
|
34
34
|
logdetective/utils.py,sha256=Ur4EPCAeuvymFcUO10SpbCBI2tdcZ33s-fjCn9pfgUY,7822
|
|
35
|
-
logdetective-2.0.
|
|
36
|
-
logdetective-2.0.
|
|
37
|
-
logdetective-2.0.
|
|
38
|
-
logdetective-2.0.
|
|
39
|
-
logdetective-2.0.
|
|
35
|
+
logdetective-2.1.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
36
|
+
logdetective-2.1.0.dist-info/METADATA,sha256=m4je0-3BYIg84T_U5XeA4prsNzU6Z4itC5AZDRus0Xc,20560
|
|
37
|
+
logdetective-2.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
38
|
+
logdetective-2.1.0.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
|
|
39
|
+
logdetective-2.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|