Skip to content

Commit 859c8b4

Browse files
Merge branch 'azure-sdk:main' into main
2 parents bd328ea + ef7b4d8 commit 859c8b4

File tree

12,883 files changed

+486915
-274819
lines changed

Some content is hidden

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

12,883 files changed

+486915
-274819
lines changed

.config/1espt/PipelineAutobaseliningConfig.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
2-
1+
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
2+
33
pipelines:
44
'*':
55
mainPipelineId: 1180

.gitattributes

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* text=auto
1+
* text=auto eol=lf
22

33
*.bmp binary
44
*.dll binary
@@ -12,10 +12,12 @@
1212
*.ismv binary
1313
*.isma binary
1414

15-
*.cs text diff=csharp
16-
*.csproj text=auto
17-
*.sln text=auto eol=crlf
18-
*.sh text=auto eol=lf
15+
*.cs text eol=lf diff=csharp
16+
*.csproj text eol=lf
17+
*.sln text eol=lf
18+
*.sh text eol=lf
19+
*.json text eol=lf
20+
*.bicep text eol=lf
1921

2022
# Automatically collapse Track 2 test recordings in github PRs
2123
**/SessionRecords/**/*.json linguist-generated=true

.github/CODEOWNERS

Lines changed: 254 additions & 252 deletions
Large diffs are not rendered by default.

.github/copilot-instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# Project Overview
2+
3+
This repo contains Azure SDKs for various Azure services and tools that generate them.
4+
5+
## Prerequisites
6+
- To use MCP tool calls, PowerShell must be installed. Provide [PowerShell installation instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) if not installed, and recommend restarting the IDE to use the MCP server.
7+
8+
## Folder Structure
9+
10+
- `/eng/packages/http-client-csharp`: Contains the source code of the generator for Azure Data Plane SDKs (aka Azure Generator).
11+
- `/eng/packages/http-client-csharp-mgmt`: Contains the source code of the generator for Azure Management Plane SDKs (aka Azure Management Generator).
12+
- `/sdk`: Contains the individual SDKs for Azure services.
13+
14+
### Azure Generator
15+
16+
- Always run `npm install` in the `/eng/packages/http-client-csharp` directory before running the generator.
17+
- Always run `/eng/packages/http-client-csharp/eng/scripts/Generate.ps1` to regenerate the test projects to validate the result of generator code changes.
18+
19+
### Azure Management Generator
20+
21+
- Always run `npm install` in the `/eng/packages/http-client-csharp-mgmt` directory before running the generator.
22+
- Always run `/eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1` to regenerate the test projects to validate the result of generator code changes.
23+
124
## SDK release
225

326
There are two tools to help with SDK releases:

.github/workflows/copilot-setup-steps.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ jobs:
3636
# Example: Display .NET SDK version
3737
- name: Show .NET SDK version
3838
run: dotnet --version
39+
40+
- name: Install azsdk mcp server
41+
shell: pwsh
42+
run: |
43+
./eng/common/mcp/azure-sdk-mcp.ps1 -InstallDirectory $HOME/bin
44+

.vscode/cspell.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,12 @@
12491249
"unprovisioning"
12501250
]
12511251
},
1252+
{
1253+
"filename": "**/sdk/recoveryservices/**/*.cs",
1254+
"words": [
1255+
"bcdr",
1256+
]
1257+
},
12521258
{
12531259
"filename": "**/sdk/recoveryservices-backup/**/*.cs",
12541260
"words": [
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
namespace Azure.Test.Perf
5+
{
6+
public class OperationResult
7+
{
8+
public double Time { get; set; }
9+
public long Size { get; set; }
10+
}
11+
}

common/Perf/Azure.Test.Perf/PerfOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public class PerfOptions
5454
[Option('x', "test-proxies", Separator = ';', HelpText = "URIs of TestProxy Servers (separated by ';')")]
5555
public IEnumerable<Uri> TestProxies { get; set; }
5656

57+
[Option("results-file", HelpText = "File path location to store the results for the test run.")]
58+
public string ResultsFile { get; set; }
59+
5760
[Option('w', "warmup", Default = 5, HelpText = "Duration of warmup in seconds")]
5861
public int Warmup { get; set; }
5962
}

common/Perf/Azure.Test.Perf/PerfProgram.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System;
88
using System.Collections.Generic;
99
using System.Diagnostics;
10+
using System.IO;
1011
using System.Linq;
1112
using System.Reflection;
1213
using System.Runtime;
@@ -457,6 +458,11 @@ private static async Task RunTestsAsync(IPerfTest[] tests, PerfOptions options,
457458
{
458459
PrintLatencies("Corrected Latency Distribution", _correctedLatencies);
459460
}
461+
462+
if (!string.IsNullOrEmpty(options.ResultsFile))
463+
{
464+
WriteResults(options.ResultsFile, (options as SizeOptions)?.Size ?? -1);
465+
}
460466
}
461467

462468
if (jobStatistics)
@@ -498,6 +504,20 @@ private static void PrintLatencies(string header, IList<IList<TimeSpan>> latenci
498504
Console.WriteLine();
499505
}
500506

507+
private static void WriteResults(string path, long operationSize)
508+
{
509+
var latencies = _latencies.SelectMany(x => x).Select(l => new OperationResult
510+
{
511+
Time = l.TotalMilliseconds,
512+
Size = operationSize,
513+
}).ToArray();
514+
string json = JsonSerializer.Serialize(latencies, options: new JsonSerializerOptions()
515+
{
516+
WriteIndented = true,
517+
});
518+
File.WriteAllText(path, json);
519+
}
520+
501521
private static Thread WritePendingOperations(int rate, CancellationToken token)
502522
{
503523
var thread = new Thread(() =>

doc/DataPlaneCodeGeneration/AzureSDKCodeGeneration_DataPlane_Quickstart.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ Azure SDK Code Generation takes a [TypeSpec](https://microsoft.github.io/typespe
66

77
## Prerequisites
88

9+
The initial library generation should happen as part of the `azure-rest-api-specs` repo PR. Details about this process can be found [here](https://eng.ms/docs/products/azure-developer-experience/develop/sdk-generation-pipelines). To proceed with manual generation, follow the rest of the steps in this doc.
10+
911
For first time to set up of a new SDK package, please verify you have met the prerequisites, including runtime environment, TypeSpec project, and SDK project folder. You can refer to [SDK Generation Prerequisites](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/DataPlaneCodeGeneration/AzureSDKGeneration_Prerequistites.md) to set up.
1012

1113
## Generate SDK
1214

1315
We will generate an SDK under the SDK project folder of `azure-sdk-for-net`.
1416

15-
### Configuration (optional)
17+
### Configuration
1618

1719
You can update `tsp-location.yaml` under sdk project folder to set the typespec project.
1820

19-
You can refer to the [tsp-location.yaml](https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/TypeSpec-Project-Scripts.md#tsp-locationyaml) which describes the supported properties in the file.
21+
You can refer to the [tsp-location.yaml](https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/TypeSpec-Project-Scripts.md#tsp-locationyaml) which describes the supported properties in the file. For new data plane services, you must set the `emitterPackageJsonPath` property in tsp-location.yaml to `eng/azure-typespec-http-client-csharp-emitter-package.json`. An example can be found [here](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/keyvault/Azure.Security.KeyVault.Administration/tsp-location.yaml#L4). You should add the `IncludeAutorestDependency` property and set it to `false` in the corresponding csproj that is generated. An example can be found [here](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj#L14).
2022

2123
### Generate Code
2224

@@ -27,6 +29,18 @@ Run `dotnet build /t:GenerateCode`, and the code will be generated under `sdk\<s
2729
dotnet build /t:GenerateCode
2830
```
2931

32+
#### Run with tracing enabled
33+
```dotnetcli
34+
dotnet build /t:GenerateCode /p:Trace=true -v d
35+
```
36+
37+
#### Run with additional emitter options
38+
Any of the [emitter options](https://github.com/Azure/azure-sdk-for-net/blob/main/eng/packages/http-client-csharp/README.md#emitter-options) can be passed through to the build target
39+
as shown below:
40+
```dotnetcli
41+
dotnet build /t:GenerateCode /p:TypespecAdditionalOptions="debug=true;new-project=true"
42+
```
43+
3044
Now that you have generated your SDK, you can release it by following the following steps:
3145

3246
1. Create a [release plan](https://aka.ms/azsdkdocs/release-plans). It will provide you with a workflow of tasks that you

0 commit comments

Comments
 (0)