Skip to content

Commit ea7119b

Browse files
committed
Merge branch 'main' into release/spring-cloud-azure_7.2.0
2 parents f1a08ec + 510acfb commit ea7119b

861 files changed

Lines changed: 41629 additions & 3281 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/workflows/event-processor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: 'Az CLI login'
35-
uses: azure/login@v2
35+
uses: azure/login@v3
3636
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
3737
with:
3838
client-id: a6dd2dfe-7352-41a7-9020-05301c3bca1a

eng/common/instructions/azsdk-tools/create-release-plan.instructions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ If any details are missing, prompt the user accordingly:
2929
- **Service Tree ID**: GUID format identifier for the service in Service Tree. Before creating release plan, always show the value to user and ask them to confirm it's a valid value in service tree.
3030
- **Product Service Tree ID**: GUID format identifier for the product in Service Tree. Before creating release plan, always show the value to user and ask them to confirm it's a valid value in service tree.
3131
- **Expected Release Timeline**: Format must be in "Month YYYY"
32-
- **API Version**: The version of the API being released
3332
- **SDK Release Type**: Value must be beta or stable.
34-
- "beta" for preview API versions
35-
- "stable" for GA API versions
33+
- "beta"
34+
- "stable"
3635

3736
## Step 4: Create Release Plan
3837
- If the user doesn't know the required details, direct them to create a release plan using the release planner
Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
11
---
2-
description: 'Identify languages configured in the TypeSpec project and add it to release plan'
2+
description: 'Update SDK details in a release plan from a TypeSpec project'
33
---
4-
# Step 1: Find the list of languages and package names
5-
**Goal**: Identify languages configured in the TypeSpec project and generate the json object with language and package name.
6-
1. Identify the language emitter configuration in the `tspconfig.yaml` file in the TypeSpec project root.
7-
2. Identify the package name or namespace for each language emitter.
8-
- For Java and Python, use `emitter-output-dir` for package name if it exists. Otherwise use `package-dir` to get the package name as fallback approach.
9-
- For .NET, use namespace property to get package name.
10-
- For JavaScript, use `packagedetails:name` property to get package name.
11-
- For Go, use module name and remove `github.com/Azure/azure-sdk-for-go/` to get package name.
12-
3. Map the language name in emitter to one of the following in Pascal case(except .NET):
13-
- .NET
14-
- Java
15-
- Python
16-
- JavaScript
17-
- Go
18-
4. Create a JSON array object with the following structure:
19-
```json
20-
[
21-
{
22-
"language": "<LanguageName>",
23-
"packageName": "<PackageName>"
24-
},
25-
...
26-
]
27-
```
28-
5. If no languages are configured, inform the user: "No languages configured in TypeSpec project. Please add at least one language emitter in tspconfig.yaml."
29-
**Success Criteria**: JSON object with languages and package names created.
4+
# Step 1: Identify the TypeSpec project path
5+
**Goal**: Identify the path to the TypeSpec project that contains the `tspconfig.yaml` file.
6+
1. Identify the TypeSpec project directory that contains a `tspconfig.yaml` file.
7+
2. If a TypeSpec project path is not provided or known, ask the user for the path.
8+
3. If no `tspconfig.yaml` exists at the given path, inform the user: "No tspconfig.yaml found at the given path. Please provide a valid TypeSpec project path."
9+
**Success Criteria**: Valid TypeSpec project path identified.
3010

3111
# Step 2: Check if release plan exists
3212
**Goal**: Determine if a release plan exists for the API spec pull request or work item Id or release plan Id in current context.
@@ -36,17 +16,7 @@ description: 'Identify languages configured in the TypeSpec project and add it t
3616
**Success Criteria**: Release plan exists or user informed to create one.
3717

