Skip to content

Refresh GHCP App Modernization MicroHack: CLI-first, no-fork, live-tested - #602

Merged
Marco Weber (qxsch) merged 1 commit into
microsoft:mainfrom
heisenberg-alt:ghcpappmod-cli-first-refresh
Nov 5, 2026
Merged

Marco Weber (qxsch) merged 1 commit into
microsoft:mainfrom
heisenberg-alt:ghcpappmod-cli-first-refresh

Conversation

@heisenberg-alt

Copy link
Copy Markdown
Contributor

What changed

This refreshes the GHCP App Modernization MicroHack (03-Azure/01-01-App Innovation/03_GHCPAppModernization) end to end, driven by live-run coach feedback and a full hands-on test of all three challenges with the real tooling.

Challenge 1 — Fundamentals

  • Rewritten CLI-first: custom agents (.github/agents/), skills (.github/skills/), and MCP (.github/mcp.json) are authored in the target repo and verified with GitHub Copilot CLI (/agent, /skills list, /mcp list); VS Code remains as an aside. The previous success criterion (confirming appmod-* tools from the VS Code extensions) was unmeetable in the recommended Codespace, which doesn't install those extensions.
  • New hands-on finale: a modernize plan create skill-detection dry-run, proving the authored skill is picked up ("location": "project" in the plan's tasks.json).

Challenge 2 — Batch upgrade

  • No-fork flow: samples are cloned directly from Azure-Samples onto a local modernize branch (matching the official modernization-agent quickstart); repos.json uses local path entries so the CLI operates on the working copies.
  • Corrected the report location (.github/modernize/assessment/reports-*/), target-version guidance (.NET 10 / OpenJDK 25 on the assess configuration page), realistic timing, and the cloud-agent caveat (cloud delegation requires github.com URLs).

Challenge 3 — Modernize & deploy

  • Rewritten to the documented local flow: batch Plan → Keep the plan local → per-repo execution. This replaces the PR-merge and plan-branch steps, which cannot work with local-path repos and read-only upstreams.
  • Added subscription-Owner RBAC guidance and a Six Labors/ImageSharp Release-build license tip (both hit during live testing).

Lab automation

  • shared-deploy-lab.ps1 registered the nonexistent Microsoft.Apps provider with -ErrorAction Stop, which crashed the whole shared hook — so nothing got registered (the root cause of the "resource providers are not registered" feedback). Fixed to Microsoft.App, added Microsoft.OperationalInsights and Microsoft.ManagedIdentity, and the script now waits for the asynchronous registration to complete.
  • deploymentType switched to resourcegroup-with-subscriptionowner so the modernize CLI can create resource groups during Challenge 3. Removed the empty main.bicep.

Environment setup, templates, cleanup

  • GitHub Copilot CLI installation and sign-in documented (/login device-code flow in Codespaces, env-token precedence pitfalls, /user verification); Codespaces declared the supported environment with local setups best-effort.
  • New Copilot CLI MCP config template (templates/mcp/copilot-cli-mcp.json + README) alongside the VS Code variant; portable agent tool names (read/search/edit/execute); targets bumped to .NET 10 / Java 25 / Spring Boot 4; corrected appmod-cve-assessment tool name; quoted a YAML-breaking skill-name placeholder.
  • 16 orphaned/stale screenshots and a duplicate fundamentals doc removed; stale doc links fixed; finish.md recaps aligned; .gitignore now covers repos/ and .github/modernize/.

Tested end to end (not just rewritten)

All three challenges were executed with the modernize CLI (v1.0.76) against a real Azure subscription:

  • Live batch assessment of both apps (reports under .github/modernize/assessment/reports-*/).
  • Both upgrades executed: PhotoAlbum → .NET 10 (7/7 tests passing, CVE remediation included) and PhotoAlbum-Java → Java 25 / Spring Boot 4.0.9 (incremental 2.7 → 3.5 → 4.0, tests passing at each step; the CLI self-installed Maven when missing).
  • Both Challenge 3 deployments executed: Java → Container Apps + PostgreSQL Flexible Server + Key Vault (managed identity, Oracle→PostgreSQL migration), .NET → Container Apps + Azure SQL + Blob Storage. Both frontends verified reachable (HTTP 200).

Known upstream issues (out of scope for this PR, noted for maintainers)

  • .devcontainer/.../welcome.sh looks for README.md, but this hack ships Readme.md (case mismatch on Linux).
  • Azure-Samples/PhotoAlbum's README contains internal-only instructions and a dead clone URL.
  • The sample repos ship squad-* workflows and example agents that surprise participants (a warning was added to the walkthrough).
  • The .NET AppCAT assessment install can fail on Windows (Value cannot be null (Parameter 'path1')) — a troubleshooting row with the remedy was added.

…sted

Challenges:
- Challenge 1 rewritten around GitHub Copilot CLI and the modernize CLI:
  custom agents, skills, and MCP config are authored in the target repo
  under .github/ and verified from the terminal, ending with a
  skill-detection dry-run via 'modernize plan create'.
- Challenge 2 moved to the no-fork flow: samples are cloned directly from
  Azure-Samples onto a local 'modernize' branch, repos.json uses local
  path entries, and the assessment guidance (report location, target
  versions, timing) is corrected.
- Challenge 3 rewritten to the documented local flow: batch Plan with
  'Keep the plan local' and per-repo execution, replacing the PR-merge
  and plan-branch steps that cannot work with read-only upstreams. Adds
  resource-group guidance and an ImageSharp Release-license tip.

Lab automation:
- Fix the nonexistent Microsoft.Apps provider name that crashed the
  shared hook, add Microsoft.OperationalInsights and
  Microsoft.ManagedIdentity, and wait for the asynchronous registration.
- Switch deploymentType to resourcegroup-with-subscriptionowner so the
  modernize CLI can create resource groups; remove the empty main.bicep.

Environment setup and templates:
- Document GitHub Copilot CLI installation and /login (device-code flow
  in Codespaces, env-token precedence); declare Codespaces the supported
  environment; expand troubleshooting.
- Add a Copilot CLI MCP config template with README, portable agent tool
  names, current targets (.NET 10, Java 25 / Spring Boot 4), and the
  corrected appmod-cve-assessment tool name.

Cleanup: stale links fixed, finish.md recaps aligned, 16 orphaned or
stale screenshots and a duplicate fundamentals copy removed, .gitignore
covers repos/ and .github/modernize/.

Validation: all three challenges executed end to end with the modernize
CLI (v1.0.76) - live batch assessment, both framework upgrades with
passing tests, and both Azure Container Apps deployments verified with
HTTP 200.
@heisenberg-alt

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@qxsch
Marco Weber (qxsch) merged commit dabc7a6 into microsoft:main Nov 5, 2026
2 checks passed
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.

2 participants