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

feat: provide log-detective explain integration for failed builds #3608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikromen
Copy link
Member

@@ -1225,7 +1225,7 @@
path = os.path.normpath(os.path.join(*path_parts))
return urljoin(app.config["BACKEND_BASE_URL"], path)

def _compressed_log_variant(self, basename, states_raw_log):
def log_variant(self, basename, states_raw_log):

Check warning

Code scanning / vcs-diff-lint

Build.log_variant: Missing function or method docstring Warning

Build.log_variant: Missing function or method docstring
@nikromen nikromen force-pushed the log-detective-integration branch from d51316c to b9793b7 Compare January 28, 2025 15:51
<a href="{{ failed_build_log_url | format(url) }}" class="btn btn-default btn-xs">
<span class="pficon pficon-info"></span> Explain with Log Detective AI
</a>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we place this into a separate column, since this is not a log file but "request for explanation".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, maybe we could have a clickable "failed" state? Can you upload a screenshot?

@@ -157,6 +157,12 @@
<span class="pficon pficon-ok"></span> {{ state }}
{% elif state == "failed" %}
<span class="pficon pficon-error-circle-o"></span> {{ state }}
{% if failed_build_log_url and config.LOG_DETECTIVE_BUTTON %}
Copy link
Member

@praiskup praiskup Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The used config option is ON in prod, and we want to keep this new UI disabled for some time... I think we need yet another option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not, it will be quite some time before we'll do a new Copr release anyway.


Returns:
the full URL to the log file or None if the log file does not exist
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 this rewrite is weird, can we have a separate method for the new link?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or IMHO even better, can we improve log detective to handle the compressed logs?

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.

3 participants