logdetective 2.2.0__py3-none-any.whl → 2.2.1__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.
@@ -106,35 +106,35 @@ async def get_http_session(request: Request) -> aiohttp.ClientSession:
106
106
  return request.app.http
107
107
 
108
108
 
109
- def requires_token_when_set(authentication: Annotated[str | None, Header()] = None):
109
+ def requires_token_when_set(authorization: Annotated[str | None, Header()] = None):
110
110
  """
111
- FastAPI Depend function that expects a header named Authentication
111
+ FastAPI Depend function that expects a header named Authorization
112
112
 
113
113
  If LOGDETECTIVE_TOKEN env var is set, validate the client-supplied token
114
114
  otherwise ignore it
115
115
  """
116
116
  if not API_TOKEN:
117
- LOG.info("LOGDETECTIVE_TOKEN env var not set, authentication disabled")
117
+ LOG.info("LOGDETECTIVE_TOKEN env var not set, authorization disabled")
118
118
  # no token required, means local dev environment
119
119
  return
120
- if authentication:
120
+ if authorization:
121
121
  try:
122
- token = authentication.split(" ", 1)[1]
122
+ token = authorization.split(" ", 1)[1]
123
123
  except (ValueError, IndexError) as ex:
124
124
  LOG.warning(
125
- "Authentication header has invalid structure '%s', it should be 'Bearer TOKEN'",
126
- authentication,
125
+ "Authorization header has invalid structure '%s', it should be 'Bearer TOKEN'",
126
+ authorization,
127
127
  )
128
128
  # eat the exception and raise 401 below
129
129
  raise HTTPException(
130
130
  status_code=401,
131
- detail=f"Invalid authentication, HEADER '{authentication}' not valid.",
131
+ detail=f"Invalid authorization, HEADER '{authorization}' not valid.",
132
132
  ) from ex
133
133
  if token == API_TOKEN:
134
134
  return
135
135
  LOG.info("Provided token '%s' does not match expected value.", token)
136
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")
137
+ LOG.error("No authorization header provided but LOGDETECTIVE_TOKEN env var is set")
138
138
  raise HTTPException(status_code=401, detail="No token provided.")
139
139
 
140
140
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: logdetective
3
- Version: 2.2.0
3
+ Version: 2.2.1
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
@@ -26,14 +26,14 @@ logdetective/server/llm.py,sha256=bmA6LsV80OdO60q4WLoKuehuVDEYq-HhBAYcZeLfrv8,10
26
26
  logdetective/server/metric.py,sha256=QrrX1FmMa7sc57av0P9UFOiCIFYVLs1opOWV3ObYo0s,4086
27
27
  logdetective/server/models.py,sha256=rsdEf3lw0fvjWKhC9evaSsfZQR-H2mg0uig4KA6ho0c,20762
28
28
  logdetective/server/plot.py,sha256=C98U9prGoPkp8_t4v2dovdZuwOhSbxXSeB_K9Q2r3NE,14607
29
- logdetective/server/server.py,sha256=zap8Mz3NTFvaDJMNQDATbPYk6MhQ9o1J9gJECnGWvuQ,24694
29
+ logdetective/server/server.py,sha256=s1QtD6FYsQX7BaVi783v7sqCEk4ccqlBJHFKUQlGgWM,24684
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=7ub-Nz7LUP_idwi2_nEC4FBuY9otSBUVy9nw86-sjYc,3861
33
33
  logdetective/skip_snippets.yml,sha256=reGlhPPCo06nNUJWiC2LY-OJOoPdcyOB7QBTSMeh0eg,487
34
34
  logdetective/utils.py,sha256=9EyHKGNxtS1ObSepL-T3M43rKIxQJkFDA5yllLbS5Bs,9178
35
- logdetective-2.2.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
36
- logdetective-2.2.0.dist-info/METADATA,sha256=9bIs4_L1PPIilOBBsfoLULfTTtZ8RYLCmq_0XpxJHXQ,21455
37
- logdetective-2.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
- logdetective-2.2.0.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
39
- logdetective-2.2.0.dist-info/RECORD,,
35
+ logdetective-2.2.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
36
+ logdetective-2.2.1.dist-info/METADATA,sha256=qF8CgXo59m7Aa5-bbCCwc252ImSgaxfaVPiuHkvFX4c,21455
37
+ logdetective-2.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
38
+ logdetective-2.2.1.dist-info/entry_points.txt,sha256=3K_vXja6PmcA8sNdUi63WdImeiNhVZcEGPTaoJmltfA,63
39
+ logdetective-2.2.1.dist-info/RECORD,,