Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
liabadi authored Oct 1, 2024
2 parents d882df1 + ad60d7f commit 337561a
Show file tree
Hide file tree
Showing 2,035 changed files with 371,910 additions and 2,946 deletions.
18 changes: 11 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@
# PRLabel: %Web Apps
/specification/web/ @naveedaz @Azure/azure-app-service-control-plane

# PRLabel: %Video Indexer
/specification/vi/ @dazilb @tshoham @omerhaimov @bermanraz @Einav94

# PRLabel: %AzureML - Compute Instance
/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/**/machineLearningServices.json @Azure/aml-compute-instance

Expand All @@ -275,13 +278,14 @@
###########
# Eng Sys
###########
/.gitattributes @weshaggard @mikeharder
/.gitignore @weshaggard @mikeharder
/.prettierrc.json @weshaggard @mikeharder
/package-lock.json @weshaggard @mikeharder
/package.json @weshaggard @mikeharder
/tsconfig.json @weshaggard @mikeharder
/.gitattributes @weshaggard @mikeharder
/.gitignore @weshaggard @mikeharder
/.prettierrc.json @weshaggard @mikeharder
/package-lock.json @weshaggard @mikeharder
/package.json @weshaggard @mikeharder
/tsconfig.json @weshaggard @mikeharder
/.azure-pipelines/ @weshaggard @mikeharder @benbp
/.github/ @weshaggard @mikeharder @benbp
/eng/ @weshaggard @mikeharder @benbp
/scripts/ @weshaggard @mikeharder
/scripts/ @weshaggard @mikeharder
/.github/CODEOWNERS @Azure/azure-sdk-eng
27 changes: 25 additions & 2 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@
"typescript"
],
"overrides": [
{
"filename": "**/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/**/*.json",
"words": [
"azurearcdata"
]
},
{
"filename": "**/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/**/*.json",
"words": [
"SSRS",
"SSAS",
"SSIS",
"PBIRS"
]
},
{
"filename": "**/specification/batch/**/*.json",
"words": [
Expand Down Expand Up @@ -472,9 +487,10 @@
]
},
{
"filename": "**/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/WebApps.json",
"filename": "**/specification/web/resource-manager/Microsoft.Web/stable/**/WebApps.json",
"words": [
"sitecontainers"
"sitecontainers",
"updatemachinekey"
]
},
{
Expand Down Expand Up @@ -1420,6 +1436,13 @@
"sfmc's"
]
},
{
"filename": "**/specification/terraform/resource-manager/Microsoft.AzureTerraform/**/*.json",
"words": [
"azurerm",
"azapi"
]
},
{
"filename": "**/specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/**/*.json",
"words": [
Expand Down
2 changes: 1 addition & 1 deletion documentation/ci-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ If you have an issue or with any of checks listed in the first column of the tab

| Check name | Owner |
|-----------------------------------|----------------|
| `SDK azure-sdk-for-go` | Ray Chen |
| `SDK azure-sdk-for-go` | Chenjie Shi |
| `SDK azure-sdk-for-java` | Weidong Xu |
| `SDK azure-sdk-for-js` | Qiaoqiao Zhang |
| `SDK azure-sdk-for-net` | Wei Hu |
Expand Down
28 changes: 10 additions & 18 deletions documentation/onboard-dpg-in-sdkautomation/.net/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# Add Autorest Configuration of .Net SDK
# Add TypeSpec Configuration of .Net SDK

## Parameter Description
Please copy the following configuration into `tspconfig.yaml` in your spec folder and replace `package-dir` and `namespace` to your own values.

- `<ServiceName>`: The RP name, which is usually same as folder name in swagger.
- `<NameSpace>`: Python package name.
- `<Title>`: SDK Client Name. It's optional if there is a title defined in spec readme.md file.

## Autorest Configuration
Please copy the following configuration into spec PR comment.
~~~
# azure-sdk-for-net-track2
``` yaml
title: <Title>
output-folder: sdk/<ServiceName>/<NameSpace>
require:
- specification/<RPName>/data-plane/readme.md
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.Face"
flavor: azure
namespace: "{package-dir}"
```
~~~
- `title`: If it's already defined in spec readme.md, you don't need to define it here again. (By default, there is no `title` defined in spec readme.md in multi client scenario.)
- `output-folder`: The relative path of destination to generate SDK.
- `require`: The item of the value is the relative path of spec readme.md file.
- `package-dir`: Name of your package directory. It should be several parts concatenated with `.` and all the paerts should be pascal case.
- `flavor`: Always `azure` for Azure SDK.
- `namespace`: Should be the same as `package-dir`.
2 changes: 1 addition & 1 deletion eng/pipelines/codeowners-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stages:
vmImage: ubuntu-22.04

variables:
CodeownersLinterVersion: '1.0.0-dev.20240917.2'
CodeownersLinterVersion: '1.0.0-dev.20240926.2'
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"
TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"
Expand Down
6 changes: 5 additions & 1 deletion eng/scripts/Get-TypeSpec-Folders.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ Set-StrictMode -Version 3
. $PSScriptRoot/ChangedFiles-Functions.ps1

$repoPath = Resolve-Path "$PSScriptRoot/../.."

$checkAllPath = ((Get-ChildItem "specification" -Directory).Name -replace '^', 'specification/') -replace '$', '/'
$checkedAll = $false

if ($CheckAll) {
$changedFiles = $checkAllPath
$checkedAll = $true
}
else {
$changedFiles = @(Get-ChangedFiles -baseCommitish $BaseCommitish -targetCommitish $TargetCommitish -diffFilter "")
Expand All @@ -21,6 +24,7 @@ else {
if ($coreChangedFiles) {
Write-Verbose "Found changes to core eng or root files so checking all specs."
$changedFiles = $checkAllPath
$checkedAll = $true
}
else {
$changedFiles = Get-ChangedFilesUnderSpecification $changedFiles
Expand Down Expand Up @@ -49,4 +53,4 @@ foreach ($skippedTypespecFolder in $skippedTypespecFolders | Select-Object -Uniq

$typespecFolders = $typespecFolders | ForEach-Object { [IO.Path]::GetRelativePath($repoPath, $_) -replace '\\', '/' } | Sort-Object -Unique

return $typespecFolders
return @($typespecFolders, $checkedAll)
4 changes: 2 additions & 2 deletions eng/scripts/TypeSpec-Validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ param (
. $PSScriptRoot/Logging-Functions.ps1
. $PSScriptRoot/Suppressions-Functions.ps1

$typespecFolders = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" -BaseCommitish:$BaseCommitish -TargetCommitish:$TargetCommitish -CheckAll:$CheckAll
$typespecFolders, $checkedAll = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" -BaseCommitish:$BaseCommitish -TargetCommitish:$TargetCommitish -CheckAll:$CheckAll

$typespecFoldersWithFailures = @()
if ($typespecFolders) {
$typespecFolders = $typespecFolders.Split('',[System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($typespecFolder in $typespecFolders) {
LogGroupStart "Validating $typespecFolder"

if ($CheckAll) {
if ($checkedAll) {
$suppression = Get-Suppression "TypeSpecValidationAll" $typespecFolder
if ($suppression) {
$reason = $suppression["reason"] ?? "<no reason specified>"
Expand Down
5 changes: 3 additions & 2 deletions eng/tools/tsp-client-tests/test/tsp-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ const repoRoot = join(__dirname, "..", "..", "..", "..");

async function npmExec(...args: string[]) {
const allArgs = ["exec", "--no", "--"].concat(args);

console.log(`${repoRoot}$ npm ${allArgs.join(" ")}`);

return await execa("npm", allArgs, { all: true, cwd: repoRoot, reject: false });
const result = await execa("npm", allArgs, { all: true, cwd: repoRoot, reject: false });
console.log(result.all);
return result;
}

async function convert(expect: ExpectStatic, readme: string) {
Expand Down
16 changes: 8 additions & 8 deletions eng/tools/typespec-requirement/test/typespec-requirement.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { execa } from 'execa';
import { join } from 'path';
import { test } from 'vitest';
import { execa } from "execa";
import { join } from "path";
import { test } from "vitest";

async function checkAllUnder(path: string, responseCache?: string) {
const repoRoot = join(__dirname, '..', '..', '..', '..');
const script = join('eng', 'scripts', 'TypeSpec-Requirement.ps1');
const repoRoot = join(__dirname, "..", "..", "..", "..");
const script = join("eng", "scripts", "TypeSpec-Requirement.ps1");

let command = `${script} -CheckAllUnder ${join(__dirname, path)}`;
if (responseCache) {
Expand Down Expand Up @@ -52,7 +52,7 @@ test.concurrent("Generated from TypeSpec", async ({ expect }) => {
test.concurrent("Hand-written, exists in main", async ({ expect }) => {
const { stdout, exitCode } = await checkAllUnder(
"specification/hand-written",
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=200}'
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=200}',
);

expect(stdout).toContain("was not generated from TypeSpec");
Expand All @@ -63,7 +63,7 @@ test.concurrent("Hand-written, exists in main", async ({ expect }) => {
test.concurrent("Hand-written, does not exist in main", async ({ expect }) => {
const { stdout, exitCode } = await checkAllUnder(
"specification/hand-written",
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=404}'
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=404}',
);

expect(stdout).toContain("was not generated from TypeSpec");
Expand All @@ -74,7 +74,7 @@ test.concurrent("Hand-written, does not exist in main", async ({ expect }) => {
test.concurrent("Hand-written, unexpected response checking main", async ({ expect }) => {
const { stdout, stderr, exitCode } = await checkAllUnder(
"specification/hand-written",
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=519}'
'@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=519}',
);

expect(stdout).toContain("was not generated from TypeSpec");
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@azure-tools/typespec-autorest": "0.46.0",
"@azure-tools/typespec-azure-core": "0.46.0",
"@azure-tools/typespec-azure-portal-core": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.46.1",
"@azure-tools/typespec-azure-rulesets": "0.46.0",
"@azure-tools/typespec-client-generator-cli": "0.13.0",
"@azure-tools/typespec-client-generator-core": "0.46.0",
Expand Down
1 change: 0 additions & 1 deletion specification/ai/DocumentIntelligence/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-java":
package-dir: "azure-ai-documentintelligence"
namespace: "com.azure.ai.documentintelligence"
Expand Down
1 change: 0 additions & 1 deletion specification/ai/Face/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.Face"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-java":
package-dir: "azure-health-insights-radiologyinsights"
namespace: com.azure.health.insights.radiologyinsights
Expand Down
1 change: 0 additions & 1 deletion specification/ai/ImageAnalysis/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.ImageAnalysis"
namespace: "Azure.AI.Vision.ImageAnalysis"
Expand Down
1 change: 0 additions & 1 deletion specification/apicenter/ApiCenter.DataApi/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "azure.ApiCenter"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"name": "x-ms-github-auxiliary",
"in": "header",
"description": "Github personal access token used for SourceControl.",
"required": true,
"required": false,
"type": "string"
},
{
Expand Down Expand Up @@ -241,7 +241,7 @@
"name": "x-ms-github-auxiliary",
"in": "header",
"description": "Github personal access token used for SourceControl.",
"required": true,
"required": false,
"type": "string"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.Data.AppConfiguration"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "LiveMetrics"
namespace: "{package-dir}"
Expand Down
Loading

0 comments on commit 337561a

Please sign in to comment.