-
Notifications
You must be signed in to change notification settings - Fork 753
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packages
Milestone
Description
Using daily build 13.1.0-preview.1.25609.1. Getting an error when trying to launch apphost via Aspire CLI, the exception is:
❯ aspire run
❌ An error occurred while connecting to the app host. The app host possibly crashed before it
was available: AppHost process has exited unexpectedly. Use --debug to see more details..
Using launch settings from /home/midenn/Code/scratch/pugginess/apphost.run.json...
Building...
Unhandled exception. System.AggregateException: One or more errors occurred. (Unsupported
value type System.Int32)
---> System.NotSupportedException: Unsupported value type System.Int32
at Aspire.Hosting.Azure.AzureResourcePreparer.ProcessAzureReferences(HashSet`1
azureReferences, Object value) in /_/src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:line
472
at Aspire.Hosting.Azure.AzureResourcePreparer.GetAzureReferences(IResource resource,
CancellationToken cancellationToken) in
/_/src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:line 389
at
Aspire.Hosting.Azure.AzureResourcePreparer.BuildRoleAssignmentAnnotations(DistributedApplica
tionModel appModel, List`1 azureResources, CancellationToken cancellationToken) in
/_/src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:line 141
at Aspire.Hosting.Azure.AzureResourcePreparer.OnBeforeStartAsync(BeforeStartEvent event,
CancellationToken cancellationToken) in
/_/src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:line 38
at
Aspire.Hosting.Eventing.DistributedApplicationEventing.<>c__DisplayClass4_0`1.<<Subscribe>b_
_0>d.MoveNext() in /_/src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 82
--- End of stack trace from previous location ---
at Aspire.Hosting.Eventing.DistributedApplicationEventing.PublishAsync[[T]](T event,
EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken) in
/_/src/Aspire.Hosting/Eventing/DistributedApplicationEventing.cs:line 69
at Aspire.Hosting.DistributedApplication.ExecuteBeforeStartHooksAsync(CancellationToken
cancellationToken) in /_/src/Aspire.Hosting/DistributedApplication.cs:line 490
at Aspire.Hosting.DistributedApplication.RunAsync(CancellationToken cancellationToken) in
/_/src/Aspire.Hosting/DistributedApplication.cs:line 440
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken
cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Aspire.Hosting.DistributedApplication.Run() in
/_/src/Aspire.Hosting/DistributedApplication.cs:line 471
at Program.<Main>$(String[[]] args) in
/home/midenn/Code/scratch/pugginess/apphost.cs:line 58
This is what the apphost looks like:
#:package Aspire.Hosting.Azure.AppContainers@13.1.0-preview.1.25609.1
#:sdk Aspire.AppHost.Sdk@13.1.0-preview.1.25609.1
#:package Aspire.Hosting.JavaScript@13.1.0-preview.1.25609.1
#:package Aspire.Hosting.Python@13.1.0-preview.1.25609.1
#:package Aspire.Hosting.Redis@13.1.0-preview.1.25609.1
#:package Aspire.Hosting.Azure.Storage@13.1.0-preview.1.25609.1
#:package Aspire.Hosting.Azure.CognitiveServices@13.1.0-preview.1.25609.1
#:package CommunityToolkit.Aspire.Hosting.Ollama@13.0.1-beta.468
#:package CommunityToolkit.Aspire.Hosting.k6@13.0.1-beta.468
var builder = DistributedApplication.CreateBuilder(args);
builder.AddAzureContainerAppEnvironment("env");
var cache = builder.AddRedis("cache");
// Azure Blob Storage (uses Azurite emulator locally)
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var blobs = storage.AddBlobs("blobs");
// Azure OpenAI for cloud-scale vision (GPT-4o with vision)
var openai = builder.AddAzureOpenAI("openai");
var gpt4o = openai.AddDeployment("gpt-4o", "gpt-4o", "2024-08-06");
// Ollama with language model for positive spin on feedback (still local)
var ollama = builder.AddOllama("ollama")
.WithDataVolume();
var textModel = ollama.AddModel("llama3.2");
var app = builder.AddUvicornApp("app", "./app", "main:app")
.WithUv()
.WithExternalHttpEndpoints()
.WithReference(cache)
.WaitFor(cache)
.WithReference(blobs)
.WaitFor(blobs)
.WithReference(openai)
.WaitFor(openai)
.WithReference(textModel)
.WaitFor(textModel)
.WithHttpHealthCheck("/health");
var frontend = builder.AddViteApp("frontend", "./frontend")
.WithReference(app)
.WaitFor(app);
app.PublishWithContainerFiles(frontend, "./static");
// k6 load testing for scalability analysis
// Use low VU count (2) and longer duration (2m) since Ollama llava takes ~20s per image on CPU
var k6 = builder.AddK6("k6")
.WithBindMount("./loadtest", "/scripts", true)
.WithScript("/scripts/script.js", virtualUsers: 2, duration: "2m")
.WithReference(app)
.WaitFor(app);
builder.Build().Run();Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packages