Python: .NET: [BREAKING] Remove Actor-based runtime (#977)

* Remove Actor-based runtime

* Fix formatting

* Remove cosmos db vestigials

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
Reuben Bond
2025-09-30 07:09:32 -07:00
committed by GitHub
Unverified
parent 0502f3ef91
commit 7967983755
116 changed files with 476 additions and 11189 deletions
@@ -1,158 +0,0 @@
#
# This workflow runs Cosmos DB integration tests using the Cosmos DB emulator.
#
name: dotnet-cosmosdb-integration-tests
on:
workflow_dispatch:
pull_request:
branches: ["main", "feature*"]
paths:
- dotnet/tests/CosmosDB.IntegrationTests/**
- dotnet/src/Microsoft.Agents.AI.Runtime.Storage.CosmosDB/**
- '.github/workflows/dotnet-cosmosdb-integration-tests.yml'
merge_group:
branches: ["main"]
push:
branches: ["main", "feature*"]
paths:
- dotnet/tests/CosmosDB.IntegrationTests/**
- dotnet/src/Microsoft.Agents.AI.Runtime.Storage.CosmosDB/**
- '.github/workflows/dotnet-cosmosdb-integration-tests.yml'
schedule:
- cron: "0 2 * * *" # Run at 2 AM UTC daily
env:
COSMOSDB_TESTS_USE_EMULATOR_CICD: "true"
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { targetFramework: "net9.0", os: "ubuntu-latest", configuration: Release }
# - { targetFramework: "net9.0", os: "ubuntu-latest", configuration: Debug }
services:
cosmosdb:
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
ports:
- 8081:8081
env:
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: "false"
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: "20" # the more the better for stable tests
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
sparse-checkout: |
.
.github
dotnet
- name: Setup dotnet
uses: actions/setup-dotnet@v5.0.0
with:
global-json-file: ${{ github.workspace }}/dotnet/global.json
- name: Build dotnet solutions
shell: bash
run: |
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.slnx" | tr '\n' ' ')
for solution in $SOLUTIONS; do
dotnet build $solution -c ${{ matrix.configuration }} --warnaserror
done
- name: Package install check
shell: bash
# All frameworks are only built for the release configuration, so we only run this step for the release configuration
# and dotnet new doesn't support net472
if: matrix.configuration == 'Release' && matrix.targetFramework != 'net472'
run: |
TEMP_DIR=$(mktemp -d)
export SOLUTIONS=$(find ./dotnet/ -type f -name "*.slnx" | tr '\n' ' ')
for solution in $SOLUTIONS; do
dotnet pack $solution /property:TargetFrameworks=${{ matrix.targetFramework }} -c ${{ matrix.configuration }} --no-build --no-restore --output "$TEMP_DIR/artifacts"
done
pushd "$TEMP_DIR"
# Create a new console app to test the package installation
dotnet new console -f ${{ matrix.targetFramework }} --name packcheck --output consoleapp
# Create minimal nuget.config and use only dotnet nuget commands
echo '<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><clear /></packageSources></configuration>' > consoleapp/nuget.config
# Add sources with local first using dotnet nuget commands
dotnet nuget add source ../artifacts --name local --configfile consoleapp/nuget.config
dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org --configfile consoleapp/nuget.config
# Change to project directory to ensure local nuget.config is used
pushd consoleapp
dotnet add packcheck.csproj package Microsoft.Agents.AI --prerelease
dotnet build -f ${{ matrix.targetFramework }} -c ${{ matrix.configuration }} packcheck.csproj
# Clean up
popd
popd
rm -rf "$TEMP_DIR"
- name: Wait for Cosmos DB Emulator to be ready
run: |
set -e
for i in $(seq 1 120); do
if curl -sk https://localhost:8081/_explorer/emulator.pem -o /dev/null; then
echo "Emulator is up."
break
fi
echo "Waiting for emulator... ($i/120)"
sleep 2
done
- name: Install emulator TLS certificate into system trust store
run: |
set -e
sudo apt-get update
sudo apt-get install -y ca-certificates curl openssl
# Fetch the PEM directly from the emulator's explorer endpoint
curl -sk https://localhost:8081/_explorer/emulator.pem -o cosmos-emulator.crt
# Install with the correct .crt extension so update-ca-certificates picks it up
sudo cp cosmos-emulator.crt /usr/local/share/ca-certificates/cosmos-emulator.crt
sudo update-ca-certificates
- name: Verify TLS now trusts the emulator
run: |
# Use -servername to avoid SNI warning and check verification
echo | openssl s_client -connect localhost:8081 -servername localhost 2>/dev/null | grep -E "Verify return code|subject=|issuer="
# Expect: "Verify return code: 0 (ok)"
- name: Run Cosmos DB Integration Tests
shell: bash
run: |
# Run the specific CosmosDB integration tests
dotnet test ./dotnet/tests/CosmosDB.IntegrationTests/Microsoft.Agents.AI.Runtime.Storage.CosmosDB.Tests/Microsoft.Agents.AI.Runtime.Storage.CosmosDB.Tests.csproj \
-f ${{ matrix.targetFramework }} \
-c ${{ matrix.configuration }} \
--no-build \
-v Normal \
--logger trx \
--collect:"XPlat Code Coverage" \
--results-directory:"TestResults/Coverage/" \
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute
# Generate test reports and check coverage
- name: Generate test reports
uses: danielpalme/ReportGenerator-GitHub-Action@5.4.13
with:
reports: "./TestResults/Coverage/**/coverage.cobertura.xml"
targetdir: "./TestResults/Reports"
reporttypes: "HtmlInline;JsonSummary"
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
name: CosmosDB-CoverageReport-${{ matrix.os }}-${{ matrix.targetFramework }}-${{ matrix.configuration }}
path: ./TestResults/Reports