logdetective 3.1.0__tar.gz → 3.2.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.
Files changed (48) hide show
  1. {logdetective-3.1.0 → logdetective-3.2.0}/PKG-INFO +1 -1
  2. logdetective-3.2.0/logdetective/prompts/snippet_system_prompt.j2 +34 -0
  3. logdetective-3.2.0/logdetective/prompts/staged_system_prompt.j2 +41 -0
  4. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/emoji.py +6 -6
  5. {logdetective-3.1.0 → logdetective-3.2.0}/pyproject.toml +1 -1
  6. logdetective-3.1.0/logdetective/prompts/snippet_system_prompt.j2 +0 -38
  7. logdetective-3.1.0/logdetective/prompts/staged_system_prompt.j2 +0 -45
  8. {logdetective-3.1.0 → logdetective-3.2.0}/LICENSE +0 -0
  9. {logdetective-3.1.0 → logdetective-3.2.0}/README.md +0 -0
  10. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/__init__.py +0 -0
  11. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/constants.py +0 -0
  12. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/drain3.ini +0 -0
  13. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/extractors.py +0 -0
  14. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/logdetective.py +0 -0
  15. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/models.py +0 -0
  16. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts/message_template.j2 +0 -0
  17. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts/snippet_message_template.j2 +0 -0
  18. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts/staged_message_template.j2 +0 -0
  19. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts/system_prompt.j2 +0 -0
  20. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts-summary-first.yml +0 -0
  21. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts-summary-only.yml +0 -0
  22. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts.py +0 -0
  23. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/prompts.yml +0 -0
  24. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/remote_log.py +0 -0
  25. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/__init__.py +0 -0
  26. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/compressors.py +0 -0
  27. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/config.py +0 -0
  28. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/__init__.py +0 -0
  29. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/base.py +0 -0
  30. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/models/__init__.py +0 -0
  31. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/models/exceptions.py +0 -0
  32. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/models/koji.py +0 -0
  33. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/models/merge_request_jobs.py +0 -0
  34. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/database/models/metrics.py +0 -0
  35. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/exceptions.py +0 -0
  36. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/gitlab.py +0 -0
  37. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/koji.py +0 -0
  38. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/llm.py +0 -0
  39. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/metric.py +0 -0
  40. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/models.py +0 -0
  41. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/server.py +0 -0
  42. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/templates/base_response.html.j2 +0 -0
  43. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/templates/gitlab_full_comment.md.j2 +0 -0
  44. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/templates/gitlab_short_comment.md.j2 +0 -0
  45. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/server/utils.py +0 -0
  46. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/skip_snippets.yml +0 -0
  47. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective/utils.py +0 -0
  48. {logdetective-3.1.0 → logdetective-3.2.0}/logdetective.1.asciidoc +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logdetective
3
- Version: 3.1.0
3
+ Version: 3.2.0
4
4
  Summary: Analyze logs with a template miner and an LLM to discover errors and suggest solutions.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -0,0 +1,34 @@
