Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
40e8537
Add python support
sebastienros Jan 16, 2026
5759866
Add go support
sebastienros Jan 16, 2026
c9e8de9
Add Java code generator support
sebastienros Jan 16, 2026
c8ce76e
Add Rust code generator support for polyglot AppHosts (WIP)
sebastienros Jan 16, 2026
ef59cd9
Fix Rust code generator issues
sebastienros Jan 16, 2026
9b40815
Fix Java and Rust code generators - Fix RuntimeSpec timing: InstallDe…
sebastienros Jan 16, 2026
46ad57f
Fix Go code generator RuntimeSpec and module config
sebastienros Jan 16, 2026
5865a70
Add E2E test
sebastienros Jan 16, 2026
adb0fae
Fix named pipes for rust/java
sebastienros Jan 17, 2026
cffe834
Merge main - adopt additionalProjectReferences approach for code gene…
sebastienros Jan 17, 2026
467ddf4
Run PolyglotPythonTests as E2E
sebastienros Jan 17, 2026
9cffcc0
Move PolyglotPythonTests to correct E2E test folder for CI discovery
sebastienros Jan 17, 2026
b4f8139
Add comprehensive Python code generator tests with Verify snapshots
sebastienros Jan 17, 2026
2f1fc9f
Add unit tests for Go, Java, and Rust code generators
sebastienros Jan 17, 2026
5dbb4bd
Merge remote-tracking branch 'origin/main' into sebros/poly
sebastienros Jan 17, 2026
9505fcf
Apply list property improvements from TypeScript to Python, Go, Java,…
sebastienros Jan 17, 2026
1ee5bb8
Enable polyglot support feature flag before init -l in E2E test
sebastienros Jan 17, 2026
f85aca2
Fix MethodAccessException when calling AtsConstants.IsDict from code …
sebastienros Jan 17, 2026
cf6be2e
Simplify Python E2E test to not require Python runtime
sebastienros Jan 17, 2026
e70b1d1
Add file content verification to Python E2E test
sebastienros Jan 17, 2026
82f21f8
Merge remote-tracking branch 'origin/main' into sebros/poly
sebastienros Jan 20, 2026
d4f50d7
Add instructions
sebastienros Jan 20, 2026
443c51e
Fix Python E2E test to handle version selection prompt in CI
sebastienros Jan 20, 2026
600f52b
Fix Python E2E test pattern to match actual CLI output
sebastienros Jan 21, 2026
cbf1b51
Fix Python E2E test: verify settings.json instead of .modules (code g…
sebastienros Jan 21, 2026
b3c5110
Fix Python E2E test: verify .modules exists after init, settings.json…
sebastienros Jan 21, 2026
e96f8bf
Fix: Continue SDK code generation even if dependency install fails
sebastienros Jan 21, 2026
10f8acc
Add polyglot E2E tests for Go, Rust, and Java
sebastienros Jan 21, 2026
1137f4a
Fix polyglot E2E tests with correct code patterns
sebastienros Jan 21, 2026
358da78
Simplify polyglot E2E test assertions for SDK patterns
sebastienros Jan 21, 2026
f0c026f
Remove static base/transport snapshot tests and add missing polyglot …
sebastienros Jan 21, 2026
5e8525c
Fix Rust
sebastienros Jan 21, 2026
03c070d
Detect local python command
sebastienros Jan 21, 2026
41515b8
Fix Rust
sebastienros Jan 21, 2026
4d8e786
Add build checks
sebastienros Jan 21, 2026
3edd328
Add polyglot validation to CI workflow
sebastienros Jan 21, 2026
9e00e43
Use Docker containers from mcr.microsoft.com for polyglot validation
sebastienros Jan 21, 2026
fa4be8a
Remove ASPIRE_CLI_PATH requirement from validation scripts
sebastienros Jan 21, 2026
92e964e
Use native CLI archive for polyglot validation with .NET SDK for AppH…
sebastienros Jan 21, 2026
3081dc2
Merge branch 'main' into sebros/poly
sebastienros Jan 21, 2026
befcfa2
Update codegen snapshots for AppHostFilePath property
sebastienros Jan 21, 2026
4dffab0
Fix CLI archive path with find command
sebastienros Jan 21, 2026
8eb84ca
Use dogfood script to install CLI and NuGet packages from PR
sebastienros Jan 21, 2026
44009a0
TEMP: Install gh CLI in Docker, disable other tests for faster polygl…
sebastienros Jan 21, 2026
891d9b0
Merge branch 'main' into sebros/poly
sebastienros Jan 21, 2026
8b10909
Fix polyglot validation workflow to include Docker CLI
sebastienros Jan 22, 2026
a17c100
Update polyglot test scripts to use aspire run --detach and aspire stop
sebastienros Jan 22, 2026
1e75f6a
Update polyglot test scripts to use aspire run --detach and aspire stop
sebastienros Jan 22, 2026
b9eecd9
Make channel config setting non-fatal in get-aspire-cli-pr.sh
sebastienros Jan 22, 2026
e115c18
Fix aspire add --non-interactive to auto-select latest version
sebastienros Jan 22, 2026
762d7d6
Add -d flag to aspire run --detach for debug logging
sebastienros Jan 22, 2026
ca76992
Use local get-aspire-cli-pr.sh script instead of downloading from main
sebastienros Jan 22, 2026
734040b
Use background job for aspire run instead of --detach
sebastienros Jan 22, 2026
1581358
Use kill -9 and remove wait to prevent blocking on cleanup
sebastienros Jan 22, 2026
1e76779
Use go:1-trixie image for GLIBC 2.38 support
sebastienros Jan 22, 2026
e77122f
Re-enable all tests that were temporarily disabled
sebastienros Jan 22, 2026
7bfa895
Add TypeScript polyglot SDK validation
sebastienros Jan 22, 2026
f38a13c
Remove Base.verified.java, Transport.verified.java and their tests
sebastienros Jan 22, 2026
73392bc
Remove PolyglotPythonTests, PolyglotGoTests, PolyglotRustTests, Polyg…
sebastienros Jan 22, 2026
0ba21de
Use setsid and kill process group to properly stop apphost
sebastienros Jan 22, 2026
0b8cc23
Add Redis in a consistent way across scripts
sebastienros Jan 22, 2026
58fd469
Add Dockerfiles for polyglot SDK validation
sebastienros Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/cli-e2e-recording-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ jobs:
a.name.includes('PythonReactTemplateTests') ||
a.name.includes('DockerDeploymentTests') ||
a.name.includes('TypeScriptPolyglotTests') ||
a.name.includes('PolyglotPythonTests') ||
a.name.includes('PolyglotGoTests') ||
a.name.includes('PolyglotRustTests') ||
a.name.includes('PolyglotJavaTests'))
a.name.includes('DoctorCommandTests'))
a.name.includes('StartStopTests'))
);
Expand Down
224 changes: 224 additions & 0 deletions .github/workflows/polyglot-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Polyglot SDK Validation Tests (Reusable)
# Validates Python, Go, Java, and Rust AppHost SDKs with Redis integration
# Uses Docker containers from mcr.microsoft.com for security
# Uses dogfood script to install CLI and NuGet packages from the current PR
name: Polyglot SDK Validation

