Skip to content

Commit 63ff050

Browse files
bbartelskarolz-msjoperezrCopilotCopilot
authored
Fix port mismatch for bait-and-switch resources in Kubernetes publisher (#14590)
* Add a script for startup performance measurement (#14345) * Add startup perf collection script * Analyze trace more efficiently * Increase pause between iterations * Fix TraceAnalyzer * Add startup-perf skill * Add backmerge release workflow to automate merging changes from release/13.2 to main (#14453) * Add backmerge release workflow to automate merging changes from release/13.2 to main * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply more fixes and use dotnet's action --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump Aspire branding from 13.2 to 13.3 (#14456) * Initial plan * Bump Aspire branding from 13.2 to 13.3 Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com> * Update Azure.Core to latest version - lift all runtime dependencies to latest (#14361) * Update to Azure.Core 1.51.1 Use latest versions for all dotnet/runtime nuget packages. This simplifies our dependency management. Remove ForceLatestDotnetVersions property from multiple project files * Update AzureDeployerTests to use WaitForShutdown instead of StopAsync There is a timing issue when using Start/Stop since the background pipeline might still be running and it cancels the pipeline before it can complete. * Fix AuxiliaryBackchannelTests by adding a Task that completes when the AuxiliaryBackchannelService is listening and ready for connections. * Remove double registration of AuxiliaryBackchannelService as an IHostedService. * Fix ResourceLoggerForwarderServiceTests to ensure the ResourceLoggerForwarderService has started before signalling the stopping token. * Update Arcade to latest version from the .NET 10 Eng channel (#13556) Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com> * Refactor backmerge PR creation to update existing PRs and streamline body formatting (#14476) * [main] Fix transitive Azure role assignments through WaitFor dependencies (#14478) * Initial plan * Fix transitive Azure role assignments through WaitFor dependencies Remove CollectAnnotationDependencies calls from CollectDependenciesFromValue to prevent WaitFor/parent/connection-string-redirect annotations from referenced resources being included as direct dependencies of the caller. Add tests verifying: - DirectOnly mode excludes WaitFor deps from referenced resources - WaitFor doesn't create transitive role assignments in Azure publish Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> * Remove auto-merge step from backmerge workflow (#14481) * Remove auto-merge step from backmerge workflow * Update PR body to request merge commit instead of auto-merge * Add agentic workflow daily-repo-status (#14498) * [Automated] Backmerge release/13.2 to main (#14536) * Fix Windows pipeline image to use windows.vs2022.amd64.open (#14492) * Fix Windows pipeline image to use windows.vs2022.amd64.open * Use windows.vs2026preview.scout.amd64 for public pipeline Windows pool Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add Azure portal link for Resource Group in deploy pipeline summary (#14434) * Add Azure portal link for Resource Group in pipeline summary When printing the Resource Group in the pipeline summary of `aspire deploy`, include a clickable link to the Azure portal resource group page. The link uses the format: https://portal.azure.com/#@{tenantId}/resource/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/overview Changes: - AzureEnvironmentResource.AddToPipelineSummary: construct markdown link for resource group - ConsoleActivityLogger.FormatPipelineSummaryKvp: convert markdown to Spectre markup for clickable links - Add ConsoleActivityLoggerTests for the new markdown rendering behavior Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> * Clean up the code * Fix tests * More test fixups * Refactor code * Update src/Aspire.Cli/Utils/MarkdownToSpectreConverter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add test for color-enabled non-interactive rendering path Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> * fix test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * [Automated] Update AI Foundry Models (#14541) Co-authored-by: sebastienros <sebastienros@users.noreply.github.com> * Detect CLI at default install paths when not on PATH (#14545) Check default installation directories (~/.aspire/bin, ~/.dotnet/tools) when the Aspire CLI is not found on the system PATH. If found at a default location, the VS Code setting is auto-updated. If later found on PATH, the setting is cleared. Resolution order: configured custom path > system PATH > default install paths. Fixes #14235 * [automated] Unquarantine stable tests with 25+ days zero failures (#14531) * Initial plan * [automated] Unquarantine stable tests - Unquarantined: DeployCommandIncludesDeployFlagInArguments - Unquarantined: GetAppHostsCommand_WithMultipleProjects_ReturnsSuccessWithAllCandidates - Unquarantined: GetAppHostsCommand_WithSingleProject_ReturnsSuccessWithValidJson - Unquarantined: PushImageToRegistry_WithRemoteRegistry_PushesImage - Unquarantined: ProcessParametersStep_ValidatesBehavior - Unquarantined: WithHttpCommand_EnablesCommandOnceResourceIsRunning These tests are being unquarantined as they have had 25+ days of quarantined run data with zero failures. Co-authored-by: radical <1472+radical@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: radical <1472+radical@users.noreply.github.com> * Partially fix quarantined test: Update stale snapshot for DeployAsync_WithMultipleComputeEnvironments_Works (#14551) * Initial plan * Update snapshot for DeployAsync_WithMultipleComputeEnvironments_Works test Co-authored-by: radical <1472+radical@users.noreply.github.com> * Remove quarantine attribute from DeployAsync_WithMultipleComputeEnvironments_Works test Co-authored-by: radical <1472+radical@users.noreply.github.com> * Restore quarantine attribute - step="deploy" case still fails Co-authored-by: radical <1472+radical@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: radical <1472+radical@users.noreply.github.com> * Update daily report to 13.2 milestone burndown (#14563) * Update daily report to 13.2 milestone burndown Refocus the daily-repo-status agentic workflow to serve as a 13.2 release burndown report: - Track 13.2 milestone issues closed/opened in the last 24 hours - Highlight new bugs added to the milestone - Summarize PRs merged to release/13.2 branch - List PRs targeting release/13.2 awaiting review - Surface relevant 13.2 discussions - Generate a Mermaid xychart burndown using cache-memory snapshots - Keep general triage queue as a brief secondary section - Schedule daily around 9am, auto-close older report issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review feedback: clarify cache schema and queries - Exclude PRs from milestone counts (issues-only filter) - Specify exact JSON schema for cache-memory burndown snapshots - Add dedup, sort, and trim-to-7 logic for cache entries - Simplify 'new issues' query to opened-in-last-24h with milestone Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update Aspire.Hosting.Kubernetes.csproj * Initialize _kubernetesComponents with ResourceNameComparer * Update KubernetesPublisherTests.cs * Update Aspire.Hosting.Kubernetes.csproj * Adds snapshots * Adds Chart.yaml to snapshot --------- Co-authored-by: Karol Zadora-Przylecki <karolz@microsoft.com> Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: joperezr <13854455+joperezr@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> Co-authored-by: David Negstad <50252651+danegsta@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Co-authored-by: sebastienros <sebastienros@users.noreply.github.com> Co-authored-by: Adam Ratzman <adam@adamratzman.com> Co-authored-by: radical <1472+radical@users.noreply.github.com>
1 parent c258da6 commit 63ff050

73 files changed

Lines changed: 3489 additions & 576 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.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@
6060
# https://github.com/github/linguist/issues/1626#issuecomment-401442069
6161
# this only affects the repo's language statistics
6262
*.h linguist-language=C
63+
64+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/policies/milestoneAssignment.prClosed.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ configuration:
1616
branch: main
1717
then:
1818
- addMilestone:
19-
milestone: 13.2
19+
milestone: 13.3
2020
description: '[Milestone Assignments] Assign Milestone to PRs merged to the `main` branch'
2121
- if:
2222
- payloadType: Pull_Request
2323
- isAction:
2424
action: Closed
2525
- targetsBranch:
26-
branch: release/13.1
26+
branch: release/13.2
2727
then:
2828
- removeMilestone
2929
- addMilestone:
30-
milestone: 13.1.1
31-
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/13.1 branch'
30+
milestone: 13.2
31+
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/13.2 branch'
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
name: startup-perf
3+
description: Measures Aspire application startup performance using dotnet-trace and the TraceAnalyzer tool. Use this when asked to measure impact of a code change on Aspire application startup performance.
4+
---
5+
6+
# Aspire Startup Performance Measurement
7+
8+
This skill provides patterns and practices for measuring .NET Aspire application startup performance using the `Measure-StartupPerformance.ps1` script and the companion `TraceAnalyzer` tool.
9+
10+
## Overview
11+
12+
The startup performance tooling collects `dotnet-trace` traces from an Aspire AppHost application and computes the startup duration from `AspireEventSource` events. Specifically, it measures the time between the `DcpModelCreationStart` (event ID 17) and `DcpModelCreationStop` (event ID 18) events emitted by the `Microsoft-Aspire-Hosting` EventSource provider.
13+
14+
**Script Location**: `tools/perf/Measure-StartupPerformance.ps1`
15+
**TraceAnalyzer Location**: `tools/perf/TraceAnalyzer/`
16+
**Documentation**: `docs/getting-perf-traces.md`
17+
18+
## Prerequisites
19+
20+
- PowerShell 7+
21+
- `dotnet-trace` global tool (`dotnet tool install -g dotnet-trace`)
22+
- .NET SDK (restored via `./restore.cmd` or `./restore.sh`)
23+
24+
## Quick Start
25+
26+
### Single Measurement
27+
28+
```powershell
29+
# From repository root — measures the default TestShop.AppHost
30+
.\tools\perf\Measure-StartupPerformance.ps1
31+
```
32+
33+
### Multiple Iterations with Statistics
34+
35+
```powershell
36+
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5
37+
```
38+
39+
### Custom Project
40+
41+
```powershell
42+
.\tools\perf\Measure-StartupPerformance.ps1 -ProjectPath "path\to\MyApp.AppHost.csproj" -Iterations 3
43+
```
44+
45+
### Preserve Traces for Manual Analysis
46+
47+
```powershell
48+
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 3 -PreserveTraces -TraceOutputDirectory "C:\traces"
49+
```
50+
51+
### Verbose Output
52+
53+
```powershell
54+
.\tools\perf\Measure-StartupPerformance.ps1 -Verbose
55+
```
56+
57+
## Parameters
58+
59+
| Parameter | Default | Description |
60+
|-----------|---------|-------------|
61+
| `ProjectPath` | TestShop.AppHost | Path to the AppHost `.csproj` to measure |
62+
| `Iterations` | 1 | Number of measurement runs (1–100) |
63+
| `PreserveTraces` | `$false` | Keep `.nettrace` files after analysis |
64+
| `TraceOutputDirectory` | temp folder | Directory for preserved trace files |
65+
| `SkipBuild` | `$false` | Skip `dotnet build` before running |
66+
| `TraceDurationSeconds` | 60 | Maximum trace collection time (1–86400) |
67+
| `PauseBetweenIterationsSeconds` | 45 | Pause between iterations (0–3600) |
68+
| `Verbose` | `$false` | Show detailed output |
69+
70+
## How It Works
71+
72+
The script follows this sequence:
73+
74+
1. **Prerequisites check** — Verifies `dotnet-trace` is installed and the project exists.
75+
2. **Build** — Builds the AppHost project in Release configuration (unless `-SkipBuild`).
76+
3. **Build TraceAnalyzer** — Builds the companion `tools/perf/TraceAnalyzer` project.
77+
4. **For each iteration:**
78+
a. Locates the compiled executable (Arcade-style or traditional output paths).
79+
b. Reads `launchSettings.json` for environment variables.
80+
c. Launches the AppHost as a separate process.
81+
d. Attaches `dotnet-trace` to the running process with the `Microsoft-Aspire-Hosting` provider.
82+
e. Waits for the trace to complete (duration timeout or process exit).
83+
f. Runs the TraceAnalyzer to extract the startup duration from the `.nettrace` file.
84+
g. Cleans up processes.
85+
5. **Reports results** — Prints per-iteration times and statistics (min, max, average, std dev).
86+
87+
## TraceAnalyzer Tool
88+
89+
The `tools/perf/TraceAnalyzer` is a small .NET console app that parses `.nettrace` files using the `Microsoft.Diagnostics.Tracing.TraceEvent` library.
90+
91+
### What It Does
92+
93+
- Opens the `.nettrace` file with `EventPipeEventSource`
94+
- Listens for events from the `Microsoft-Aspire-Hosting` provider
95+
- Extracts timestamps for `DcpModelCreationStart` (ID 17) and `DcpModelCreationStop` (ID 18)
96+
- Outputs the duration in milliseconds (or `"null"` if events are not found)
97+
98+
### Standalone Usage
99+
100+
```bash
101+
dotnet run --project tools/perf/TraceAnalyzer -c Release -- <path-to-nettrace-file>
102+
```
103+
104+
## Understanding Output
105+
106+
### Successful Run
107+
108+
```
109+
==================================================
110+
Aspire Startup Performance Measurement
111+
==================================================
112+
113+
Project: TestShop.AppHost
114+
Iterations: 3
115+
...
116+
117+
Iteration 1
118+
----------------------------------------
119+
Starting TestShop.AppHost...
120+
Attaching trace collection to PID 12345...
121+
Collecting performance trace...
122+
Trace collection completed.
123+
Analyzing trace: ...
124+
Startup time: 1234.56 ms
125+
126+
...
127+
128+
==================================================
129+
Results Summary
130+
==================================================
131+
132+
Iteration StartupTimeMs
133+
--------- -------------
134+
1 1234.56
135+
2 1189.23
136+
3 1201.45
137+
138+
Statistics:
139+
Successful iterations: 3 / 3
140+
Minimum: 1189.23 ms
141+
Maximum: 1234.56 ms
142+
Average: 1208.41 ms
143+
Std Dev: 18.92 ms
144+
```
145+
146+
### Common Issues
147+
148+
| Symptom | Cause | Fix |
149+
|---------|-------|-----|
150+
| `dotnet-trace is not installed` | Missing global tool | Run `dotnet tool install -g dotnet-trace` |
151+
| `Could not find compiled executable` | Project not built | Remove `-SkipBuild` or build manually |
152+
| `Could not find DcpModelCreation events` | Trace too short or events not emitted | Increase `-TraceDurationSeconds` |
153+
| `Application exited immediately` | App crash on startup | Check app logs, ensure dependencies are available |
154+
| `dotnet-trace exited with code != 0` | Trace collection error | Check verbose output; trace file may still be valid |
155+
156+
## Comparing Before/After Performance
157+
158+
To measure the impact of a code change:
159+
160+
```powershell
161+
# 1. Measure baseline (on main branch)
162+
git checkout main
163+
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5 -PreserveTraces -TraceOutputDirectory "C:\traces\baseline"
164+
165+
# 2. Measure with changes
166+
git checkout my-feature-branch
167+
.\tools\perf\Measure-StartupPerformance.ps1 -Iterations 5 -PreserveTraces -TraceOutputDirectory "C:\traces\feature"
168+
169+
# 3. Compare the reported averages and std devs
170+
```
171+
172+
Use enough iterations (5+) and a consistent pause between iterations for reliable comparisons.
173+
174+
## Collecting Traces for Manual Analysis
175+
176+
If you need to inspect trace files manually (e.g., in PerfView or Visual Studio):
177+
178+
```powershell
179+
.\tools\perf\Measure-StartupPerformance.ps1 -PreserveTraces -TraceOutputDirectory "C:\my-traces"
180+
```
181+
182+
See `docs/getting-perf-traces.md` for guidance on analyzing traces with PerfView or `dotnet trace report`.
183+
184+
## EventSource Provider Details
185+
186+
The `Microsoft-Aspire-Hosting` EventSource emits events for key Aspire lifecycle milestones. The startup performance script focuses on:
187+
188+
| Event ID | Event Name | Description |
189+
|----------|------------|-------------|
190+
| 17 | `DcpModelCreationStart` | Marks the beginning of DCP model creation |
191+
| 18 | `DcpModelCreationStop` | Marks the completion of DCP model creation |
192+
193+
The measured startup time is the wall-clock difference between these two events, representing the time to create all application services and supporting dependencies.

.github/workflows/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,26 @@ When you comment on a PR (not an issue), the workflow will automatically push ch
9999
### Concurrency
100100

101101
The workflow uses concurrency groups based on the issue/PR number to prevent race conditions when multiple commands are issued on the same issue.
102+
103+
## Backmerge Release Workflow
104+
105+
The `backmerge-release.yml` workflow automatically creates PRs to merge changes from `release/13.2` back into `main`.
106+
107+
### Schedule
108+
109+
Runs daily at 00:00 UTC (4pm PT during standard time, 5pm PT during daylight saving time). Can also be triggered manually via `workflow_dispatch`.
110+
111+
### Behavior
112+
113+
1. **Change Detection**: Checks if `release/13.2` has commits not in `main`
114+
2. **PR Creation**: If changes exist, creates a PR to merge `release/13.2``main`
115+
3. **Auto-merge**: Enables GitHub's auto-merge feature, so the PR merges automatically once approved
116+
4. **Conflict Handling**: If merge conflicts occur, creates an issue instead of a PR
117+
118+
### Assignees
119+
120+
PRs and conflict issues are automatically assigned to @joperezr and @radical.
121+
122+
### Manual Trigger
123+
124+
To trigger manually, go to Actions → "Backmerge Release to Main" → "Run workflow".

0 commit comments

Comments
 (0)