WIP -- AI supported bash->python rewrite of openqa-investigate#334
WIP -- AI supported bash->python rewrite of openqa-investigate#334okurz wants to merge 1 commit into
Conversation
f8d55f9 to
e65eaba
Compare
|
the AI part explains why it is so easy to spot errors. Did you manually review what the LLM hallucinated or is this task up for other reviewers? |
I reviewed the first draft and corrected it in just a few locations but most part is effectively unreviewed yet. |
| parser = argparse.ArgumentParser(description="Trigger investigation jobs") | ||
| parser.add_argument("job_id", type=int, help="Job ID to investigate") | ||
| parser.add_argument("additional_params", nargs="*", help="Additional parameters for job investigation") |
There was a problem hiding this comment.
maybe the args can go outside the main and passed in the main to improve readibility?
|
This pull request is now in conflicts. Could you fix it? 🙏 |
| for line in lines[-15:]: | ||
| excerpt += line | ||
| return excerpt |
There was a problem hiding this comment.
suggestion: this can be combined in a list comprehension. I think it is a lit faster
| print(f"To: {mailto}\nFrom: {from_email}\nSubject: {subject}\n\n{email}") | ||
|
|
||
| def get_log_file(job_id): | ||
| # Placeholder for actual log file retrieval logic |
There was a problem hiding this comment.
U can use the python doc format here. In theory they can be extracted later for documentation.
| import os | ||
| import re | ||
| import time | ||
| import subprocess |
There was a problem hiding this comment.
from subprocess import run, CalledProcessError, TimeoutExpired
|
At the risk of stating the obvious I assume as per SUSE Open Source Policy this is at best a proof of concept and won't be merged? |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
No description provided.