Skip to content

Commit a24f3ce

Browse files
author
tadelesh
committed
Merge remote-tracking branch 'origin/main' into sdkauto/sdk-resourcemanager-computeschedule/armcomputeschedule-6023330
2 parents 67a00be + d0bf17d commit a24f3ce

1,734 files changed

Lines changed: 98860 additions & 83393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
/sdk/security/keyvault/ @Azure/azure-sdk-write-keyvault
7777

7878
# ServiceLabel: %KeyVault
79-
# ServiceOwners: @Azure/azure-sdk-write-keyvault @chen-karen
79+
# ServiceOwners: @Azure/azure-sdk-write-keyvault
8080

8181
# PRLabel: %Monitor
8282
/sdk/monitor/ @Azure/azure-sdk-write-monitor-data-plane @Azure/azure-sdk-write-monitor-query-logs @chlowell @gracewilcox @jhendrixMSFT

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
You are an expert Go programmer that attempts to answer questions and provide code suggestions. If an answer is longer than a couple of sentences, provide a link to the reference document and a short summary of the answer.
22

3+
- For comprehensive agent guidance, see [AGENTS.md](https://github.com/Azure/azure-sdk-for-go/blob/main/AGENTS.md) which describes repository purpose, workflows, and best practices for AI agents.
34
- Documents related to setting up your machine for development, deprecating libraries, and writing tests can be found here: https://github.com/Azure/azure-sdk-for-go/tree/main/documentation.
45
- To contact a member of the Go team use the "Language - Go" Teams channel, under the "Azure SDK" team.
56
- To determine who owns a module, use the [CODEOWNERS file](https://github.com/Azure/azure-sdk-for-go/tree/main/.github/CODEOWNERS), and find the line that matches the module path. It's possible, due to wildcards, that the line that matches will only have the parent folder, instead of the entire module name.

.github/hooks/hooks.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"type": "command",
6+
"command": "pwsh eng/common/scripts/azsdk_tool_telemetry.ps1",
7+
"timeoutSec": 5
8+
}
9+
]
10+
}
11+
}

