Skip to content

Commit cda0993

Browse files
committed
Merge remote-tracking branch 'upstream/main' into sqltls
2 parents 8858303 + 5ae4d85 commit cda0993

File tree

1,455 files changed

+48358
-79476
lines changed

Some content is hidden

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

1,455 files changed

+48358
-79476
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: 'Unlock macOS Keychain'
2+
description: 'Unlocks the macOS login keychain for CI tests that require keychain access'
3+
inputs:
4+
keychain-password:
5+
description: 'Password for the keychain (typically empty string for CI runners)'
6+
required: false
7+
default: ''
8+
keychain-name:
9+
description: 'Name of the keychain to unlock'
10+
required: false
11+
default: 'login.keychain-db'
12+
timeout:
13+
description: 'Timeout in seconds before keychain locks again (0 = no timeout)'
14+
required: false
15+
default: '7200' # 2 hours
16+
17+
runs:
18+
using: "composite"
19+
steps:
20+
- name: Check if running on macOS
21+
if: runner.os != 'macOS'
22+
shell: bash
23+
run: |
24+
echo "::warning::This action is designed for macOS runners but is running on ${{ runner.os }}. Skipping keychain unlock."
25+
26+
- name: Unlock keychain
27+
if: runner.os == 'macOS'
28+
shell: bash
29+
run: |
30+
KEYCHAIN_PATH="$HOME/Library/Keychains/${{ inputs.keychain-name }}"
31+
32+
echo "Unlocking keychain: $KEYCHAIN_PATH"
33+
security unlock-keychain -p "${{ inputs.keychain-password }}" "$KEYCHAIN_PATH"
34+
35+
if [ "${{ inputs.timeout }}" != "0" ]; then
36+
echo "Setting keychain timeout to ${{ inputs.timeout }} seconds"
37+
security set-keychain-settings -lut ${{ inputs.timeout }} "$KEYCHAIN_PATH"
38+
else
39+
echo "Disabling keychain timeout"
40+
security set-keychain-settings "$KEYCHAIN_PATH"
41+
fi
42+
43+
# Add to search list to ensure it's used
44+
security list-keychains -d user -s "$KEYCHAIN_PATH"
45+
46+
echo "Keychain unlocked successfully"
47+
48+
- name: Verify keychain is unlocked
49+
if: runner.os == 'macOS'
50+
shell: bash
51+
run: |
52+
KEYCHAIN_PATH="$HOME/Library/Keychains/${{ inputs.keychain-name }}"
53+
54+
# Try to access the keychain without password prompt
55+
if security show-keychain-info "$KEYCHAIN_PATH" 2>&1 | grep -q "no-timeout"; then
56+
echo "✓ Keychain is unlocked with no timeout"
57+
else
58+
echo "✓ Keychain is unlocked with timeout"
59+
fi

.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.1
19+
milestone: 13.2
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/9.4
26+
branch: release/13.1
2727
then:
2828
- removeMilestone
2929
- addMilestone:
30-
milestone: 9.4.2
31-
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/9.4 branch'
30+
milestone: 13.1
31+
description: '[Milestone Assignments] Assign Milestone to PRs merged to release/13.1 branch'

.github/workflows/build-packages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ jobs:
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323

2424
- name: Install VSCE tool
25-
run: npm i -g @vscode/vsce
25+
run: npm i -g @vscode/vsce@3.7.1
2626

2727
- name: Build with packages
2828
run: ./build.sh -restore -build -build-extension -ci -pack -bl -p:InstallBrowsersForPlaywright=false -p:SkipTestProjects=true -p:SkipPlaygroundProjects=true ${{ inputs.versionOverrideArg }}
2929

30+
- name: Clean up artifacts
31+
run: |
32+
rm -rf artifacts/bin
33+
rm -rf artifacts/obj
34+
3035
- name: Stage RID-specific NuGets and remaining packages
3136
id: stage_rid_specific
3237
shell: bash

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,18 @@ jobs:
8686
steps:
8787
- name: Fail if any of the dependent jobs failed
8888
# Don't fail if the workflow is being skipped.
89+
# Check skip_workflow on all declared dependencies. Workflows without
90+
# skip_workflow outputs (e.g., tests, build_cli_archives) evaluate to
91+
# empty string, so the check still works ('!= true' is true for empty).
8992
#
9093
# For others 'skipped' can be when a transitive dependency fails and the dependent job gets
9194
# 'skipped'. For example, one of setup_* jobs failing and the Integration test jobs getting
9295
# 'skipped'
9396
if: >-
9497
${{ always() &&
9598
needs.prepare_for_ci.outputs.skip_workflow != 'true' &&
99+
needs.tests.outputs.skip_workflow != 'true' &&
100+
needs.build_cli_archives.outputs.skip_workflow != 'true' &&
96101
(contains(needs.*.result, 'failure') ||
97102
contains(needs.*.result, 'cancelled') ||
98103
contains(needs.*.result, 'skipped')) }}

.github/workflows/run-tests.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
8.x
104104
9.x
105105
10.x
106+
env:
107+
DOTNET_INSTALL_DIR: ${{ env.DOTNET_ROOT }}
106108

107109
- name: Trust HTTPS development certificate (Linux)
108110
if: inputs.os == 'ubuntu-latest'
@@ -269,17 +271,21 @@ jobs:
269271
270272
Write-Output "Unzipped $zipFilePath to $destinationPath"
271273
274+
- name: Unlock macOS keychain for certificate tests
275+
if: runner.os == 'macOS'
276+
uses: ./.github/actions/unlock-macos-keychain
277+
272278
- name: Run nuget dependent tests
273279
if: ${{ inputs.requiresNugets }}
274280
working-directory: ${{ github.workspace }}/run-tests/
275281
env:
276-
DCP_DIAGNOSTICS_LOG_LEVEL: debug
277-
DCP_DIAGNOSTICS_LOG_FOLDER: ${{ github.workspace }}/testresults/dcp
282+
ASPIRE__TEST__DCPLOGBASEPATH: ${{ github.workspace }}/testresults/dcp
278283
BUILT_NUGETS_PATH: ${{ github.workspace }}/artifacts/packages/Debug/Shipping
279284
NUGET_PACKAGES: ${{ github.workspace }}/nuget-cache
280285
PLAYWRIGHT_INSTALLED: ${{ !inputs.enablePlaywrightInstall && 'false' || 'true' }}
281286
TEST_LOG_PATH: ${{ github.workspace }}/artifacts/log/test-logs
282287
TestsRunningOutsideOfRepo: true
288+
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: 'netaspireci.azurecr.io'
283289
run: >
284290
dotnet ${{ env.TEST_ASSEMBLY_NAME }}.dll
285291
--ignore-exit-code 8
@@ -295,13 +301,13 @@ jobs:
295301
if: ${{ ! inputs.requiresNugets }}
296302
id: run-tests
297303
env:
298-
DCP_DIAGNOSTICS_LOG_LEVEL: debug
299-
DCP_DIAGNOSTICS_LOG_FOLDER: ${{ github.workspace }}/testresults/dcp
304+
ASPIRE__TEST__DCPLOGBASEPATH: ${{ github.workspace }}/testresults/dcp
300305
# During restore and build, we use -ci, which causes NUGET_PACKAGES to point to a local cache (Arcade behavior).
301306
# In this step, we are not using Arcade, but want to make sure that MSBuild is able to evaluate correctly.
302307
# So, we manually set NUGET_PACKAGES
303308
NUGET_PACKAGES: ${{ github.workspace }}/.packages
304309
PLAYWRIGHT_INSTALLED: ${{ !inputs.enablePlaywrightInstall && 'false' || 'true' }}
310+
TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: 'netaspireci.azurecr.io'
305311
run: >
306312
${{ env.DOTNET_SCRIPT }} test ${{ env.TEST_PROJECT_PATH }}
307313
/p:ContinuousIntegrationBuild=true
@@ -324,26 +330,26 @@ jobs:
324330
shell: pwsh
325331
run: |
326332
$trxFiles = Get-ChildItem -Path "${{ github.workspace }}/testresults" -Filter *.trx -Recurse -ErrorAction SilentlyContinue
327-
333+
328334
if ($trxFiles.Count -eq 0) {
329335
Write-Error "No .trx files found. Tests may not have run due to infrastructure issues."
330336
exit 1
331337
}
332-
338+
333339
Write-Host "Found $($trxFiles.Count) .trx file(s)"
334-
340+
335341
$validFileCount = 0
336342
foreach ($trxFile in $trxFiles) {
337343
Write-Host "Checking $($trxFile.Name)..."
338-
344+
339345
try {
340346
[xml]$trxContent = Get-Content -Path $trxFile.FullName
341-
347+
342348
# Check if the XML is valid and non-empty
343349
if ($trxContent -and $trxContent.TestRun) {
344350
$validFileCount++
345351
$countersNode = $trxContent.TestRun.ResultSummary.Counters
346-
352+
347353
if ($countersNode -and $countersNode.total) {
348354
$testCount = [int]$countersNode.total
349355
Write-Host " Total tests in file: $testCount"
@@ -358,12 +364,12 @@ jobs:
358364
Write-Warning "Failed to parse $($trxFile.Name): $_"
359365
}
360366
}
361-
367+
362368
if ($validFileCount -eq 0) {
363369
Write-Error "No valid .trx files found. All .trx files are empty or invalid XML."
364370
exit 1
365371
}
366-
372+
367373
Write-Host "✓ Test execution completed successfully (found $validFileCount valid .trx file(s))"
368374
369375
- name: Dump docker info

.github/workflows/specialized-test-runner.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: true
99
type: string
1010
description: 'Arcade test runner name'
11+
attributeName:
12+
required: true
13+
type: string
14+
description: 'Attribute name to filter tests by like QuarantinedTest or OuterloopTest'
1115
extraRunSheetBuilderArgs:
1216
required: false
1317
type: string
@@ -33,13 +37,12 @@ jobs:
3337
if: ${{ github.repository_owner == 'dotnet' }}
3438
outputs:
3539
runsheet: ${{ steps.generate_tests_matrix.outputs.runsheet }}
40+
requiresNugets: ${{ steps.check_nugets.outputs.requiresNugets }}
3641
steps:
3742
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3843

39-
- name: Show disk usage before build
40-
run: |-
41-
df -h
42-
du -sh ${{ github.workspace }}
44+
- name: Identify relevant test projects
45+
run: ./eng/scripts/generate-specialized-test-projects-list.sh ${{ inputs.attributeName }} ${{ github.workspace }}/artifacts/BeforeBuildProps.props
4346

4447
# We need to build test projects, so that we can interrogate each test project
4548
# and find out whether it contains any tests of the specified type.
@@ -50,9 +53,9 @@ jobs:
5053
--restore
5154
--build
5255
-c Release
53-
/p:BuildTestsOnly=true
5456
/p:GeneratePackageOnBuild=false
5557
/p:InstallBrowsersForPlaywright=false
58+
/p:BeforeBuildPropsPath=${{ github.workspace }}/artifacts/BeforeBuildProps.props
5659
5760
- name: Generate test runsheet
5861
id: generate_tests_matrix
@@ -67,30 +70,35 @@ jobs:
6770
/p:Restore=false
6871
/p:Build=false
6972
/p:InstallBrowsersForPlaywright=false
73+
/p:BeforeBuildPropsPath=${{ github.workspace }}/artifacts/BeforeBuildProps.props
7074
/bl:${{ github.workspace }}/artifacts/log/Release/runsheet.binlog
7175
72-
- name: Show disk usage after build
73-
if: ${{ always() }}
74-
run: |-
75-
df -h
76-
du -d 1 -h ~/.nuget/packages
77-
du -d 1 -h ${{ github.workspace }}
78-
du -d 1 -h ${{ github.workspace }}/artifacts
76+
- name: Check if any test requires NuGets
77+
id: check_nugets
78+
run: |
79+
RUNSHEET='${{ steps.generate_tests_matrix.outputs.runsheet }}'
80+
if echo "$RUNSHEET" | jq -e 'any(.[]; .requiresNugets == true)' > /dev/null 2>&1; then
81+
echo "requiresNugets=true" >> $GITHUB_OUTPUT
82+
else
83+
echo "requiresNugets=false" >> $GITHUB_OUTPUT
84+
fi
7985
8086
- name: Upload logs, and test results
8187
if: ${{ always() }}
8288
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
8389
with:
8490
name: logs-runsheet
8591
path: |
92+
${{ github.workspace }}/artifacts/BeforeBuildProps.props
8693
${{ github.workspace }}/artifacts/log/*/runsheet.binlog
8794
${{ github.workspace }}/artifacts/log/*/TestLogs/**
8895
${{ github.workspace }}/artifacts/tmp/*/combined_runsheet.json
8996
retention-days: 5
9097

9198
build_packages:
9299
name: Build packages
93-
if: ${{ github.repository_owner == 'dotnet' }}
100+
needs: [generate_tests_matrix]
101+
if: ${{ github.repository_owner == 'dotnet' && needs.generate_tests_matrix.outputs.requiresNugets == 'true' }}
94102
uses: ./.github/workflows/build-packages.yml
95103

96104
run_tests:
@@ -100,7 +108,7 @@ jobs:
100108
fail-fast: false
101109
matrix:
102110
tests: ${{ fromJson(needs.generate_tests_matrix.outputs.runsheet) }}
103-
if: ${{ github.repository_owner == 'dotnet' }}
111+
if: ${{ github.repository_owner == 'dotnet' && !cancelled() && !failure() }}
104112
uses: ./.github/workflows/run-tests.yml
105113
with:
106114
testShortName: ${{ matrix.tests.project }}
@@ -176,7 +184,19 @@ jobs:
176184
- name: Fail if any dependency failed
177185
# 'skipped' can be when a transitive dependency fails and the dependent job gets 'skipped'.
178186
# For example, one of setup_* jobs failing and the Integration test jobs getting 'skipped'
179-
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')) }}
187+
# Note: build_packages being skipped is expected when requiresNugets is false, so we check it separately
188+
if: >-
189+
${{
190+
always() && (
191+
needs.generate_tests_matrix.result == 'failure' ||
192+
needs.generate_tests_matrix.result == 'cancelled' ||
193+
needs.run_tests.result == 'failure' ||
194+
needs.run_tests.result == 'cancelled' ||
195+
needs.run_tests.result == 'skipped' ||
196+
(needs.build_packages.result == 'failure') ||
197+
(needs.build_packages.result == 'cancelled')
198+
)
199+
}}
180200
run: |
181201
echo "One or more dependent jobs failed."
182202
exit 1

.github/workflows/tests-outerloop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
uses: ./.github/workflows/specialized-test-runner.yml
3636
with:
3737
testRunnerName: "OuterloopTestRunsheetBuilder"
38+
attributeName: "OuterloopTest"
3839
extraRunSheetBuilderArgs: "-p:RunOuterloopTests=true"
3940
extraTestArgs: "--filter-trait outerloop=true"
4041
enablePlaywrightInstall: true

.github/workflows/tests-quarantine.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414
workflow_dispatch:
1515

1616
schedule:
17-
- cron: '0 2,14 * * *' # Twice daily at 02:00 and 14:00 UTC
17+
# Run every 4 hours
18+
- cron: '0 */4 * * *'
1819

1920
# TEMPORARILY DISABLED pull_request trigger due to #12143 (disk space issues): https://github.com/dotnet/aspire/issues/12143
2021
# pull_request:
@@ -35,6 +36,7 @@ jobs:
3536
uses: ./.github/workflows/specialized-test-runner.yml
3637
with:
3738
testRunnerName: "QuarantinedTestRunsheetBuilder"
39+
attributeName: "QuarantinedTest"
3840
extraRunSheetBuilderArgs: "-p:RunQuarantinedTests=true"
3941
extraTestArgs: "--filter-trait quarantined=true"
4042
enablePlaywrightInstall: true

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
- name: Run tests
192192
run: yarn test
193193
- name: Package VSIX
194-
run: npx @vscode/vsce package --yarn --pre-release -o out/aspire-extension.vsix
194+
run: npx @vscode/vsce@3.7.1 package --yarn --pre-release -o out/aspire-extension.vsix
195195
- name: Upload VSIX
196196
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
197197
with:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,18 @@ config.ps1
124124
# Node.js modules
125125
node_modules/
126126

127+
# Maven build outputs
128+
target/
129+
dependency-reduced-pom.xml
130+
127131
# Ignore cache created with the Angular CLI.
128132
.angular/
129133

130134
# Python Compile Outputs
131135

132136
*.pyc
137+
*.egg-info/
138+
/playground/python/**/build
133139

134140
# IntelliJ
135141
.idea/

0 commit comments

Comments
 (0)