on:
workflow_call:
inputs:
versionOverrideArg:
required: false
type: string

jobs:
validate_python:
name: Python SDK Validation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Python SDK validation in Docker
env:
GH_TOKEN: ${{ github.token }}
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace \
-e GH_TOKEN="${GH_TOKEN}" \
mcr.microsoft.com/devcontainers/python:3.12 \
bash -c '
set -e
echo "=== Installing GitHub CLI ==="
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y

echo "=== Installing Docker CLI ==="
sudo apt-get install -y docker.io

echo "=== Installing .NET SDK 10.0 ==="
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 10.0
export PATH="$HOME/.dotnet:$PATH"
export DOTNET_ROOT="$HOME/.dotnet"

echo "=== Installing uv package manager ==="
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

echo "=== Installing Aspire CLI from PR ==="
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- ${{ github.event.pull_request.number }}
export PATH="$HOME/.aspire/bin:$PATH"
aspire --version

echo "=== Enabling polyglot support ==="
aspire config set features:polyglotSupportEnabled true --global

echo "=== Running validation ==="
chmod +x /workspace/.github/workflows/polyglot-validation/test-python.sh
/workspace/.github/workflows/polyglot-validation/test-python.sh
'

validate_go:
name: Go SDK Validation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Go SDK validation in Docker
env:
GH_TOKEN: ${{ github.token }}
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace \
-e GH_TOKEN="${GH_TOKEN}" \
mcr.microsoft.com/devcontainers/go:1.23 \
bash -c '
set -e
echo "=== Installing GitHub CLI ==="
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y