.github/workflows/post-apiview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
post-apiview:
1313
name: After APIView
14-
runs-on: ["self-hosted", "1ES.Pool=azsdk-pool-github-runners"]
14+
runs-on: ["self-hosted", "1ES.Pool=azsdk-pool-github-runners", "JobId=azsdk-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"]
1515
if: |
1616
toJson(github.event.check_run.pull_requests) != '[]' &&
1717
github.event.check_run.check_suite.app.name == 'Azure Pipelines' && (

AGENTS.md

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# AGENTS.md
2+
3+
This file provides guidance for AI agents (e.g., GitHub Copilot, MCP, or LLM-based assistants) interacting with the Azure SDK for Go repository.
4+
5+
## Repository Overview
6+
7+
For a comprehensive overview of this repository, see the [README.md](https://github.com/Azure/azure-sdk-for-go/blob/main/README.md).
8+
9+
### Key Documentation
10+
- [Main README](https://github.com/Azure/azure-sdk-for-go/blob/main/README.md) - Getting started, package information, and repository structure
11+
- [Contributing Guide](https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md) - Contribution guidelines and PR requirements
12+
- [Developer Setup](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/setup.md) - Environment setup for SDK development
13+
- [Release Documentation](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/release.md) - Package release process
14+
- [Copilot Instructions](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/copilot-instructions.md) - Copilot-specific guidance
15+
16+
### Go Version Support
17+
The SDK is compatible with the two most recent major Go releases, following Go's official [support policy](https://go.dev/doc/devel/release#policy).
18+
19+
## Agent Capabilities and Boundaries
20+
21+
### Supported Actions
22+
23+
AI agents can assist with the following activities:
24+
25+
#### Code Development
26+
- **Reading and understanding code**: Browse SDK packages, understand APIs, and explain functionality
27+
- **Code suggestions**: Propose improvements, bug fixes, or new features following [Azure Go SDK Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html)
28+
- **Testing**: Write or update unit tests using `github.com/stretchr/testify/require`
29+
- **Examples**: Create example code in `example*_test.go` files following the [Go examples guidelines](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/instructions/go-examples.instructions.md)
30+
31+
#### Documentation
32+
- **README updates**: Improve module READMEs and documentation
33+
- **Code comments**: Add or improve GoDoc comments following [documentation style](https://azure.github.io/azure-sdk/golang_introduction.html#documentation-style)
34+
- **CHANGELOG updates**: Document changes in CHANGELOG.md files
35+
36+
#### Issue and PR Management
37+
- **Issue triage**: Review issues, suggest labels, identify duplicates
38+
- **PR review assistance**: Analyze PRs, suggest improvements, check for guideline compliance
39+
- **Question answering**: Help developers with SDK usage questions
40+
41+
### Automation Boundaries
42+
43+
AI agents should **NOT** perform the following actions without human approval:
44+
45+
#### Build and Release
46+
- **Triggering releases**: Only humans should use `CheckPackageReleaseReadiness` and `ReleasePackage` MCP tools
47+
- **Modifying CI/CD pipelines**: Changes to `ci.yml`, Azure Pipelines configurations, or workflow files require careful review
48+
- **Approving releases**: Release stage approvals in pipelines must be done by authorized humans
49+
50+
#### Code Generation
51+
- **Regenerating SDK code**: Most packages in `sdk/` are generated from [Azure API specs](https://github.com/Azure/azure-rest-api-specs) using TypeSpec and should not be manually modified
52+
- **TypeSpec changes**: SDK generation from specifications requires specific tools and workflows (see [code generation docs](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/generate.md))
53+
54+
#### Security and Compliance
55+
- **Security issues**: Must be reported privately to <secure@microsoft.com>, not in public issues
56+
- **License changes**: No modifications to licensing without explicit approval
57+
58+
## Key Workflows
59+
60+
### Development Workflow
61+
62+
```bash
63+
# Navigate to the SDK module you want to work with
64+
cd sdk/azcore # or any other module
65+
66+
# Build the module
67+
go build ./...
68+
69+
# Run tests
70+
go test ./...
71+
```
72+
73+
### TypeSpec/Code Generation Workflow
74+
75+
For modules with `tsp-location.yaml`:
76+
77+
```bash
78+
# Install prerequisites
79+
npm install -g @typespec/compiler
80+
npm install -g @azure-tools/typespec-client-generator-cli
81+
82+
# Navigate to the module directory
83+
cd sdk/<service>/<module>
84+
85+
# Regenerate the SDK from TypeSpec
86+
tsp-client update
87+
```
88+
89+
See [TypeSpec location instructions](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/instructions/tsp-location.instructions.md) for details.
90+
91+
### Contributing Workflow
92+
93+
For detailed contribution guidelines, see [CONTRIBUTING.md](https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md).
94+
95+
Key steps:
96+
1. **Fork and clone** the repository
97+
2. **Create a feature branch** from `main`
98+
3. **Make changes** following the [Go SDK Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html)
99+
4. **Add tests** to ensure CI catches future regressions
100+
5. **Update documentation** (README, CHANGELOG, examples)
101+
6. **Run tests locally** to verify changes
102+
7. **Submit a PR** with a descriptive title and reference to related issues
103+
8. **Address review feedback** in additional commits
104+
105+
### PR Review Checklist
106+
107+
For comprehensive PR requirements, see the [Pull Requests section in CONTRIBUTING.md](https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md#pull-requests).
108+
109+
Agents can help verify PRs meet key requirements:
110+
- [ ] Code follows [Go SDK Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html)
111+
- [ ] Tests are added/updated with proper assertions
112+
- [ ] CHANGELOG.md is updated with changes
113+
- [ ] Examples are provided for new APIs
114+
- [ ] All CI checks pass
115+
116+
## SDK-Specific Automation
117+
118+
### Module Structure
119+
120+
Most SDK modules follow this structure:
121+
122+
```
123+
sdk/<service>/<module>/
124+
├── ci.yml # CI/CD pipeline configuration
125+
├── CHANGELOG.md # Version history and changes
126+
├── README.md # Module documentation
127+
├── go.mod # Go module dependencies
128+
├── *_client.go # Client implementation
129+
├── models.go # Data models
130+
├── options.go # Client options
131+
├── responses.go # Response types
132+
├── *_test.go # Unit tests
133+
├── example*_test.go # Example code
134+
└── testdata/ # Test fixtures
135+
```
136+
137+
### Test Conventions
138+
139+
- Use `github.com/stretchr/testify/require` for assertions
140+
- Environment variables for live testing go in `.env` files at module root
141+
- Look for `recording.Getenv()` or `os.Getenv()` calls to find required environment variables
142+
- See [Go tests guidelines](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/instructions/go-tests.instructions.md)
143+
144+
### Go Module Standards
145+
146+
- go.mod should only have direct references to:
147+
- Azure SDK modules (`github.com/Azure/azure-sdk-for-go/sdk/...`)
148+
- `golang.org/x/...` modules
149+
- Exception: `github.com/stretchr/testify` can be an indirect dependency
150+
- See [Go mod standards](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/instructions/go-mod-standards.instructions.md)
151+
152+
### Code Standards
153+
154+
- Acronyms in exported names should be uppercased (e.g., `UserID`, not `UserId`)
155+
- All Go files should have a copyright header
156+
- Error handling should use descriptive messages
157+
- See [Go code guidelines](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/instructions/go-code.instructions.md)
158+
159+
## Communication Channels
160+
161+
### Getting Help
162+
- **Issues**: File issues via [GitHub Issues](https://github.com/Azure/azure-sdk-for-go/issues)
163+
- **Stack Overflow**: Ask questions with tags `azure` and `go`
164+
- **Slack**: Chat in [#Azure SDK channel](https://gophers.slack.com/messages/CA7HK8EEP) on Gophers Slack
165+
- **Teams**: Contact the Go team via "Language - Go" channel under "Azure SDK" team
166+
167+
### Code Ownership
168+
- Use [CODEOWNERS file](https://github.com/Azure/azure-sdk-for-go/blob/main/.github/CODEOWNERS) to find module owners
169+
- Owners may be listed for parent folders due to wildcards
170+
- Service owners handle issues; source owners handle PRs
171+
172+
## Safety and Best Practices
173+
174+
### For AI Agents
175+
176+
1. **Read before writing**: Always review existing code and documentation before suggesting changes
177+
2. **Follow patterns**: Match the style and patterns used in the repository
178+
3. **Test assertions**: Use the same testing patterns as existing tests
179+
4. **Small changes**: Prefer small, focused changes over large refactorings
180+
5. **Explain decisions**: Provide context for why changes are being suggested
181+
6. **Reference guidelines**: Link to relevant guidelines when suggesting changes
182+
7. **Verify compatibility**: Ensure changes don't break backward compatibility without explicit approval
183+
184+
### For Code Reviews
185+
186+
When assisting with code reviews:
187+
188+
1. Check compliance with [Azure Go SDK Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html)
189+
2. Verify tests are comprehensive and use proper assertions
190+
3. Ensure documentation is complete and accurate
191+
4. Check for potential breaking changes
192+
5. Verify CHANGELOG entries describe the changes clearly
193+
6. Look for security concerns or potential issues
194+
195+
### For Testing
196+
197+
When working with tests:
198+
199+
1. Run tests locally before suggesting they're complete
200+
2. Check for required environment variables in `.env` files
201+
3. Use `require` package for assertions, not `assert`
202+
4. Ensure tests are repeatable and don't depend on external state
203+
5. Add error messages to assertions to help debugging
204+
205+
## Additional Resources
206+
207+
### Azure SDK Guidelines
208+
- [Azure Go SDK Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html) - Primary reference for SDK development
209+
- [API Design Guidelines](https://azure.github.io/azure-sdk/golang_introduction.html) - API design principles
210+
211+
### Documentation
212+
- [Developer Setup](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/setup.md) - Machine setup for development
213+
- [Release Guidelines](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/release.md) - Package release process
214+
- [Migration Guide](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/ARM/MIGRATION_GUIDE.md) - Migrating from track 1 to track 2
215+
- [Breaking Changes Guide](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/breaking-changes/sdk-breaking-changes-guide.md) - Handling breaking changes
216+
217+
### Tools and Automation
218+
- [Code Generation](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/generate.md) - SDK generation from specs
219+
- [Engineering System](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/eng_sys.md) - Build and CI/CD systems
220+
221+
## Version History
222+
223+
This AGENTS.md file follows the emerging AGENTS.md standard to provide consistent AI agent guidance across Azure SDK repositories.
224+
225+
**Maintainers**: Azure SDK Go Team

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To get started with a module, see the README.md file located in the module's pro
2222
> Projects are highly encouraged to use the latest version of Go. This ensures your product has all the latest security fixes and is included in [Go's support lifecycle](https://go.dev/doc/devel/release).
2323
2424
> [!WARNING]
25-
> The [root azure-sdk-for-go Go module](https://godoc.org/github.com/Azure/azure-sdk-for-go) which contains subpaths of `/services/**/mgmt/**` (also known as track 1) is [deprecated and no longer recieving support](https://azure.github.io/azure-sdk/releases/deprecated/go.html). See [the migration guide](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/MIGRATION_GUIDE.md) to learn how to migrate to the current version.
25+
> The [root azure-sdk-for-go Go module](https://godoc.org/github.com/Azure/azure-sdk-for-go) which contains subpaths of `/services/**/mgmt/**` (also known as track 1) is [deprecated and no longer receiving support](https://azure.github.io/azure-sdk/releases/deprecated/go.html). See [the migration guide](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/development/ARM/MIGRATION_GUIDE.md) to learn how to migrate to the current version.
2626
2727
## Packages available
2828

@@ -128,6 +128,8 @@ Slack](https://gophers.slack.com/). Sign up
128128

129129
See [CONTRIBUTING.md](https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md).
130130

131+
For AI agents and automated tools, see [AGENTS.md](https://github.com/Azure/azure-sdk-for-go/blob/main/AGENTS.md) for guidance on repository workflows, automation boundaries, and best practices.
132+
131133
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
132134

133135
## Trademarks

eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u
88
High level steps involved:
99
1. Generate SDK locally
1010
2. Build / Compile SDK locally
11-
3. Run package checks
12-
4. Run package tests
13-
5. Update change log, metadata and version
11+
3. Commit generated changes checkpoint
12+
4. Run package checks
13+
5. Run package tests
14+
6. Update changelog, metadata and version
15+
7. Commit final changes checkpoint
1416

1517
---
1618

@@ -21,7 +23,7 @@ High level steps involved:
2123
**Goal**: Ensure the user understands the overall SDK generation and build process before starting.
2224
**Actions**:
2325

24-
- Present the high-level steps involved in generating and building SDK locally:
26+
- **MUST** present the high-level steps involved in generating and building SDK locally:
2527
1. Select target language
2628
2. Verify SDK repository
2729
3. Validate repository path
@@ -30,7 +32,11 @@ High level steps involved:
3032
6. Generate SDK using `azsdk_package_generate_code` MCP tool
3133
7. Identify SDK project path
3234
8. Build/Compile SDK using `azsdk_package_build_code` MCP tool
33-
- Ask the user to confirm readiness to proceed.
35+
9. Commit generated changes checkpoint
36+
10. Run package checks
37+
11. Run package tests
38+
12. Update changelog, metadata and version
39+
13. Commit final changes checkpoint
3440

3541
---
3642

@@ -132,26 +138,58 @@ High level steps involved:
132138

133139
---
134140

135-
### Step 3: Run package validation
141+
### Step 3: Stage checkpoint — Commit generated changes
142+
143+
**Goal**: Prompt the user to commit the changes produced by the generation and build steps before proceeding to validation and testing.
144+
**Actions**:
145+
146+
- **MUST** inform the user that SDK generation and build have completed successfully.
147+
- **MUST** prompt the user to decide if they want to commit the changes now. Do NOT skip this prompt.
148+
- If the user chooses to commit:
149+
- Check if the user is on the `main` branch. If so, prompt: *"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."* Suggest a reasonable default branch name based on the generation context (e.g., `sdk/<service-name>/<package-name>`) and provide the exact `git checkout -b <branch-name>` command for the user to run. Allow the user to provide a preferred branch name instead. Wait for user confirmation before continuing.
150+
- Run `git add <modified-files>` to stage the changed files.
151+
- Prompt the user for a commit message.
152+
- Run `git commit -m "<user-provided-message>"`.
153+
- If the user chooses to skip, acknowledge and proceed to the next step.
154+
155+
---
156+
157+
### Step 4: Run package checks
136158

137159
**Actions**:
138160

139161
- Run `azsdk_package_run_check` MCP tool to validate the generated SDK package in the identified project directory.
140162

141163
---
142164

143-
### Step 4: Run package tests
165+
### Step 5: Run package tests
144166

145167
**Actions**:
146168

147169
- Run `azsdk_package_run_tests` MCP tool to run tests on the generated SDK package in the identified project directory.
148170

149171
---
150172

151-
### Step 5: Update change log, metadata and version
173+
### Step 6: Update changelog, metadata and version
152174

153175
**Actions**:
154176

177+
- Run `azsdk_package_update_changelog_content` MCP tool to update changelog in the identified project directory.
155178
- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory.
156-
- Run `azsdk_package_update_changelog_content` MCP tool to update change log in the identified project directory.
157-
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.
179+
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.
180+
181+
---
182+
183+
### Step 7: Stage checkpoint — Commit final changes
184+
185+
**Goal**: Prompt the user to commit the final set of changes after all updates are complete.
186+
**Actions**:
187+
188+
- **MUST** inform the user that changelog, metadata, and version updates are complete.
189+
- **MUST** prompt the user to decide if they want to commit the changes now. Do NOT skip this prompt.
190+
- If the user chooses to commit:
191+
- Check if the user is on the `main` branch. If so, prompt: *"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."* Suggest a reasonable default branch name based on the generation context (e.g., `sdk/<service-name>/<package-name>`) and provide the exact `git checkout -b <branch-name>` command for the user to run. Allow the user to provide a preferred branch name instead. Wait for user confirmation before continuing.
192+
- Run `git add <modified-files>` to stage the changed files.
193+
- Prompt the user for a commit message.
194+
- Run `git commit -m "<user-provided-message>"`.
195+
- If the user chooses to skip, acknowledge and proceed.

0 commit comments

Comments
 (0)