Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno integration doesn't work with Deno 2.1.5 #377

Open
aaronpowell opened this issue Jan 10, 2025 · 3 comments
Open

Deno integration doesn't work with Deno 2.1.5 #377

aaronpowell opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels

Comments

@aaronpowell
Copy link
Member

aaronpowell commented Jan 10, 2025

The Deno 2.1.5 release seems to have changed something in how the Deno app launches, which results in the integration being unable to start apps using deno run, this means that the AddDenoApp does not work with Deno 2.1.5 (although it does seem to work with 2.1.4).

Consider this as a blocking issue if you are using the Deno integration.

Workaround

From my testing, it seems that using the AddDenoTask extension method to run a task defined in the deno.json file does work, and thus, this is the recommended approach until the problem is resolved. Here is an example:

builder.AddDenoTask("vite-demo", taskName: "dev")
    .WithDenoPackageInstallation()
    .WithHttpEndpoint(env: "PORT")
    .WithEndpoint();

Original issue

https://github.com/CommunityToolkit/Aspire/actions/runs/12701892107/job/35407179902

One of the Deno tests has started timing out, need to investigate why.

Edit
I'm pinning this issue as it's blocking CI, and I think it's also meaning that the Deno integration is currently broken.

@aaronpowell
Copy link
Member Author

aaronpowell commented Jan 13, 2025

Looks like this is failing because the oak demo app isn't starting via the DCP when Aspire launches.

Trying to figure out why that is, but it looks like something might have changed in the 2.1.5 release of Deno.

@aaronpowell
Copy link
Member Author

DCP logs:

warn: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[9]
      The ASP.NET Core developer certificate is only trusted by some clients. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert
Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer: Warning: The ASP.NET Core developer certificate is only trusted by some clients. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert
info: Aspire.Hosting.DistributedApplication[0]
      Aspire version: 9.0.0+01ed51919f8df692ececce51048a140615dc759d
Aspire.Hosting.DistributedApplication: Information: Aspire version: 9.0.0+01ed51919f8df692ececce51048a140615dc759d
Aspire.Hosting.DistributedApplication: Information: Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
      Application host directory is: /workspaces/CommunityToolkit-Aspire/examples/deno/CommunityToolkit.Aspire.Hosting.Deno.AppHost
Aspire.Hosting.DistributedApplication: Information: Application host directory is: /workspaces/CommunityToolkit-Aspire/examples/deno/CommunityToolkit.Aspire.Hosting.Deno.AppHost
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
      Storing keys in a directory '/home/vscode/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository: Warning: Storing keys in a directory '/home/vscode/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
Aspire.Hosting.DistributedApplication: Information: Now listening on: https://localhost:17118
info: Aspire.Hosting.DistributedApplication[0]
      Now listening on: https://localhost:17118
info: Aspire.Hosting.DistributedApplication[0]
      Login to the dashboard at https://localhost:17118/login?t=f90357f6fbbb142894da333e554605d4
Aspire.Hosting.DistributedApplication: Information: Login to the dashboard at https://localhost:17118/login?t=f90357f6fbbb142894da333e554605d4
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      could not create Endpoint object	{"Executable": {"name":"oak-demo-vtgfhhph"}, "Reconciliation": 6, "ServiceName": "oak-demo-tcp", "Workload": "/oak-demo-vtgfhhph", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler: Error: could not create Endpoint object	{"Executable": {"name":"oak-demo-vtgfhhph"}, "Reconciliation": 6, "ServiceName": "oak-demo-tcp", "Workload": "/oak-demo-vtgfhhph", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler: Error: could not create Endpoint object	{"Executable": {"name":"oak-demo-vtgfhhph"}, "Reconciliation": 7, "ServiceName": "oak-demo-tcp", "Workload": "/oak-demo-vtgfhhph", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}
      could not create Endpoint object	{"Executable": {"name":"oak-demo-vtgfhhph"}, "Reconciliation": 7, "ServiceName": "oak-demo-tcp", "Workload": "/oak-demo-vtgfhhph", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}
info: Aspire.Hosting.DistributedApplication[0]
      Distributed application started. Press Ctrl+C to shut down.
Aspire.Hosting.DistributedApplication: Information: Distributed application started. Press Ctrl+C to shut down.

Resource is reporting Finished in the dashboard but has zero in its own console logs. But if I run it from the CLI (ie deno run <args>) it starts properly.

@aaronpowell
Copy link
Member Author

If I try to restart the process from the dashboard, I see this in the logs (from the App Host process, not in the dashboard):

fail: Aspire.Hosting.Dcp.monitor[0]
      error finding process	{"pid": 68762, "error": "os: process already finished"}
Aspire.Hosting.Dcp.monitor: Error: error finding process	{"pid": 68762, "error": "os: process already finished"}
fail: Aspire.Hosting.Dcp.monitor[0]
      invalid service monitor PID	{"PID": 68762, "error": "os: process already finished"}
Aspire.Hosting.Dcp.monitor: Error: invalid service monitor PID	{"PID": 68762, "error": "os: process already finished"}
fail: Aspire.Hosting.Dcp.the program finished with an error[0]
      {"ExitCode": 1, "error": "os: process already finished"}
Aspire.Hosting.Dcp.the program finished with an error: Error: {"ExitCode": 1, "error": "os: process already finished"}

@aaronpowell aaronpowell pinned this issue Jan 14, 2025
@aaronpowell aaronpowell changed the title Deno test timing out CI blocked - Deno test timing out Jan 14, 2025
@aaronpowell aaronpowell changed the title CI blocked - Deno test timing out CI blocked - Deno integration doesn't work with Deno 2.1.5 Jan 14, 2025
@aaronpowell aaronpowell changed the title CI blocked - Deno integration doesn't work with Deno 2.1.5 Deno integration doesn't work with Deno 2.1.5 Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant