microsoft / microsoft/GitHub-Copilot-for-Azure

Integration test failure: azure-cloud-migrate – serverless face-blur Lambda migration output directory [Assertion mismatch]

Open
#1,977 1 comment 0 reactions 1 assignee Claimed by @MadhuraBharadwaj-MSFT View on GitHub
bug integration-test
Dominant language
Python
Stars
250
Forks
204
Avg merge
1d 12h
Merged PRs (30d)
67

Description

## Prompt

```
Migrate this Lambda to Azure. Use the eastus2 region. Use my current subscription.
```

(Source repo: `serverless-face-blur-service`)

## Summary

**Run:** [Integration Tests - all #176](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/24721935277)
**Test:** `azure-cloud-migrate_ - Integration Tests › brownfield-lambda > migrates serverless-face-blur-service Lambda to Azure`
**Result:** Fail
**Duration:** 336.7s

## Root Cause Category

**Assertion mismatch**

## Diagnosis

### What was expected
The test clones `serverless-face-blur-service`, runs the migration, then calls `findAzureOutputDir` which looks for a directory ending in `-azure` at the workspace root (e.g. `/tmp/skill-test-ZdW6Wx-azure`). It then calls `expectFiles` asserting that `migration-status.md` and `migration-assessment-report.md` exist in that directory.

### What actually happened
The test threw `ENOENT: no such file or directory, scandir '/tmp/skill-test-ZdW6Wx-azure'`. The `-azure` output directory was not found at the workspace root. The skill performed a successful migration (4/4 unit tests passed, 59 npm packages installed, 2,671 lines of code generated), but the output was written to a nested path (`/tmp/skill-test-ZdW6Wx/src-azure/`) rather than the sibling directory the test expects (`/tmp/skill-test-ZdW6Wx-azure`).

### Why it failed
The `findAzureOutputDir` helper scans for a directory matching the `*-azure` suffix at the workspace root. For the `serverless-face-blur-service` repo, the skill writes migration output to `src-azure/` as a subdirectory of the workspace — not a sibling `-azure` directory — causing the path lookup to fail even though migration succeeded functionally.

### Related issue
This is the same root-cause pattern as #1927 (brownfield-lambda-webapp). The `-azure` output directory convention is inconsistently applied across migration scenarios.

### Suggested fix
- Ensure the skill consistently creates a `{workspace-root}-azure` (or `{reponame}-azure`) output directory for the face-blur Lambda migration path
- Alternatively, update `findAzureOutputDir` to handle cases where output is written as a subdirectory (e.g. `src-azure/`) within the workspace

## azure-cloud-migrate Skill Invocation

| Skill | Invoked |
|-------|---------|
| **azure-cloud-migrate** | **Yes** |

## Skill Report Context

Per-test section from SKILL-REPORT.md (click to expand)

**Test:** `brownfield-lambda_migrates_serverless-face-blur-service_Lambda_to_Azure`
**Type:** End-to-End Integration
**Pass Rate:** 100% per agent report (PASSED internally) | JUnit: FAILED
**Avg Confidence:** 95%

**What Happened:**
The skill was correctly invoked. The agent migrated the face-blur Lambda to Azure Functions v4, installed 59 npm packages (0 vulnerabilities), ran local unit tests (4/4 passed), and generated 2,671 lines of production-ready code. Azure infrastructure was pre-configured. The migration output was written to `src-azure/` inside the workspace, not to the `-azure` sibling directory the test harness expects.

**❌ What Went Wrong (per JUnit):**
`ENOENT: no such file or directory, scandir '/tmp/skill-test-ZdW6Wx-azure'` — the `findAzureOutputDir` helper could not locate the `-azure` output directory at the workspace root.

## Environment

- **Runner OS:** ubuntu-latest
- **Model:** claude-sonnet-4.5
- **Run URL:** https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/24721935277
- **Commit:** `21aedb8d6699465050abf56eb68cd8a2fd13ca4d`
- **Skill Report:** Skill Invocation Rate: N/A | Test Pass Rate: 100% (per report) | Avg Confidence: 90%

> Generated by [Analyze Test Run](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/24730438080)

> Generated by [Analyze Test Run](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/24730438080/agentic_workflow) · ● 3.1M · [◷](https://github.com/search?q=repo%3Amicrosoft%2FGitHub-Copilot-for-Azure+is%3Aissue+%22gh-aw-workflow-call-id%3A+microsoft%2FGitHub-Copilot-for-Azure%2Fanalyze-test-run%22&type=issues)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.