Skip to content

Support log-link for AI log agent#4415

Open
lubaihua33 wants to merge 4 commits intomainfrom
baihua/loglink
Open

Support log-link for AI log agent#4415
lubaihua33 wants to merge 4 commits intomainfrom
baihua/loglink

Conversation

@lubaihua33
Copy link
Copy Markdown
Collaborator

@lubaihua33 lubaihua33 commented Apr 14, 2026

Description

We can use the following command to analyze the logs in storage account.
python -m lisa.ai.log_agent analyze -ll "https://ms.portal.azure.com/#blade/Microsoft_Azure_Storage/ContainerMenuBlade/overview/storageAccountId/%2Fsubscriptions%2F0cc2a67a-58b9-4e4f-98a8-bfa46a28e896%2FresourceGroups%2Flisa_shared_resource%2Fproviders%2FMicrosoft.Storage%2FstorageAccounts%2Flisalogs6a28e896/path/lisa-logs%2FAzCertify%20Test_AzCertify%20NVMe%20Test%2020260312%2F20260312%2F20260312-091707-071%2Ftests%2F20260312-091852-338-verify_nvme_disk_controller_type"

The log link format is consistent with LISA-generated log links.

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

AI log agent

I have run a test using a log link, and it works as expected.

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

@lubaihua33 lubaihua33 requested a review from LiliDeng as a code owner April 14, 2026 09:36
Copilot AI review requested due to automatic review settings April 14, 2026 09:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for analyzing logs directly from a LISA-generated Azure Storage Portal link by parsing the link, downloading blobs under the selected prefix, and then running the existing analysis flow on the downloaded local folder.

Changes:

  • Add parsing logic for LISA Azure Storage portal links and extract storage identifiers + blob prefix.
  • Download matching blobs locally using AAD (DefaultAzureCredential) and analyze the downloaded directory.
  • Update CLI + documentation to accept --log-link (-ll) as an alternative to --log-folders (-l).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
lisa/ai/log_agent.py Implements link parsing, AAD-based blob download, and CLI plumbing for --log-link.
lisa/ai/README.md Documents new --log-link (-ll) usage and updates required-parameter guidance.

Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py Outdated
Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py Outdated
Comment thread lisa/ai/README.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 01:02
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py Outdated
Comment thread lisa/ai/README.md
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copilot AI review requested due to automatic review settings April 16, 2026 01:19
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread lisa/ai/README.md Outdated
Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py Outdated
Copilot AI review requested due to automatic review settings April 16, 2026 01:24
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py Outdated
Comment thread lisa/ai/log_agent.py Outdated
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copilot AI review requested due to automatic review settings April 16, 2026 01:47
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread lisa/ai/log_agent.py Outdated
Comment thread lisa/ai/log_agent.py
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 01:56
@github-actions
Copy link
Copy Markdown

🤖 AI Test Selection

No test cases were selected for this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py
Comment thread lisa/ai/log_agent.py

def _raise_missing_azure_dependency_error(
module_name: str, error: ModuleNotFoundError
) -> None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

_raise_missing_azure_dependency_error never returns, it's typed as None, it should be NoReturn

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