Skip to content

[actions] Add Copilot error logs review to CI builder#13735

Open
v-GeorgyPuzakov wants to merge 12 commits intoactions:mainfrom
v-GeorgyPuzakov:copilotoutput
Open

[actions] Add Copilot error logs review to CI builder#13735
v-GeorgyPuzakov wants to merge 12 commits intoactions:mainfrom
v-GeorgyPuzakov:copilotoutput

Conversation

@v-GeorgyPuzakov
Copy link

[Ubuntu] Add Copilot error logs review

Copilot AI review requested due to automatic review settings February 26, 2026 15:30
Copy link
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

This PR adds GitHub Copilot CLI integration to analyze CI provisioner failure logs in Ubuntu build workflows. When a workflow job fails, the system downloads the job logs, extracts relevant provisioner failure sections, and uses the Copilot CLI to generate root cause and suggested fix analysis. The analysis is then displayed in the workflow logs and included in the GitHub Actions step summary.

Changes:

  • Added Copilot CLI-based log analysis functionality to automatically diagnose provisioner failures
  • Extended GitHubApi class with methods to fetch workflow job details and download job logs
  • Modified the Ubuntu/Windows build trigger workflow to install Copilot CLI and configure it for log analysis

Reviewed changes

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

File Description
helpers/WaitWorkflowCompletion.ps1 Added Write-FailedJobLogs function with nested functions for log extraction (Get-ProvisionerWindow) and Copilot analysis (Invoke-CopilotLogAnalysis); integrated into main workflow completion logic to analyze failures
helpers/GitHubApi.psm1 Added GetWorkflowRunJobs, DownloadJobLogs, and ReRunFailedJobs methods to support fetching job details and logs from GitHub Actions API
.github/workflows/trigger-ubuntu-win-build.yml Added Copilot CLI installation and validation steps; configured environment variables for Copilot; extended summary generation to include Copilot analysis output

Comment on lines +90 to +98
- name: Validate Copilot environment
shell: bash
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.MODELS_TOKEN }}
run: |
if [[ -z "$COPILOT_GITHUB_TOKEN" ]]; then
echo "MODELS_TOKEN is empty or unavailable in this run"
exit 1
fi
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The validation step will fail the entire workflow if MODELS_TOKEN is not available, which may not be desirable for all scenarios (e.g., forks or runs where Copilot analysis is optional). Consider whether this should be a hard failure or if the workflow should gracefully skip the Copilot analysis when the token is unavailable. If Copilot is optional, consider using continue-on-error: true for this step.

Copilot uses AI. Check for mistakes.
v-GeorgyPuzakov and others added 6 commits February 26, 2026 21:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@erik-bershel erik-bershel changed the title [Ubuntu] Add Copilot error logs review [actions] Add Copilot error logs review to CI builder Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants