Skip to content

Commit

Permalink
Merge branch 'main' into lijiaq-hybridcompute-Microsoft.HybridCompute…
Browse files Browse the repository at this point in the history
…-2024-11-10-preview
  • Loading branch information
jiaqi-beep authored Nov 15, 2024
2 parents ea74790 + fb64eaa commit 0c8cdeb
Show file tree
Hide file tree
Showing 13 changed files with 408 additions and 291 deletions.
4 changes: 2 additions & 2 deletions eng/scripts/Copy-ApiVersion-Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Get-ReadmeWithNewTag($readmeContent, $tagContent) {

function Get-ReadmeWithLatestTag($readmeContent, $newApiVersion, $newApiVersionStatus ) {
# Get the current tag date
$currentTag = $readmeContent -match '(?m)^(tag:\s*)(package-)(.*)(?<apiVersion>(?<date>\d{4}-\d{2}-\d{2})|(?<version>\d+\.\d+))'
$currentTag = $readmeContent -match '(?m)^(tag:\s*)(package-)(.*)(?<apiVersion>(?<date>\d{4}-\d{2}(-\d{2})?)|(?<version>\d+\.\d+))'
if ($currentTag = $Matches['date']) {
$latestVersionDate = [datetime]($currentTag -replace '-preview', '')

Expand All @@ -54,7 +54,7 @@ function Get-ReadmeWithLatestTag($readmeContent, $newApiVersion, $newApiVersionS
}
}

$tagVersion = $newApiVersion -match '(?<apiVersion>(?<date>\d{4}-\d{2}-\d{2})|(?<version>\d+\.\d+)(-preview(\.\d+)?)?)'
$tagVersion = $newApiVersion -match '(?<apiVersion>(?<date>\d{4}-\d{2}(-\d{2})?)|(?<version>\d+\.\d+)(-preview(\.\d+)?)?)'
$tagVersion = $Matches['apiVersion']
if ($newApiVersionStatus -eq "preview") {
$tagVersion = "preview-" + $tagVersion
Expand Down
25 changes: 16 additions & 9 deletions eng/scripts/Copy-ApiVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,25 @@ param (
[Parameter(Mandatory = $true)]
[ArgumentCompleter({ "preview/", "stable/" })]
[ValidateScript({
function script:Get-Version([string] $version) {
if ($version -match '^(?<status>stable|preview)/(?<version>(\d{4}-\d{2}-\d{2}|\d+\.\d+)(-preview(\.\d+)?)?)$') {
return $Matches['status'], $Matches['version']
}

throw 'Version must start with "stable/" or "preview/" and end with either a date-based version (recommended) like 2024-01-05 or a major.minor semver, followed by an optional "-preview" for previews APIs.'
function script:Get-Version($version) {
if ($version -match '^(?<status>stable|preview)/(?<version>(\d{4}-\d{2}(-\d{2})?|\d+\.\d+)(-preview(\.\d+)?)?)$') {
return $Matches['status'], $Matches['version']
}
Get-Version $_ })]

throw 'Version must start with "stable/" or "preview/" and end with either a date-based version (recommended) like 2024-01-05 or a major.minor semver, followed by an optional "-preview" for previews APIs.'
}
Get-Version $_
})]
[string] $NewVersion,

[Parameter(Mandatory = $true)]
[ValidateScript({ Get-Version $_ })]
[ValidateScript({
if ($_ -match '^(?<status>stable|preview)/(?<version>(\d{4}-\d{2}(-\d{2})?|\d+\.\d+)(-preview(\.\d+)?)?)$') {
return $Matches['status'], $Matches['version']
}

throw 'Version must start with "stable/" or "preview/" and end with either a date-based version (recommended) like 2024-01-05 or a major.minor semver, followed by an optional "-preview" for previews APIs.'
})]
[ArgumentCompleter({
param($commandName,
$parameterName,
Expand Down Expand Up @@ -138,4 +145,4 @@ else {

New-GitAddAndCommit $readmeDirectory @"
Added tag for $newApiVersion in readme file
"@
"@
4 changes: 2 additions & 2 deletions eng/scripts/Create-APIView.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ function New-SwaggerAPIViewTokens {
[string]$APIViewArtifactsDirectoryName
)

$SourceCommitId = $(git rev-parse HEAD^)
$TargetCommitId = $(git rev-parse HEAD)
$SourceCommitId = $(git rev-parse HEAD^2)
$TargetCommitId = $(git rev-parse HEAD^1)

# Get Changed Swagger Files
LogInfo " Getting changed swagger files in PR, between $SourceCommitId and $TargetCommitId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ options:
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/ConnectedCache.json"
"@azure-tools/typespec-go":
service-dir: "sdk/resourcemanager/connectedcache"
package-dir: "armconnectedcache"
module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}"
fix-const-stuttering: true
flavor: "azure"
generate-examples: true
generate-fakes: true
head-as-boolean: true
inject-spans: true
remove-unreferenced-types: true
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/resource-manager"
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ options:
flavor: "azure"
packageDetails:
name: "@azure/arm-devopsinfrastructure"
"@azure-tools/typespec-go":
service-dir: "sdk/resourcemanager/devopsinfrastructure"
package-dir: "armdevopsinfrastructure"
module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}"
fix-const-stuttering: true
flavor: "azure"
generate-examples: true
generate-fakes: true
head-as-boolean: true
inject-spans: true
remove-unreferenced-types: true
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ namespace Microsoft.EventGrid.SystemEvents {
/** The time the policy task was scheduled. */
scheduleTime?: string;

/** Policy execution summary which shows the completion status of a LCM run" */
policyRunSummary: StorageLifecyclePolicyRunSummary;

/** Execution statistics of a specific policy action in a Blob Management cycle. */
deleteSummary: StorageLifecyclePolicyActionSummaryDetail;

Expand All @@ -208,6 +211,12 @@ namespace Microsoft.EventGrid.SystemEvents {
errorList?: string;
}

/** Policy run status of an account in a Blob Management cycle. */
model StorageLifecyclePolicyRunSummary {
/** Policy status can be Completed/CompletedWithError/Incomplete. */
completionStatus: StorageLifecycleCompletionStatus;
}

/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobTierChanged event. */
model StorageBlobTierChangedEventData {
/** The name of the API/operation that triggered this event. */
Expand Down Expand Up @@ -359,6 +368,20 @@ namespace Microsoft.EventGrid.SystemEvents {
summaryReportBlobUrl: url;
}

/** The status for a LCM policy. */
union StorageLifecycleCompletionStatus {
/** Completed */
"Completed",

/** CompletedWithError */
"CompletedWithError",

/** Incomplete */
"Incomplete",

string,
}

/** The status for a storage task. */
union StorageTaskAssignmentCompletedStatus {
/** Succeeded */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8507,6 +8507,36 @@
"storageDiagnostics"
]
},
"StorageLifecycleCompletionStatus": {
"type": "string",
"description": "The status for a LCM policy.",
"enum": [
"Completed",
"CompletedWithError",
"Incomplete"
],
"x-ms-enum": {
"name": "StorageLifecycleCompletionStatus",
"modelAsString": true,
"values": [
{
"name": "Completed",
"value": "Completed",
"description": "Completed"
},
{
"name": "CompletedWithError",
"value": "CompletedWithError",
"description": "CompletedWithError"
},
{
"name": "Incomplete",
"value": "Incomplete",
"description": "Incomplete"
}
]
}
},
"StorageLifecyclePolicyActionSummaryDetail": {
"type": "object",
"description": "Execution statistics of a specific policy action in a Blob Management cycle.",
Expand Down Expand Up @@ -8535,6 +8565,10 @@
"type": "string",
"description": "The time the policy task was scheduled."
},
"policyRunSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyRunSummary",
"description": "Policy execution summary which shows the completion status of a LCM run\""
},
"deleteSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyActionSummaryDetail",
"description": "Execution statistics of a specific policy action in a Blob Management cycle."
Expand All @@ -8553,12 +8587,26 @@
}
},
"required": [
"policyRunSummary",
"deleteSummary",
"tierToCoolSummary",
"tierToArchiveSummary",
"tierToColdSummary"
]
},
"StorageLifecyclePolicyRunSummary": {
"type": "object",
"description": "Policy run status of an account in a Blob Management cycle.",
"properties": {
"completionStatus": {
"$ref": "#/definitions/StorageLifecycleCompletionStatus",
"description": "Policy status can be Completed/CompletedWithError/Incomplete."
}
},
"required": [
"completionStatus"
]
},
"StorageTaskAssignmentCompletedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentCompleted event.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8651,6 +8651,36 @@
"storageDiagnostics"
]
},
"StorageLifecycleCompletionStatus": {
"type": "string",
"description": "The status for a LCM policy.",
"enum": [
"Completed",
"CompletedWithError",
"Incomplete"
],
"x-ms-enum": {
"name": "StorageLifecycleCompletionStatus",
"modelAsString": true,
"values": [
{
"name": "Completed",
"value": "Completed",
"description": "Completed"
},
{
"name": "CompletedWithError",
"value": "CompletedWithError",
"description": "CompletedWithError"
},
{
"name": "Incomplete",
"value": "Incomplete",
"description": "Incomplete"
}
]
}
},
"StorageLifecyclePolicyActionSummaryDetail": {
"type": "object",
"description": "Execution statistics of a specific policy action in a Blob Management cycle.",
Expand Down Expand Up @@ -8679,6 +8709,10 @@
"type": "string",
"description": "The time the policy task was scheduled."
},
"policyRunSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyRunSummary",
"description": "Policy execution summary which shows the completion status of a LCM run\""
},
"deleteSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyActionSummaryDetail",
"description": "Execution statistics of a specific policy action in a Blob Management cycle."
Expand All @@ -8697,12 +8731,26 @@
}
},
"required": [
"policyRunSummary",
"deleteSummary",
"tierToCoolSummary",
"tierToArchiveSummary",
"tierToColdSummary"
]
},
"StorageLifecyclePolicyRunSummary": {
"type": "object",
"description": "Policy run status of an account in a Blob Management cycle.",
"properties": {
"completionStatus": {
"$ref": "#/definitions/StorageLifecycleCompletionStatus",
"description": "Policy status can be Completed/CompletedWithError/Incomplete."
}
},
"required": [
"completionStatus"
]
},
"StorageTaskAssignmentCompletedEventData": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentCompleted event.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@
"description": "The time the policy task was scheduled.",
"type": "string"
},
"policyRunSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyRunSummary"
},
"deleteSummary": {
"$ref": "#/definitions/StorageLifecyclePolicyActionSummaryDetail"
},
Expand Down Expand Up @@ -348,6 +351,28 @@
}
}
},
"StorageLifecyclePolicyRunSummary": {
"type": "object",
"description": "Policy run status of an account in a Blob Management cycle.",
"properties": {
"completionStatus": {
"description": "Policy status can be Completed/CompletedWithError/Incomplete.",
"type": "string",
"enum": [
"Completed",
"CompletedWithError",
"Incomplete"
],
"x-ms-enum": {
"name": "StorageLifecycleCompletionStatus",
"modelAsString": true
}
}
},
"required": [
"completionStatus"
]
},
"StorageBlobTierChangedEventData": {
"description": "Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobTierChanged event.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ options:
flavor: "azure"
generate-test: true
generate-sample: true
"@azure-tools/typespec-go":
service-dir: "sdk/resourcemanager/hybridconnectivity"
package-dir: "armhybridconnectivity"
module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}"
fix-const-stuttering: true
flavor: "azure"
generate-examples: true
generate-fakes: true
head-as-boolean: true
inject-spans: true
remove-unreferenced-types: true
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/resource-manager"
11 changes: 11 additions & 0 deletions specification/liftrneon/Neon.Postgres.Management/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ options:
flavor: "azure"
generate-test: true
generate-sample: true
"@azure-tools/typespec-go":
service-dir: "sdk/resourcemanager/neonpostgres"
package-dir: "armneonpostgres"
module: "github.com/Azure/azure-sdk-for-go/{service-dir}/{package-dir}"
fix-const-stuttering: true
flavor: "azure"
generate-examples: true
generate-fakes: true
head-as-boolean: true
inject-spans: true
remove-unreferenced-types: true
Loading

0 comments on commit 0c8cdeb

Please sign in to comment.