Skip to content

Add MicrobotsLogAnalyzer custom ADO task#145

Open
MadhurAggarwal wants to merge 12 commits into
mainfrom
madagg/log-analyzer-ado-task
Open

Add MicrobotsLogAnalyzer custom ADO task#145
MadhurAggarwal wants to merge 12 commits into
mainfrom
madagg/log-analyzer-ado-task

Conversation

@MadhurAggarwal
Copy link
Copy Markdown
Member

Adds a custom Azure DevOps task, MicrobotsLogAnalyzer@0, for running Microbots LogAnalysisBot against log files using Azure OpenAI models, with authentication through an Azure Resource Manager Service Connection.

Overview

  • Added the MicrobotsLogAnalyzerTask Azure Pipelines task.
  • Added Azure DevOps extension manifest and npm dependencies required by the task for connecting to Service Connection.
  • Added documentation for Packaging, Publishing, and Using the task in a pipeline.
  • Added a sample Azure Pipelines YAML file.

Change Details

  • .gitignore: Ignores generated node_modules folders used while packaging the ADO task.
  • README.md: Added a brief guide for the new MicrobotsLogAnalyzerTask.
  • azure-pipelines/vss-extension.json: Defines the ADO extension that contributes the custom pipeline task. This file is needed for publishing the task.
  • azure-pipelines/MicrobotsLogAnalyzerTask/task.json: Defines the MicrobotsLogAnalyzer@0 task metadata, inputs, Node 20 handler, and task restrictions (restrictions ensure that LLM Outputs don't setup unwanted ENVs in ADO Pipeline, for example printing ##vso[task.setvariable as part of Log RCA)
  • azure-pipelines/MicrobotsLogAnalyzerTask/index.js: Implements Main Workflow: validates inputs, logs into Azure Service Connection, prepares Python venv, runs LogAnalysisBot, and prints the analysis.
  • azure-pipelines/MicrobotsLogAnalyzerTask/package.json: Declares the Node dependencies required by the task.
  • azure-pipelines/MicrobotsLogAnalyzerTask/package-lock.json: Locks task Node dependency versions for reproducible packaging.
  • docs/azure-pipelines-log-analyzer.md: Documents prerequisites, packaging, publishing, usage, inputs, and task behavior.
  • docs/examples/azure-pipelines/microbots-log-analyzer.yml: Provides a sample ADO YAML for using MicrobotsLogAnalyzer@0.
  • mkdocs.yml: Adds the new Azure Pipelines Log Analyzer guide to the docs navigation.

Added 12 Unit tests:
image

@MadhurAggarwal
Copy link
Copy Markdown
Member Author

Moved From Forked Repo PR: #141

@MadhurAggarwal MadhurAggarwal requested a review from 0xba1a May 19, 2026 10:35
Comment thread docs/azure-pipelines-log-analyzer.md Outdated
## Prerequisites

- Azure DevOps organization where you can install custom extensions.
- Azure Resource Manager Service Connection with permission to request tokens for the Azure OpenAI resource. The pipeline must be authorized to use this service connection.
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.

Add the doc link on how to create a service connection here https://microsoft.github.io/microbots/guides/azure-managed-identity-setup/

Comment thread docs/azure-pipelines-log-analyzer.md Outdated
tfx extension publish --manifest-globs vss-extension.json --token <AZURE_DEVOPS_PAT> --share-with <AZURE_DEVOPS_ORGANIZATION>
```

Update the `publisher` value in `vss-extension.json` before running `tfx extension create`. The task folder must contain `node_modules` when the VSIX is created, so run `npm ci --omit=dev` before packaging.
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.

Update the publisher value to what?

Comment thread docs/azure-pipelines-log-analyzer.md Outdated
| `codebasePath` | Yes | - | Repository or source folder Microbots can inspect while analyzing the log. |
| `logFilePath` | Yes | - | Log file path. Use an absolute path, or a relative path resolved from `codebasePath`. |
| `timeoutSeconds` | No | `600` | Maximum time for `LogAnalysisBot.run()`. |
| `maxIterations` | No | LogAnalysisBot default | Maximum number of Microbots iterations. Leave unset to use the default from `LogAnalysisBot.run()`. |
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.

mention the number of iterations that are default for log analysis bot

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.04%. Comparing base (d41a0a9) to head (87c8f36).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   64.95%   65.04%   +0.08%     
==========================================
  Files          34       34              
  Lines        2374     2380       +6     
==========================================
+ Hits         1542     1548       +6     
  Misses        832      832              
Flag Coverage Δ
integration 37.43% <ø> (+2.93%) ⬆️
ollama_local 32.14% <ø> (-0.09%) ⬇️
slow-browser 26.76% <ø> (-0.07%) ⬇️
slow-other 38.31% <ø> (-0.23%) ⬇️
unit 59.28% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MadhurAggarwal MadhurAggarwal force-pushed the madagg/log-analyzer-ado-task branch from 717c78e to 87c8f36 Compare May 27, 2026 03:03
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