3818
# Step 3: Update Release Plan with SDK Information
39-
> **(MANDATORY - DO NOT SKIP) ALWAYS validate all package names against the format rules AND the examples table before calling any update tool, even if the user provides SDK details directly. Auto-correct and inform the user of invalid package names.**
40-
> - **JavaScript**: Must start with `@azure/`
41-
> - **Go**: Must start with `sdk/`
42-
>
43-
> **Valid package name examples (compare against these to catch invalid formats):**
44-
> | Language | Valid | Invalid |
45-
> |----------|-------|---------|
46-
> | JavaScript | `@azure/arm-compute` | `arm-compute`, `azure/arm-compute`,`@azure-arm-compute` |
47-
> | Go (management plane) | `sdk/resourcemanager/compute/armcompute` | `sdk/armcompute`, `/sdk/compute`, `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute` |
48-
49-
**Goal**: Update the release plan with the languages and package names identified in Step 1.
50-
1. Use `azsdk_update_sdk_details_in_release_plan` to update the release plan work item with the JSON object created in Step 1.
19+
**Goal**: Update the release plan with the SDK package names resolved from the TypeSpec project.
20+
1. Use `azsdk_update_sdk_details_in_release_plan` with the release plan work item ID and the TypeSpec project path from Step 1.
5121
2. Confirm successful update of the release plan with the SDK information and summary of languages and package names.
52-
**Success Criteria**: Release plan updated with languages and package names.
22+
**Success Criteria**: Release plan updated with languages and package names resolved from the TypeSpec project.

eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Follow the steps in #file:local-sdk-workflow.instructions.md to generate and bui
4444
- Execute the SDK generation pipeline with the following required parameters for all languages:
4545
- TypeSpec project root path
4646
- API spec pull request number (if the API spec is not merged to the main branch, otherwise use 0)
47-
- API version
47+
- API version (optional)
4848
- SDK release type (`beta` for preview API versions, `stable` otherwise)
4949
- Language options:
5050
For management plane: `Python`, `.NET`, `JavaScript`, `Java`, `Go`

eng/common/pipelines/templates/steps/bypass-local-dns.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

eng/common/pipelines/templates/steps/verify-agent-os.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ steps:
1414
filePath: ${{ parameters.ScriptDirectory }}/Verify-AgentOS.ps1
1515
arguments: >
1616
-AgentImage "${{ parameters.AgentImage }}"
17-
18-
- template: /eng/common/pipelines/templates/steps/bypass-local-dns.yml
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
$ErrorActionPreference = "SilentlyContinue"
2+
. (Join-Path $PSScriptRoot '..' 'scripts' 'Helpers' 'AzSdkTool-Helpers.ps1')
3+
4+
$cliPath = Get-CommonInstallDirectory
5+
$cliPath = Join-Path $cliPath "azsdk"
6+
7+
# Skip telemetry if opted out
8+
if ($env:AZSDKTOOLS_COLLECT_TELEMETRY -eq "false")
9+
{
10+
Write-Success
11+
}
12+
13+
# Return success and exit
14+
function Write-Success
15+
{
16+
Write-Output '{"continue":true}'
17+
exit 0
18+
}
19+
20+
# Read entire stdin at once - hooks send one complete JSON per invocation
21+
try
22+
{
23+
$rawInput = [Console]::In.ReadToEnd()
24+
} catch
25+
{
26+
Write-Success
27+
}
28+
# Return success and exit if no input
29+
if ([string]::IsNullOrWhiteSpace($rawInput))
30+
{
31+
Write-Success
32+
}
33+
34+
try
35+
{
36+
$inputData = $rawInput | ConvertFrom-Json
37+
} catch {
38+
Write-Success
39+
}
40+
$prompt = $inputData.prompt
41+
$sessionId = $null
42+
$eventType = "user_prompt"
43+
$clientType = $null
44+
45+
# Session id
46+
if ($inputData.PSObject.Properties['sessionId'])
47+
{
48+
$sessionId = $inputData.sessionId
49+
$clientType = "copilot-cli"
50+
}
51+
if (-not $sessionId -and $inputData.PSObject.Properties['session_id'])
52+
{
53+
$sessionId = $inputData.session_id
54+
$clientType = "vscode"
55+
}
56+
57+
# === STEP 2: Publish event ===
58+
# Build MCP command arguments
59+
$cliArgs = @(
60+
"ingest-telemetry",
61+
"--client-type", $clientType,
62+
"--event-type", $eventType,
63+
"--session-id", $sessionId,
64+
"--body", "'$prompt'"
65+
)
66+
67+
# run azsdk cli to ingest telemetry (non-blocking)
68+
try
69+
{
70+
Start-Process -FilePath $cliPath -ArgumentList $cliArgs -NoNewWindow
71+
}
72+
catch
73+
{
74+
Write-Success
75+
}
76+
# Output success to stdout (required by hooks)
77+
Write-Success

0 commit comments

Comments
 (0)