-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP -- AI supported bash->python rewrite of openqa-investigate #334
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
No description provided.