microsoft / microsoft/GitHub-Copilot-for-Azure

Integration test failure: azure-cloud-migrate – lambda-refarch-webapp migration output directory [Assertion mismatch]

Open
#2,246 3 comments 0 reactions 1 assignee Claimed by @JasonYeMSFT 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: `lambda-refarch-webapp`)

## Summary

**Run:** [Integration Tests - all #229](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/25734809078)
**Test:** `azure-cloud-migrate_ - Integration Tests › migrates lambda-refarch-webapp to Azure`
**Result:** Fail
**Duration:** 745s

## Root Cause Category

**Assertion mismatch**

## Diagnosis

### What was expected
The test clones `lambda-refarch-webapp`, runs the migration, then calls `findAzureOutputDir` which looks for a directory ending in `-azure` at the workspace root (e.g. `/tmp/skill-test-FupByH-azure`). It then calls `expectFiles` asserting that migration output files exist in that directory.

### What actually happened
The test threw `ENOENT: no such file or directory, scandir '/tmp/skill-test-FupByH-azure'`. The `-azure` output directory was not found at the workspace root, even though the skill performed a functionally successful migration (generating migrated source, Bicep infrastructure, `azure.yaml`, and a deployment plan).

### Why it failed
The `findAzureOutputDir` helper scans for a directory matching the `*-azure` suffix at the workspace root. For the `lambda-refarch-webapp` repo, the skill writes migration output to a nested or differently-named path rather than the sibling `{workspace-root}-azure` directory the test expects.

### Related issues
This is the same root-cause pattern as #1977 (serverless-face-blur-service) and #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` output directory for the lambda-refarch-webapp migration path
- Alternatively, update `findAzureOutputDir` to detect nested output directories

## azure-cloud-migrate Skill Invocation

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

## Skill Report Context

**Test:** `migrates lambda-refarch-webapp to Azure` (End-to-End)
**Pass Rate:** 0% (JUnit FAILED — ENOENT on output dir scan)
**Avg Confidence:** 85%

The skill was correctly invoked. The agent produced a complete migration assessment report, migrated Node.js source, Bicep infrastructure definition, `azure.yaml` for azd, and a deployment plan. However the migration output was written to a path other than the sibling `-azure` directory the test harness expects, causing `findAzureOutputDir` to throw ENOENT.

## Environment

- **Runner OS:** ubuntu-latest
- **Model:** claude-sonnet-4.6
- **Run URL:** https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/25734809078
- **Commit:** `d302c2cadb021c68189f6f28cc01fbc96c4fc115`
- **Skill Invocation Rate:** 83.3% (5/6) | Test Pass Rate: 87.5% (7/8) | Avg Confidence: 84%

> Generated by [Analyze Test Run](https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/25747146413/agentic_workflow) · ● 1.6M · [◷](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.