Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okurz
Copy link
Member

@okurz okurz commented Jul 24, 2024

No description provided.

@okurz okurz force-pushed the feature/openqa_investigate_python branch from f8d55f9 to e65eaba Compare July 24, 2024 10:40
@okurz okurz changed the title Rewrite openqa-advanced-retrigger-jobs in python WIP -- AI supported bash->python rewrite of openqa-investigate Jul 24, 2024
@okurz okurz marked this pull request as draft July 24, 2024 10:44
@os-autoinst os-autoinst deleted a comment from mergify bot Jul 24, 2024
@nicksinger
Copy link
Member

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?

@okurz
Copy link
Member Author

okurz commented Jul 24, 2024

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.

Comment on lines +145 to +147
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")
Copy link
Contributor

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?

Copy link
Contributor

mergify bot commented Feb 13, 2025

This pull request is now in conflicts. Could you fix it? 🙏

Comment on lines +120 to +122
for line in lines[-15:]:
excerpt += line
return excerpt
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@kalikiana
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants