AI & Copilot: Modernizing Applications for the Cloud

By GitHub

Share:

Key Concepts

  • GitHub Copilot App Modernization Tool: An extension for JetBrains IDEs (IntelliJ) and VS Code that leverages AI to assist in application modernization and migration.
  • Model Context Protocol (MCP): A protocol that enables GitHub Copilot to interact with external tools and context, bringing them directly into the IDE.
  • Agent Mode: A feature of GitHub Copilot that allows it to operate more autonomously, taking on tasks and seeking confirmation for actions.
  • Application Modernization: The process of updating or re-architecting existing applications to improve performance, scalability, security, and maintainability, often involving language version upgrades, framework updates, and cloud migration.
  • Tech Debt: The implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer.
  • CVE (Common Vulnerabilities and Exposures): A dictionary of publicly known information security vulnerabilities.
  • Containerization: The process of packaging an application and its dependencies into a container, ensuring it runs consistently across different environments.
  • CI/CD (Continuous Integration/Continuous Deployment): Practices that enable development teams to deliver code more frequently and reliably.
  • Human-in-the-Loop: A framework where AI assists humans, but humans retain oversight and control over critical decisions and actions.
  • MCP Elicitation: A feature where Copilot guides users through structured dialogues to gather information for tasks like configuration or troubleshooting.
  • MCP Prompts: Predefined commands or actions that can be accessed and executed within Copilot via a slash command.
  • MCP Servers: External services that provide resources or functionality to Copilot, such as file system access or specific tool integrations.

GitHub Copilot App Modernization Tool: Features and Capabilities

This section details the new capabilities of GitHub Copilot within JetBrains IDEs, focusing on its integration with the Model Context Protocol (MCP) to bring external tools and context directly into the IDE.

Agent Mode with MCP Support

Agent mode enhances GitHub Copilot's autonomy. It can now understand and utilize the GitHub MCP server to respond to queries about open issues in a repository.

  • Autonomous Issue Implementation: Users can ask Copilot to implement a specific issue. Copilot then outlines its steps, including reading files, planning work, and generating output.
  • Terminal Command Confirmation: Copilot will request confirmation before running terminal commands for building and validating outputs.
  • Error Resolution: If errors occur, Copilot can automatically continue working to resolve them.
  • Iterative Refinement: Users can review changes, iterate on the output with further prompts, and accept them once satisfied.

MCP Enhancements

  • Sampling: Users can configure which models Copilot is allowed to use at both global and server levels through the settings menu (Model Context Protocol). This allows for calling tools with preferred models and viewing results directly in the chat window.
  • MCP Prompts: By typing a slash (/), users can browse and select prompts from installed MCP servers. Arguments for these prompts can be filled in via pop-ups. Resources like files or images needed by prompts are automatically added as references.
  • Leveraging MCP Servers for Context: Users can add context from MCP servers, including file system servers. The @mention feature allows for selecting specific configuration files or patterns directly.

MCP Elicitation

This feature enables Copilot to guide users through structured dialogue flows for tasks like configuration or troubleshooting.

  • Guided Dialogue: Copilot asks targeted questions, and the conversation history persists even after restarting the IDE.
  • Real-World Applications: This is particularly powerful for configuration wizards, requirement gathering, and guided troubleshooting where Copilot proactively seeks necessary information.

The Challenge of Application Modernization

The discussion highlights the persistent challenge of application modernization and upgrading technologies, emphasizing that it's a difficult task, even for large organizations.

The Louvre Heist Analogy

A compelling anecdote about the Louvre heist illustrates the severity of tech debt. The museum was reportedly running on Windows XP and Windows 2000, with over 20 years of accumulated tech debt, proprietary applications, and outdated security infrastructure, including weak passwords. This highlights that even major institutions struggle with modernization.

Three Aspects of Application Migration and Modernization

  1. Streamline Data: Make data usable for AI.
  2. Modernize Applications: Build and iterate quickly through a full overhaul of workflows.
  3. Simplify Operations: Improve operational efficiency.

AI as a "Smart Two-Year-Old"

A key perspective presented is that AI, while powerful, is not yet super-intelligent. It's likened to a "really smart two-year-old" that needs clear direction to avoid going down incorrect paths. This underscores the importance of a structured workflow and human oversight.

The GitHub Copilot App Modernization Tool in Action

The core of the presentation focuses on how the GitHub Copilot App Modernization Tool addresses the friction points in application modernization.

Traditional Modernization Workflow vs. Copilot's Approach

Traditional Workflow:

  1. Portfolio analysis and assessment.
  2. Opening issues on GitHub.
  3. Developers manually taking action on issues.

Copilot's Workflow (when working on an issue or project needing migration/upgrade):

  1. Assess Application: Understand the existing codebase.
  2. Identify Upgrade Needs: Determine what needs upgrading (frameworks, language versions).
  3. Migrate: Perform the necessary migrations.
  4. Run CVE Validation Tests: Check for security vulnerabilities.
  5. Build Project: Ensure the project compiles successfully.
  6. Write Unit Tests: Automatically generate tests for new or refactored code.
  7. Containerize: Package the application for deployment.
  8. Deploy: Make the application accessible.

This process is designed to be iterative and human-like, with the AI handling the heavy lifting.

Real-World Case Studies and Data

Several examples demonstrate the tool's effectiveness:

  • Ford China: Collaborated with Microsoft China on Azure Java migration, reducing work by up to 70% using Copilot app modernization and agent mode.
  • Telecommunications Company (China): Used the tool for Java project upgrades, reducing development resource investment and mitigating security risks from Java version end-of-life (EOS).
  • Microsoft Discovery and Quantum Team: Upgraded Java Spring framework and dependencies, increasing development efficiency by over 80% through automatic detection of deprecated properties, remediation suggestions, and vulnerability fixes.
  • General Motors (GM): Claimed to make 1,300 file changes in three hours.
  • Other Users: Toyota, Verizon, Shein, and Capgemini are also mentioned as users.

Demonstration: Upgrading a Java 8 Asset Manager Project

A live demonstration showcases the tool's capabilities using an old asset manager project (Java 8, AWS).

  1. IDE Integration: The tool appears as a plugin in IntelliJ (also available for VS Code for Java and Visual Studio for .NET).
  2. Run Assessment: The tool performs an initial scan of the application, which can take 5-10 minutes. This assessment identifies issues and provides an "Assessment Report" or "Mission Control."
  3. Assessment Report Breakdown:
    • Identifies Java version (e.g., Java 8).
    • Summarizes issues (e.g., Java upgrade, cloud readiness) categorized as mandatory, potential, or optional.
    • Indicates the percentage of issues resolvable by Microsoft-provided solutions.
    • Allows for custom solutions based on past manually migrated projects.
  4. Java Version Upgrade Task:
    • The user selects the "Upgrade Java version" task.
    • Copilot generates a step-by-step plan for the upgrade.
    • Users can interject to modify the plan (e.g., change target Java version).
    • The tool uses underlying technologies like OpenRewrite for the upgrade.
    • Configuration for Auto-Approval: Users can configure auto-approve rules in settings (Tools > GitHub Copilot > Chat) to streamline the process, but with a strong caution to use this responsibly.
  5. CVE Validation and Fixes: After the upgrade, the tool validates and attempts to fix CVE issues. Critical issues may require manual intervention.
  6. Migration Use Case (Database to Public Cloud):
    • The user selects a potential migration task, such as migrating a database to the public cloud.
    • Copilot generates a migration plan, including a list of files to be changed, configuration files, and a phased approach.
    • The tool can generate architecture diagrams and data flow visualizations (though rendering issues were noted during the demo).
    • Users can review and adjust the plan, specifying different services or configurations.
    • The tool handles environment setup, containerization, and deployment.
  7. Deployment to Azure:
    • The tool offers predefined deployment tasks: "Deploy to existing Azure infrastructure" and "Provision infrastructure and deploy to Azure."
    • For a new project, "Provision infrastructure and deploy to Azure" is selected.
    • Copilot uses Azure CLI tools and generates Bicep files for infrastructure configuration.
    • The process includes scanning the project, creating an architecture diagram, and deploying the application.
  8. End Result: A fully migrated and deployed application (e.g., asset manager) running on Azure with an upgraded Java version. While not always perfect, the tool significantly reduces manual effort and accelerates the modernization process.

Key Considerations and Disclaimers

  • AI as a Tool, Not a Replacement: The tool is described as an "intelligent two-year-old" or "snarky teenager" that requires guidance and oversight. It's a powerful assistant, not a fully autonomous solution for complex, multi-language projects.
  • Chunking Projects: For large or complex projects, it's recommended to break them down into logical chunks for the tool to process effectively.
  • Language Support: Currently supports .NET and Java. TypeScript and Python are planned for future releases.
  • Responsible Use: Users are strongly advised to use auto-approval features cautiously and to remain involved in the process to ensure accuracy and prevent unintended consequences.
  • Hallucinations: AI can still "hallucinate" or go down incorrect paths, necessitating human review and intervention.
  • Iterative Process: The tool is designed to iterate and attempt to resolve issues, similar to a human developer.

Future Developments and Community Engagement

  • Upcoming Languages: TypeScript and Python support are in development.
  • Community Feedback: GitHub actively encourages users to provide feedback on Reddit and other channels to help shape the future development of Copilot and its tools.
  • GitHub Universe Keynote: Announcements regarding Copilot and its capabilities are expected at upcoming events like Microsoft Ignite.

Conclusion

The GitHub Copilot App Modernization Tool, powered by MCP and Agent Mode, represents a significant advancement in AI-assisted software development. It streamlines complex tasks like application modernization, Java version upgrades, and cloud migration, reducing development effort and mitigating security risks. While not a fully autonomous solution, its ability to integrate external context, guide users through structured processes, and automate repetitive tasks makes it an invaluable asset for developers facing the challenges of modernizing legacy applications. The emphasis on human-in-the-loop control ensures that developers remain in charge, leveraging AI as a powerful co-pilot in their development journey.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "AI & Copilot: Modernizing Applications for the Cloud". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video