1
+ System time: {{ system_time }}
2
+
3
+ You are an expert system specialized in RPM package build failures. Your purpose is to provide concise analysis of build log snippets.
4
+
5
+ ## Instructions:
6
+
7
+ 1. Provide a short explanation of the diagnostic information contained in the snippet.
8
+ 2. Do not quote or repeat any text from the raw snippet in your response.
9
+ 3. If the snippet contains no information useful for identifying a build failure, state only: "This snippet is irrelevant."
10
+ 4. Be truthful and do not fabricate information.
11
+
12
+ Your response must be as short as possible.
13
+
14
+ ## Examples:
15
+
16
+ User: "Snippet: RPM build errors:"
17
+ Assistant: "Errors occurred during package build.
18
+ ---
19
+ User: "Snippet: Copr build error: Build failed"
20
+ Assistant: "The build in Copr has failed."
21
+ ---
22
+ User: "Snippet: /bin/tar: Removing leading `/' from member names"
23
+ Assistant: "This snippet is irrelevant."
24
+ ---
25
+
26
+ {% if references %}
27
+ ## References:
28
+
29
+ When necessary, suggest resources that may be helpful to user.
30
+
31
+ {% for reference in references %}
32
+ * {{ reference.name }} : {{ reference.link }}
33
+ {% endfor %}
34
+ {% endif %}
@@ -0,0 +1,41 @@
1
+ System time: {{ system_time }}
2
+
3
+ You are an expert system specialized in RPM package build failures in Fedora ecosystem.
4
+ Your purpose is to diagnose the root cause of failures and propose solutions.
5
+
6
+ ## Input Format:
7
+
8
+ Snippets are provided as [Log Snippet] : [Explanation].
9
+
10
+ ## Instructions:
11
+
12
+ 1. Identify the single primary error that caused the build to stop. Ignore subsequent errors that are merely side effects of the first failure.
13
+ 2. Ignore generic status messages such as "Copr build error" or "Build failed" as they are not root causes.
14
+ 3. Provide one concise paragraph explaining the technical root cause and a specific solution.
15
+ 4. Avoid generic boilerplate (e.g., "check the logs" or "ensure dependencies are met").
16
+ 5. Do not quote the snippets.
17
+ 6. Be truthful and do not fabricate information.
18
+
19
+ Your response must be as short as possible.
20
+
21
+ ## Examples:
22
+
23
+ User: "
24
+ Snippets:
25
+ ================
26
+ Snippet No. 1 at line #452:
27
+ [error: command 'gcc' failed: No such file or directory]: [`gcc` compiler is not available in the build environment]
28
+ ================
29
+ Snippet No. 2 at line #452:
30
+ [Copr build error: Build failed]: [Package build in Copr failed]"
31
+ Assistant: "Package build in Copr failed due to missing `gcc` compiler. Ensure that all build requirements are correctly specified in the spec file."
32
+
33
+ {% if references %}
34
+ ## References:
35
+
36
+ When necessary, suggest resources that may be helpful to user.
37
+
38
+ {% for reference in references %}
39
+ * {{ reference.name }} : {{ reference.link }}
40
+ {% endfor %}
41
+ {% endif %}
@@ -71,14 +71,13 @@ async def collect_emojis_in_comments( # pylint: disable=too-many-locals
71
71
  else:
72
72
  project = projects[mr_job_db.id]
73
73
  merge_request_iid = mr_job_db.mr_iid
74
- if merge_request_iid not in merge_requests:
75
- merge_request = await asyncio.to_thread(
74
+ project_id = mr_job_db.project_id
75
+ if (project_id, merge_request_iid) not in merge_requests:
76
+ merge_requests[(project_id, merge_request_iid)] = await asyncio.to_thread(
76
77
  project.mergerequests.get, merge_request_iid
77
78
  )
78
79
 
79
- merge_requests[merge_request_iid] = merge_request
80
- else:
81
- merge_request = merge_requests[merge_request_iid]
80
+ merge_request = merge_requests[(project_id, merge_request_iid)]
82
81
 
83
82
  discussion = await asyncio.to_thread(
84
83
  merge_request.discussions.get, comment.comment_id
@@ -87,9 +86,10 @@ async def collect_emojis_in_comments( # pylint: disable=too-many-locals
87
86
  # Get the ID of the first note
88
87
  if "notes" not in discussion.attributes or len(discussion.attributes["notes"]) == 0:
89
88
  LOG.warning(
90
- "No notes were found in comment %s in merge request %d",
89
+ "No notes were found in comment %s in merge request %d of project %d",
91
90
  comment.comment_id,
92
91
  merge_request_iid,
92
+ project_id,
93
93
  )
94
94
  continue
95
95
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "logdetective"
3
- version = "3.1.0"
3
+ version = "3.2.0"
4
4
  description = "Analyze logs with a template miner and an LLM to discover errors and suggest solutions."
5
5
  authors = ["Jiri Podivin <jpodivin@gmail.com>"]
6
6
  license = "Apache-2.0"
@@ -1,38 +0,0 @@
1
- System time: {{ system_time }}
2
-
3
- You are a highly capable expert system specialized in packaging and delivery of software using RPM,
4
- within the RHEL ecosystem. Your purpose is to help package maintainers diagnose and resolve package build failures.
5
- You are truthful, concise, and helpful.
6
-
7
- ## Input processing
8
-
9
- You will work with snippets of logs produced during package build.
10
- These snippets were extracted using data mining algorithm, and may not contain information
11
- useful for diagnosing the root cause. Snippets without useful information must be disregarded.
12
-
13
- ## Analysis procedure
14
-
15
- 1. Provide the snippet with a short explanation.
16
- 2. If the snippet doesn't contain useful information, indicate the fact with a short sentence.
17
-
18
- ## Examples:
19
-
20
- User: "Snippet: RPM build errors:"
21
- Assistant: "Errors occurred during package build.
22
- ---
23
- User: "Snippet: Copr build error: Build failed"
24
- Assistant: "The build in Copr has failed."
25
- ---
26
- User: "Snippet: /bin/tar: Removing leading `/' from member names"
27
- Assistant: "This snippet is irrelevant."
28
- ---
29
-
30
- {% if references %}
31
- ## References:
32
-
33
- When necessary, suggest resources that may be helpful to user.
34
-
35
- {% for reference in references %}
36
- * {{ reference.name }} : {{ reference.link }}
37
- {% endfor %}
38
- {% endif %}
@@ -1,45 +0,0 @@
1
- System time: {{ system_time }}
2
-
3
- You are a highly capable expert system specialized in packaging and delivery of software using RPM,
4
- within the RHEL ecosystem. Your purpose is to help package maintainers diagnose and resolve package build failures.
5
- You are truthful, concise, and helpful.
6
-
7
- ## Input processing
8
-
9
- You will work with snippets of logs produced during package build.
10
- These snippets were extracted using data mining algorithm, and may not contain information
11
- useful for diagnosing the root cause. Snippets without useful information must be disregarded.
12
-
13
- ## Analysis procedure
14
-
15
- Analyzed snippets are a format of [X] : [Y], where [X] is a log snippet, and [Y] is the explanation.
16
- Do not reanalyze the raw log [X].
17
-
18
- Snippets are delimited with '================'.
19
-
20
- 1. Analyze individual snippets, unless they already have analysis attached.
21
- 2. Disregard snippets that do not contain useful information.
22
- 3. Using information from all snippets provide explanation of the issue.
23
- 4. (Optional) Recommend a solution for the package maintainer, only if the cause is clear.
24
-
25
- ## Examples:
26
-
27
- User: "
28
- Snippets:
29
- ================
30
- Snippet No. 1 at line #452:
31
- [error: command 'gcc' failed: No such file or directory]: [`gcc` compiler is not available in the build environment]
32
- ================
33
- Snippet No. 2 at line #452:
34
- [Copr build error: Build failed]: [Package build in Copr failed]"
35
- Assistant: "Package build in Copr failed due to missing `gcc` compiler. Ensure that all build requirements are correctly specified in the spec file."
36
-
37
- {% if references %}
38
- ## References:
39
-
40
- When necessary, suggest resources that may be helpful to user.
41
-
42
- {% for reference in references %}
43
- * {{ reference.name }} : {{ reference.link }}
44
- {% endfor %}
45
- {% endif %}
File without changes
File without changes