Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Assess and upgrade Azure workloads between plans, tiers, or SKUs with automated migration steps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/languages/java/templates/PLAN_TEMPLATE.md
1<!--2This is the upgrade plan template for Azure SDK migration.3RUN_ID should be replaced with the actual run identifier.45## PLANNING RULES67!!! DON'T REMOVE THIS COMMENT BLOCK BEFORE FINAL PLAN IS GENERATED AS IT CONTAINS IMPORTANT INSTRUCTIONS.89### Strategy10- **Incremental upgrades**: Stepwise dependency upgrades to avoid large jumps breaking builds11- **Minimal changes**: Only upgrade dependencies essential for compatibility12- **Risk-first**: Handle EOL/challenging deps early in isolated steps13- **Necessary/Meaningful steps only**: Each step MUST change code/config. NO steps for pure analysis/validation. Merge small related changes.1415### Mandatory Steps16- **Step 1 (MANDATORY)**: Setup Baseline - Run compile/test with current JDK, document results.17- **Steps 2-N**: Upgrade steps - dependency order, high-risk early, isolated breaking changes18- **Final step (MANDATORY)**: Final Validation - verify all goals met, all TODOs resolved, 100% tests pass1920### Verification Expectations21- **Steps 1-N (Setup/Upgrade)**: Focus on COMPILATION SUCCESS. Tests may fail during intermediate steps.22- **Final Validation**: COMPILATION SUCCESS + 100% TEST PASS2324### Efficiency (IMPORTANT)25- **Targeted reads**: Use `grep` over full file reads; read specific sections, not entire files. Template files are large - only read the sections you need.26- **Quiet commands**: Use `-q`, `--quiet` for build/test commands when appropriate27- **Progressive writes**: Update plan.md incrementally, not at end28-->2930# Upgrade Plan: <PROJECT_NAME> (<RUN_ID>)3132- **Generated**: <datetime> <!-- replace with actual date and time when generating -->33- **HEAD Branch**: <current_branch> <!-- replace with actual head branch when generating -->34- **HEAD Commit ID**: <current_commit_id> <!-- replace with actual head commit id when generating -->3536## Available Tools3738<!--39List ONLY the JDKs and build tools that are required/used during the upgrade (not all discovered ones).40Use the environment detection results from Precheck to check availability.41Mark build tools that need upgrading for JDK compatibility as "**<TO_BE_UPGRADED>**".42If a wrapper (mvnw/gradlew) is present, also check the wrapper-defined version in43`.mvn/wrapper/maven-wrapper.properties` or `gradle/wrapper/gradle-wrapper.properties`.4445NOTE: This section is finalized during Upgrade Path Design (after step sequence is known), not during Environment Analysis.4647SAMPLE:48**JDKs**49- JDK 1.8.0: /path/to/jdk-8 (current project JDK, used by step 1)5051**Build Tools**52- Maven 3.9.6: /path/to/maven53- Maven Wrapper: 3.8.1 → **<TO_BE_UPGRADED>** to 3.9.6+ (current version incompatible with project requirements)54-->5556## Guidelines5758<!--59User-specified guidelines or constraints in bullet points for this upgrade.60Extract these from the user's prompt if provided, or leave empty if none specified.61These guidelines take precedence over default upgrade strategies.62-->6364> Note: You can add any specific guidelines or constraints for the upgrade process here if needed, bullet points are preferred. <!-- this note is for users, NEVER remove it -->6566## Upgrade Goals6768<!--69The primary goal is to replace all legacy Azure SDK dependencies (com.microsoft.azure.*) with their70modern equivalents (com.azure.*). List any additional user-specified goals below.7172SAMPLE:73- Replace all `com.microsoft.azure.*` dependencies with `com.azure.*` equivalents74- Migrate source code to use modern Azure SDK APIs (builder pattern, Azure Identity)75-->7677### Technology Stack7879<!--80Table of core dependencies and their compatibility with upgrade goals.81IMPORTANT: Analyze ALL modules in multi-module projects, not just the root module.82Only include: direct dependencies + those critical for upgrade compatibility.8384Columns:85- Technology/Dependency: Name of the dependency86- Current: Version currently in use87- Modern Equivalent: The com.azure.* replacement (or N/A if not an Azure SDK dep)88- Migration Notes: Notes on migration approach8990IMPORTANT: Include build tools (Maven/Gradle), wrappers, and key build plugins in this table.9192SAMPLE:93| Technology/Dependency | Current | Modern Equivalent | Migration Notes |94| ---------------------------------------- | ------- | ------------------------------------------ | -------------------------------------------- |95| com.microsoft.azure:azure-mgmt-resources | 1.41.4 | com.azure.resourcemanager:azure-resourcemanager | Use azure-sdk-bom for version management |96| com.microsoft.azure:azure-mgmt-storage | 1.41.4 | com.azure.resourcemanager:azure-resourcemanager | Included in azure-resourcemanager |97| com.microsoft.azure:azure-client-authentication | 1.7.14 | com.azure:azure-identity | Use ClientSecretCredential or DefaultAzureCredential |98| Maven (wrapper) | 3.6.3 | - | Check compatibility with project JDK |99-->100101| Technology/Dependency | Current | Modern Equivalent | Migration Notes |102| --------------------- | ------- | ----------------- | --------------- |103104### Derived Upgrades105106<!--107Required upgrades inferred from the Azure SDK migration.108Each derived upgrade must have a justification explaining WHY it's required.109Common derivations:110- Legacy auth (azure-client-authentication) → azure-identity111- Legacy management (azure-mgmt-*) → azure-resourcemanager or specific azure-resourcemanager-* modules112- Legacy data plane SDKs → modern com.azure equivalents113- Add azure-sdk-bom for version management114115SAMPLE:116- Add azure-sdk-bom for centralized version management of com.azure.* dependencies117- Replace azure-client-authentication with azure-identity (modern authentication library)118- Add jackson-databind if file-based authentication is used and Jackson is not already present119-->120121## Upgrade Steps122123<!--124Step-by-step upgrade plan. Each step should follow this format:125- **Step N: <Descriptive Title>**126- **Rationale**: Why this step is needed and why at this position127- **Changes to Make**: ≤5 bullet points (concise)128- **Verification**: Command, JDK, Expected Result129130VERIFICATION EXPECTATIONS:131- Steps 1-N (Setup and Upgrade steps): Focus on COMPILATION SUCCESS. Tests may fail during intermediate steps.132- Final step: COMPILATION SUCCESS + TEST PASS through iterative fix loop.133134MANDATORY FIRST STEP:135The first step MUST always be Setup Baseline.136137MANDATORY SETUP BASELINE STEP SAMPLE:138139- Step 1: Setup Baseline140- **Rationale**: Establish pre-upgrade compile and test results to measure upgrade success against.141- **Changes to Make**:142- [ ] Run baseline compilation with current JDK143- [ ] Run baseline tests with current JDK144- **Verification**:145- Command: `mvn clean compile test-compile -q && mvn clean test -q`146- JDK: <current project JDK path>147- Expected: Document SUCCESS/FAILURE, test pass rate (forms acceptance criteria)148149---150151SAMPLE STEP (dependency migration):152153- Step N: Migrate Azure Management Dependencies154- **Rationale**: Replace legacy com.microsoft.azure management dependencies with modern com.azure.resourcemanager equivalents.155- **Changes to Make**:156- [ ] Add azure-sdk-bom to dependencyManagement157- [ ] Replace com.microsoft.azure:azure-mgmt-* with com.azure.resourcemanager:azure-resourcemanager158- [ ] Remove com.microsoft.azure:azure-client-authentication, add com.azure:azure-identity159- [ ] Fix compilation errors from API changes160- **Verification**:161- Command: `mvn clean test-compile -q`162- JDK: <JDK path>163- Expected: Compilation SUCCESS (tests may fail - will be fixed in Final Validation)164165---166167MANDATORY FINAL STEP (must always be the last step):168169- Step N: Final Validation170- **Rationale**: Verify all upgrade goals met, project compiles successfully, all tests pass.171- **Changes to Make**:172- [ ] Verify no legacy com.microsoft.azure.* dependencies remain173- [ ] Resolve ALL TODOs and temporary workarounds from previous steps174- [ ] Clean rebuild with current JDK175- [ ] Fix any remaining compilation errors176- [ ] Run full test suite and fix ALL test failures (iterative fix loop until 100% pass)177- **Verification**:178- Command: `mvn clean test -q`179- JDK: <JDK path>180- Expected: Compilation SUCCESS + 100% tests pass181-->182183## Key Challenges184185<!--186Document high-risk areas that require special attention during upgrade.187Each challenge should have a mitigation strategy. Be concise.188Common challenges for Azure SDK migration:189- Authentication pattern changes (file-based auth, service principal)190- API surface changes (fluent builder patterns differ between legacy and modern)191- Async/reactive pattern differences192- Package structure changes (com.microsoft.azure.management.* → com.azure.resourcemanager.*)193194SAMPLE:195- **Authentication Migration**196- **Challenge**: Legacy code uses file-based authentication via Azure.authenticate(credentialFile). Modern SDK requires explicit credential construction.197- **Strategy**: Read credential file with Jackson ObjectMapper, construct ClientSecretCredential, use AzureProfile for subscription context.198- **Fluent API Changes**199- **Challenge**: Method names and builder patterns differ between legacy and modern Azure Resource Manager.200- **Strategy**: Follow the migration guide at https://aka.ms/java-track2-migration-guide for method-level mappings.201-->202