echo "=== Installing Docker CLI ==="
sudo apt-get install -y docker.io

echo "=== Installing .NET SDK 10.0 ==="
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 10.0
export PATH="$HOME/.dotnet:$PATH"
export DOTNET_ROOT="$HOME/.dotnet"

echo "=== Installing Aspire CLI from PR ==="
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- ${{ github.event.pull_request.number }}
export PATH="$HOME/.aspire/bin:$PATH"
aspire --version

echo "=== Enabling polyglot support ==="
aspire config set features:polyglotSupportEnabled true --global

echo "=== Running validation ==="
chmod +x /workspace/.github/workflows/polyglot-validation/test-go.sh
/workspace/.github/workflows/polyglot-validation/test-go.sh
'

validate_java:
name: Java SDK Validation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Java SDK validation in Docker
env:
GH_TOKEN: ${{ github.token }}
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace \
-e GH_TOKEN="${GH_TOKEN}" \
mcr.microsoft.com/devcontainers/java:17 \
bash -c '
set -e
echo "=== Installing GitHub CLI ==="
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y

echo "=== Installing Docker CLI ==="
sudo apt-get install -y docker.io

echo "=== Installing .NET SDK 10.0 ==="
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 10.0
export PATH="$HOME/.dotnet:$PATH"
export DOTNET_ROOT="$HOME/.dotnet"

echo "=== Installing Aspire CLI from PR ==="
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- ${{ github.event.pull_request.number }}
export PATH="$HOME/.aspire/bin:$PATH"
aspire --version

echo "=== Enabling polyglot support ==="
aspire config set features:polyglotSupportEnabled true --global

echo "=== Running validation ==="
chmod +x /workspace/.github/workflows/polyglot-validation/test-java.sh
/workspace/.github/workflows/polyglot-validation/test-java.sh
'

validate_rust:
name: Rust SDK Validation
runs-on: ubuntu-latest
# Rust SDK has known issues - don't fail the workflow
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Rust SDK validation in Docker
env:
GH_TOKEN: ${{ github.token }}
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /workspace \
-e GH_TOKEN="${GH_TOKEN}" \
mcr.microsoft.com/devcontainers/rust:1 \
bash -c '
set -e
echo "=== Installing GitHub CLI ==="
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y

echo "=== Installing Docker CLI ==="
sudo apt-get install -y docker.io

echo "=== Installing .NET SDK 10.0 ==="
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 10.0
export PATH="$HOME/.dotnet:$PATH"
export DOTNET_ROOT="$HOME/.dotnet"

echo "=== Installing Aspire CLI from PR ==="
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- ${{ github.event.pull_request.number }}
export PATH="$HOME/.aspire/bin:$PATH"
aspire --version

echo "=== Enabling polyglot support ==="
aspire config set features:polyglotSupportEnabled true --global

echo "=== Running validation ==="
chmod +x /workspace/.github/workflows/polyglot-validation/test-rust.sh
/workspace/.github/workflows/polyglot-validation/test-rust.sh
'

