Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 17, 2025

This PR adds comprehensive GitHub Copilot instructions to help developers work effectively in the Azure PowerShell repository. The instructions provide detailed guidance for building, testing, and developing in this complex codebase containing 200+ PowerShell modules.

Architecture Clarification

A key focus of these instructions is properly distinguishing the repository's architecture:

  • Module: A complete PowerShell module (e.g., Az.Compute) that can consist of multiple projects
  • Project: Individual C# project within a module, developed with one approach (SDK-based OR AutoRest)
  • Hybrid Module: Contains both SDK-based and AutoRest projects (e.g., Az.Resources with both approaches)

The development approaches (SDK-based vs AutoRest-based) apply to individual projects within modules, not entire modules themselves, since modules can be hybrid containing both types of projects.

Key Features

Build System Guidance

  • Complete MSBuild command reference with exact timing expectations
  • Critical timing documentation: Full builds take 45-60 minutes, single modules 15-30 minutes
  • "NEVER CANCEL" warnings with specific timeout values to prevent premature build termination
  • Network connectivity requirements for Azure DevOps package feeds

Prerequisites and Setup

  • Exact installation commands for .NET SDK 8+, PowerShell 7+, platyPS, PSScriptAnalyzer
  • Environment setup requirements and execution policy configuration
  • Troubleshooting for common setup issues

Manual Validation Scenarios

The instructions emphasize that building alone is insufficient - developers must manually test functionality:

# Import the built module
Import-Module ./artifacts/Debug/Az.YourModule/Az.YourModule.psd1

# Verify cmdlets work correctly
Get-Command -Module Az.YourModule
Get-Help Your-AzCmdlet -Examples

# Test real scenarios with error handling
Your-AzCmdlet -ResourceGroupName "test-rg"

Repository Structure Explanation

  • Distinction between SDK-based projects and AutoRest-generated projects
  • Development workflows for both project types within modules
  • Key directories and their purposes

Comprehensive Troubleshooting

  • Network connectivity issues with specific domain requirements
  • Build artifact problems and solutions
  • PowerShell module import troubleshooting
  • Common error patterns and workarounds

Timing Expectations

Command Expected Time Timeout Setting
Full repository build 45-60 minutes 90 minutes
Single module build 15-30 minutes 45 minutes
Help generation 10-15 minutes 30 minutes
Static analysis 10-15 minutes 30 minutes

The instructions begin with a firm directive to follow these guidelines first before searching for additional context, ensuring Copilot prioritizes the documented workflows over generic approaches.

Fixes #28401.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copilot AI and others added 2 commits August 17, 2025 10:21
… repository

Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com>
…roubleshooting

Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Generate GitHub Copilot instructions for Azure PowerShell repository Aug 17, 2025
Copilot AI requested a review from isra-fel August 17, 2025 10:29
Copilot finished work on behalf of isra-fel August 17, 2025 10:29
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Can you check my previous PR #28381 and distinguish module vs. project and be clear that the two development modes apply to projects instead of modules because modules can be hybrid.

@isra-fel
Copy link
Member

@copilot Can you check my previous PR #28381 and make sure you distinguish module vs. project in the instructions and be clear that the two development modes apply to projects instead of modules because modules can be hybrid.

…aches

- Correct terminology from "SDK-based modules" to "SDK-based projects"
- Add Architecture Overview section explaining modules vs projects
- Clarify that development approaches apply to projects, not entire modules
- Add explanation of hybrid modules containing both project types
- Update references throughout document for consistency

Co-authored-by: isra-fel <11371776+isra-fel@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 17, 2025

@copilot Can you check my previous PR #28381 and distinguish module vs. project and be clear that the two development modes apply to projects instead of m...

I've updated the instructions to correctly distinguish between modules and projects. The terminology now clarifies that development approaches (SDK-based vs AutoRest-based) apply to individual projects within modules, not entire modules, since modules can be hybrid containing both types of projects. Added an Architecture Overview section explaining this distinction and updated all references throughout the document. See commit eb4147c.

@copilot Can you check my previous PR #28381 and make sure you distinguish module vs. project in the instructions and be clear that the two development m...

I've corrected the terminology throughout the instructions to distinguish modules vs projects. The document now clearly explains that:

  • Module: A complete PowerShell module (e.g., Az.Compute) that can consist of multiple projects
  • Project: Individual C# project within a module, developed with one approach (SDK-based OR AutoRest)
  • Hybrid Module: Contains both SDK-based and AutoRest projects

Updated all sections to refer to "SDK-based projects" and "AutoRest-based projects" instead of modules. See commit eb4147c.

Copilot AI changed the title Generate GitHub Copilot instructions for Azure PowerShell repository Generate GitHub Copilot instructions with clear module vs project architecture Aug 17, 2025
Copilot finished work on behalf of isra-fel August 17, 2025 14:51
Copilot AI requested a review from isra-fel August 17, 2025 14:51
@isra-fel isra-fel marked this pull request as ready for review August 17, 2025 15:13
Copilot AI review requested due to automatic review settings August 17, 2025 15:13
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive GitHub Copilot instructions to help developers work effectively in the Azure PowerShell repository, focusing on the distinction between modules and projects within the complex multi-approach architecture.

  • Provides clear guidance on build system usage with critical timing expectations and "NEVER CANCEL" warnings
  • Establishes manual validation workflows that emphasize testing functionality beyond just building
  • Documents the hybrid architecture where modules can contain both SDK-based and AutoRest-generated projects

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@isra-fel isra-fel enabled auto-merge (squash) August 17, 2025 15:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@isra-fel isra-fel mentioned this pull request Aug 17, 2025
6 tasks
@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel isra-fel merged commit 05d6acf into main Aug 18, 2025
12 checks passed
@NoriZC NoriZC deleted the copilot/fix-28401 branch August 18, 2025 03:13
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.

✨ Set up Copilot instructions

3 participants