results:
if: always()
runs-on: ubuntu-latest
name: Polyglot Validation Results
needs: [validate_python, validate_go, validate_java, validate_rust]
steps:
- name: Check validation results
# Only fail on Python, Go, Java failures (Rust has continue-on-error)
if: >-
${{ needs.validate_python.result == 'failure' ||
needs.validate_go.result == 'failure' ||
needs.validate_java.result == 'failure' ||
needs.validate_python.result == 'cancelled' ||
needs.validate_go.result == 'cancelled' ||
needs.validate_java.result == 'cancelled' }}
run: |
echo "One or more polyglot SDK validations failed."
echo "Python: ${{ needs.validate_python.result }}"
echo "Go: ${{ needs.validate_go.result }}"
echo "Java: ${{ needs.validate_java.result }}"
exit 1

- name: Report Rust status
if: always()
run: |
echo "Rust SDK validation: ${{ needs.validate_rust.result }}"
if [ "${{ needs.validate_rust.result }}" == "failure" ]; then
echo "⚠️ Rust SDK validation failed (known issues - not blocking)"
fi

- name: All validations passed
run: echo "✅ All required polyglot SDK validations passed!"
85 changes: 85 additions & 0 deletions .github/workflows/polyglot-validation/test-go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash
# Polyglot SDK Validation - Go
# This script validates the Go AppHost SDK with Redis integration
set -e

echo "=== Go AppHost SDK Validation ==="

# Verify aspire CLI is available
if ! command -v aspire &> /dev/null; then
echo "❌ Aspire CLI not found in PATH"
exit 1
fi

echo "Aspire CLI version:"
aspire --version

# Create project directory
WORK_DIR=$(mktemp -d)
echo "Working directory: $WORK_DIR"
cd "$WORK_DIR"

# Initialize Go AppHost
echo "Creating Go apphost project..."
aspire init -l go --non-interactive

# Add Redis integration
echo "Adding Redis integration..."
aspire add Aspire.Hosting.Redis --non-interactive 2>&1 || {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebastienros would this use the default docker registry? it might get rate limited.

@sebastienros sebastienros Jan 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be the case. To solve that we need to call .WithImageRegistry("netaspireci.azurecr.io") when we add AddRedis(...) in the apphosts. #14113

echo "aspire add failed, manually updating settings.json..."
PKG_VERSION=$(aspire --version | grep -oP '\d+\.\d+\.\d+-.*' | head -1)
if [ -f ".aspire/settings.json" ]; then
if command -v jq &> /dev/null; then
jq '.packages["Aspire.Hosting.Redis"] = "'"$PKG_VERSION"'"' .aspire/settings.json > .aspire/settings.json.tmp && mv .aspire/settings.json.tmp .aspire/settings.json
fi
echo "Settings.json updated"
cat .aspire/settings.json
fi
}

# Insert Redis code into apphost.go
echo "Configuring apphost.go with Redis..."
if grep -q "builder.Build()" apphost.go; then
sed -i '/builder.Build()/i\
\t// Add Redis cache resource\
\t_, err = builder.AddRedis("cache", 0, nil)\
\tif err != nil {\
\t\tlog.Fatalf("Failed to add Redis: %v", err)\
\t}' apphost.go
echo "✅ Redis configuration added to apphost.go"
fi

echo "=== apphost.go ==="
cat apphost.go

# Run the apphost in detached mode
echo "Starting apphost in detached mode..."
aspire run --non-interactive --detach
Comment thread
sebastienros marked this conversation as resolved.
Outdated

# Poll for Redis container with retries
echo "Polling for Redis container..."
RESULT=1
for i in {1..12}; do
echo "Attempt $i/12: Checking for Redis container..."
if docker ps | grep -q -i redis; then
echo "✅ SUCCESS: Redis container is running!"
docker ps | grep -i redis
RESULT=0
break
fi
echo "Redis not found yet, waiting 10 seconds..."
sleep 10
done

if [ $RESULT -ne 0 ]; then
echo "❌ FAILURE: Redis container not found after 2 minutes"
echo "=== Docker containers ==="
docker ps
fi

# Cleanup
echo "Stopping apphost..."
aspire stop --non-interactive 2>/dev/null || true
rm -rf "$WORK_DIR"

exit $RESULT
Loading
Loading